users@jaxb.java.net

Re: how to specify the customization of these elements

From: Kohsuke Kawaguchi <Kohsuke.Kawaguchi_at_Sun.COM>
Date: Thu, 01 Mar 2007 09:51:59 -0800

Peizhao Hu wrote:
> Hi,
>
> as the _AbstractListType element is defined as xs:any element, there
> should be able to define input element as below. however, when I use
> JAXB 2.1 to bind these schema, I can only access the getAny(). I can't
> define the input element as described in the schema. is there any
> customization rule that I can use?

I guess I don't understand your question. What do you mean you can't
define the input element as described in the schema?


>
>
> <xs:complexType name="inputsType">
> <xs:sequence minOccurs="0">
> <xs:element name="InputList" type="sml:_AbstractListType"/>
> </xs:sequence>
> <xs:attributeGroup ref="swe:AssociationAttributes"/>
> </xs:complexType>
>
>
> <xs:complexType name="_AbstractListType">
> <xs:sequence>
> <xs:any namespace="##any" processContents="strict"
> maxOccurs="unbounded"/>
> </xs:sequence>
> <xs:attribute name="id" type="xs:ID" use="optional"/>
> </xs:complexType>
>
>
> <xs:element name="inputs">
> <xs:annotation>
> <xs:documentation>list of input signals</xs:documentation>
> </xs:annotation>
> <xs:complexType>
> <xs:complexContent>
> <xs:restriction base="sml:inputsType">
> <xs:sequence minOccurs="0">
> <xs:element name="InputList">
> <xs:complexType>
> <xs:complexContent>
> <xs:restriction
> base="sml:_AbstractListType">
> <xs:sequence>
> <xs:element name="input"
> maxOccurs="unbounded">
> <xs:complexType>
> <xs:group
> ref="swe:AnyData" minOccurs="0"/>
> <xs:attribute
> name="name" type="swe:qnameSimpleType" use="required"/>
> <xs:attributeGroup
> ref="swe:AssociationAttributes"/>
> </xs:complexType>
> </xs:element>
> </xs:sequence>
> </xs:restriction>
> </xs:complexContent>
> </xs:complexType>
> </xs:element>
> </xs:sequence>
> </xs:restriction>
> </xs:complexContent>
> </xs:complexType>
> </xs:element>
>


-- 
Kohsuke Kawaguchi
Sun Microsystems                   kohsuke.kawaguchi_at_sun.com