[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

IETF input to XML Schema 1.1




I'm not sure how active this list is, but...

As you are no doubt aware, the W3C is in the process of developing XML
Schema 1.1.

I was wondering if the IETF has had any input to this process.

For example, one thing the IETF WGs seem to care about is extensibility.
The schema WG do seem to be addressing this, although I'm not convinced the
approach taken is what the IETF would be looking for.

For example, with the current XSD 1.1 draft text, it would be possible to
specify something like:

   <xs:element name='foo' minOccurs='0' type='xs:int'/>
   <xs:any namespace='##any' minOccurs='0' max.../>

With existing XSD 1.0 rules the wildcard would conflict with the 'foo'
element.  The current XSD 1.1 text says that if a wildcard conflicts with an
element declaration, then the element declaration wins.  Hence the above is
OK.

One oddity though is that the following instance would be valid:

   <foo>123</foo>
   <foo>456</foo>

Here, the first instance of <foo> matches the element declaration, and the
second instance matches the wildcard.  Personally I don't think this is the
right way to do things.

There's also an example (based on peoples' names) where you couldn't go from
(in v1):

     <xs:element name="given" type="xs:string"/>
     <xs:any namespace="##any" processContents="lax"
             minOccurs="0" maxOccurs="unbounded"/>
     <xs:element name="family" type="xs:string"/>

to:

     <xs:element name="given" type="xs:string"/>
     <xs:any namespace="##any" processContents="lax"
             minOccurs="0" maxOccurs="unbounded"/>
     <xs:element name="middle" type="xs:string" minOccurs="0"/>
     <xs:any namespace="##any" processContents="lax"
             minOccurs="0" maxOccurs="unbounded"/>
     <xs:element name="family" type="xs:string"/>

in a subsequent version (i.e. add a declaration for a <middle> name element,
and another wildcard), because the two wildcards would conflict.  Instead
you would have to do:

     <xs:element name="given" type="xs:string"/>
     <xs:any namespace="##any" processContents="lax"
             minOccurs="0" maxOccurs="unbounded"/>
     <xs:sequence minOccurs="0">
         <xs:element name="middle" type="xs:string" />
         <xs:any namespace="##any" processContents="lax"
               minOccurs="0" maxOccurs="unbounded"/>
     </xs:sequence>
     <xs:element name="family" type="xs:string"/>

(i.e. add an optional sequence in which the <middle> name became mandatory,
hence separating the wildcards.)

This seems messy to me, and I'd like to encourage them to permit the middle
option (first extended example), in which conflicting wildcards are
permitted.

Another thing that I think would suit the IETF is an xs:anyEnumeration facet
to make extensible enumerations, rather than having to use the <union> work
around trick.

I also feel that XML schema is lacking in facilities to specify how a base
(or core) schema is extended by an extending schema.  i.e. in an extending
schema (a schema that specifies an extension to a base schema) it is not
possible to say that such and such an extension should go into complexType
XYZ in the base schema.

I quickly jotted down a proposal to address this
(http://www.tech-know-ware.com/lmx/download/named-wildcards.pdf) and I think
such a feature would be very useful for the IETF type use-cases.  Sadly,
however, I think it is way beyond what they are currently considering.

Overall I think that sorts of requirements that the IETF has are not well
represented in the schema WG.  Therefore, I think it would be well worth
some members of the IETF looking at what the W3C is doing and possibly
sending them a liaison statement outlining the sorts of features they would
find helpful in a new version of XML schema.

Is this appropriate?  And if so, what is the right way to go about doing
this?

Thanks for your time,

Pete.

P.S. There's more examples of versioning at:

   http://www.w3.org/TR/xmlschema-guide2versioning/
--
=============================================
Pete Cordell
Tech-Know-Ware Ltd
for XML to C++ data binding visit
http://www.tech-know-ware.com/lmx/
http://www.codalogic.com/lmx/
=============================================