[jboss-dev-forums] [JBoss XML Binding Development] New message: "Re: Xml attribute list"

Kabir Khan noreply at jboss.org
Tue Jan 5 15:00:33 EST 2010


JBoss development,

A new message was posted in the thread "Xml attribute list":

http://community.jboss.org/message/518414#518414

Author  : Kabir Khan
Profile : http://community.jboss.org/people/kabir.khan@jboss.com

Message:
--------------------------------------------------------------
Alexey,
 
Can you please take a look to see if my xsd attempts are ok?
 
   <xsd:complexType name="qualifierBeanType" mixed="true">
      <xsd:annotation>
         <xsd:documentation>
           <![CDATA[
           Qualifiers.
           ]]>
         </xsd:documentation>
      </xsd:annotation>
      <xsd:choice minOccurs="0" maxOccurs="unbounded">
         <xsd:any namespace="##other" processContents="strict"/>
      </xsd:choice>
      <xsd:attribute name="content" type="xsd:string" use="optional"/>
      <xsd:attribute name="type" use="optional" default="Supplied">
         <xsd:simpleType>
            <xsd:restriction base="xsd:string">
               <xsd:enumeration value="Supplied"></xsd:enumeration>
               <xsd:enumeration value="Optional"></xsd:enumeration>
               <xsd:enumeration value="Required"></xsd:enumeration>
            </xsd:restriction>
         </xsd:simpleType>
      </xsd:attribute>
      <xsd:attribute name="points" use="optional">
         <xsd:simpleType>
            <xsd:list>
               <xsd:simpleType>
                      <xsd:restriction base="xsd:string">
                         <xsd:enumeration value="Constructor"></xsd:enumeration>
                         <xsd:enumeration value="Method"></xsd:enumeration>
                         <xsd:enumeration value="Property"></xsd:enumeration>
                      </xsd:restriction>
               </xsd:simpleType>
            </xsd:list>
         </xsd:simpleType>
      </xsd:attribute>
   </xsd:complexType>

 
I think I have got the choice ok (copied from the thing I am mimicking), but am unsure about the attributes. What I want is
- An attribute called 'content' that just takes a string.
- An attribute called 'type' that can be either 'Supplied', 'Optional' or 'Required' with 'Supplied' as the default.
- An attribute called 'points' that can take one or more of 'Constructor', 'Method' or 'Property'. If I am on the right path, can I make it ignore the case of these so that 'propeRTY' etc. would be valid as well?

--------------------------------------------------------------

To reply to this message visit the message page: http://community.jboss.org/message/518414#518414




More information about the jboss-dev-forums mailing list