[graap-wg] Complex Constraints, our call today

Heiko Ludwig hludwig at us.ibm.com
Wed Jul 13 14:59:11 CDT 2005


As discussed in our call today, I looked into the XML Schema schema (no 
typo) to figure out whether we can reuse a good schema constraint to 
represent template constraints not only pertaining to simple types. 

>From my point of view, we have two choices:

<xs:group name="typeDefParticle">
  <xs:annotation>
    <xs:documentation>
   'complexType' uses this</xs:documentation></xs:annotation>
  <xs:choice>
   <xs:element name="group" type="xs:groupRef"/>
   <xs:element ref="xs:all"/>
   <xs:element ref="xs:choice"/>
   <xs:element ref="xs:sequence"/>
  </xs:choice>
 </xs:group>

 <xs:group name="nestedParticle">
  <xs:choice>
   <xs:element name="element" type="xs:localElement"/>
   <xs:element name="group" type="xs:groupRef"/>
   <xs:element ref="xs:choice"/>
   <xs:element ref="xs:sequence"/>
   <xs:element ref="xs:any"/>
  </xs:choice>
 </xs:group>

typeDefParticle asks for all, choice and sequence, plus group as the 
top-level element. nestedParticle allows us to define a element straight 
away - and its type.

The types localElement or topLevelElement would just allow to define an 
element, which could be good enough.

In case we want high flexibilty, let's take nestedParticle, otherwise 
topLevelElement. It would be alternative to the simpleRestrictions we 
already have.

Opinions?

Heiko

-----
Heiko Ludwig, Dr. rer. pol.
IBM TJ Watson Research Center, PO Box 704, Yorktown, NY, 10598
hludwig at us.ibm.com, tel. +1 914 784 7160,  mob. +1 646 675 8469
http://www.research.ibm.com/people/h/hludwig/


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.ogf.org/pipermail/graap-wg/attachments/20050713/9e4c0ab8/attachment.html 


More information about the graap-wg mailing list