View Single Post
Old 08-20-2002, 07:01 PM   #16
Gendal
A Treant
 
Join Date: Jul 2002
Posts: 26
Default

The problem seems to be the following quote from the w3c schema 1.0 primer:

Quote:
There exists a third option for constraining elements in a group: All the elements in the group may appear once or not at all, and they may appear in any order. The all group (which provides a simplified version of the SGML &-Connector) is limited to the top-level of any content model. Moreover, the group's children must all be individual elements (no groups), and no element in the content model may appear more than once, i.e. the permissible values of minOccurs and maxOccurs are 0 and 1. For example, to allow the child elements of purchaseOrder to appear in any order, we could redefine PurchaseOrderType as:


Since the sidl schema allows you to leave out tags as you see fit or include them as you see fit I don't see how the "choice" or "sequence" element constraints would apply at all. The all is exactly what I need, but with the restrictions imposed by 1.0 as I bolded above it of course doesn't work.

I assume there is another way to do it, or more likely I am just looking at it all wrong, but either way I am completly stumped.

Up at http://www.jrh.net/sidlschema.zip is an old work in progress (read: major hack) xslt and a generated xsd from the sidl.xml using the xslt. think I have the complex types set to use the choice restriction atm, which of course doesn't work at all. sequence doesn't work, and "all" is limited to the root level, any child derived "all" restrictions automatically revert to a sequence restriction. =(
Gendal is offline   Reply With Quote