Re: XQuery and DTD/Schema?
At 06:51 PM 7/2/2002 -0400, Betty Harvey wrote: >I haven't been following the progress of XQuery closely. I was advised >today that a W3C Schema had to be developed instead of a DTD because >XQuery only works with Schema. XQuery works with well-formed documents, DTD-governed documents, or XML Schema-governed documents. I think the following quote from the Data Model draft is clear and straightforward on this subject: From http://www.w3.org/TR/query-datamodel/#psv: >3.3 XML Schemas and the XML Information Set > >The data model supports the following classes of XML documents: > >1. Schema-validated documents, i.e., those validated with respect to a >schema, > >2. DTD-valid documents, i.e., those documents validated with respect >to a DTD, and > >3. Well-formed documents with no corresponding DTD or schema. The mappings from DTDs and well-formed documents to the equivalent schema documents are not yet finished, as editorial notes in the Data Model document point out. As you note, XQuery does not define a mapping for RELAX-NG. This is also an issue for relational data, object data, or any other kind of typed data that is not actually an XML file governed by a schema. To make XQuery work for these data sources, you must define a mapping, either to the PSVI or directly to the XML Query and XPath Data Model. For relational sources, this is done by SQL/XML, a specification being developed by ISO/ANSI , which defines the mapping in terms of equivalent XML schemas and documents. To my knowledge, nobody has done this for RELAX-NG. Anybody who wants to do such a mapping will need to think about how to match the purely structural typing of RELAX-NG to the named typing used in XQuery. Jonathan  Relevant SQL/XML specs: The XML Data type and Publishing Functions: ftp://SQLStandards.org/SC32/National_Bodies/USA_NCITS_H2/2002docs/H2-2002-020r1.pdf Table Mapping: ftp://SQLStandards.org/SC32/National_Bodies/USA_NCITS_H2/2001docs/H2-2001-373r1.pdf Mapping non-predefined data types: ftp://SQLStandards.org/SC32/National_Bodies/USA_NCITS_H2/2002docs/H2-2002-018.pdf
PURCHASE STYLUS STUDIO ONLINE TODAY!
Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!
Download The World's Best XML IDE!
Accelerate XML development with our award-winning XML IDE - Download a free trial today!
Subscribe in XML format