Altova Mailing List Archives
>xml-dev Archive Home
>Recent entries
>Thread Prev - Re: [xml-dev] Ten new XQuery, XSLT 2.0 and XPath 2.0 Working Drafts
[Thread Next]
Re: [xml-dev] Ten new XQuery, XSLT 2.0 and XPath 2.0 Working Drafts
To: "Bob Foster" <bob@------.--->,<xml-dev@-----.---.--->
Date: 5/12/2003 10:10:00 PM
At 05:16 PM 5/12/2003 -0500, Bob Foster wrote: >From: "Jonathan Robie" <jonathan.robie@d...> > > The complex types of DTDs are not named types in the Data Model, and that > > means that you can't match them with SequenceType in XQuery - there is no > > type annotation to match. > >Hi Jonathan, > >Thanks for the answer. > >Maybe you're answering a different question. My (limited) understanding of >the Data Model spec is that the complex types of DTDs would be mapped to >anonymous types. It seems they must be validated, in order to get at simple >types like NMTOKENS? > >I must be wrong, if there is no type annotation at all. Hi Bob, Anonymous types are the types in W3C XML Schema that are not explicitly given names by users, but which have identity. Every element or attribute has a type annotation, but if a document is merely well formed, or taken from a document governed by a DTD, the type annotation will be xs:anyType for elements or xs:anySimpleType for attributes EXCEPT if it is an attribute of type ID, IDREF, IDREFS, ENTITY, ENTITIES, NMTOKEN, or NMTOKENS. > > If RELAX NG wants to define a mapping into our Data Model, that mapping > > could produce named types. The XQuery and XSLT Working Groups have not > > produced a mapping for RELAX NG. > >I'm not sure, for complex types, that the named types a mapping could >produce would be any more useful than anonymous types. Names are not >typically used in that way in RELAX NG. > >There are other, more fundamental issues. RELAX NG validation is >multi-level, e.g., the contents of elements may need to be examined to >determine which pattern is valid, and more than one might be. XQuery seems >to deal with non-determinism using a "first match" rule for both complex and >simple types. There is not even, in RELAX NG, a well-defined notion of >"first", as in that language choice represents the commutative union >operation. You might be able to use xs:anyType for elements or xs:anySimpleType for attributes unless a type library is bound in for simple types, and use type annotations for those types. Obviously, it takes a little time to think this out for any given schema language. And you would also need to think about whether importing RELAX NG schemas into the query body is important to you. Jonathan
Disclaimer
These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

