[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: what parsers support xml schema
> -----Original Message----- > From: Murali Mani [mailto:mani@C...] > Sent: Friday, August 30, 2002 2:49 PM > To: Dare Obasanjo > Cc: Maciejewski, Thomas; xml-dev@l... > > This support for named subtyping does not affect in any way > the fact that the type inferencing for XQuery is based on > regular tree grammars. Type inferencing, regular tree > grammars and closure under operations forms the XQuery core, > and they go together. Like I said, the formal semantics is behind the times but [from what I've seen] the goal of the working group is too make type inferencing based on named W3C XML Schema types not tree matching. I've given sample queries in the past on this list that show why named typing makes more sense than tree matching[0]. Here's the query again, given the following schema <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" targetNamespace="http://www.example.com" xmlns:myns="http://www.example.com"> <xs:element name="foo" type="myns:fooType" /> <xs:complexType name="fooType" > <xs:element name="bar" minOccurs="3" maxOccurs="6" /> </xs:complexType> </xs:schema> and the query schema namespace myns="http://www.example.com"; at "http:/www.example.com/foo.xsd" $foo = <myns:foo>{ document("http://www.example.org/bar.xml")//myns:bar }</myns:foo> $foo instance of element of type myns:fooType What is the result? i) NAMED TYPING ANSWER: False, because the $foo variable has type xs:anyType until validation has been performed on it to confirm that it matches the schema. ii) TREE MATCHING ANSWER: True or False depending on contents of document at http://www.example.org/bar.xml. Basically the equivalent of validation occurs implicitly at runtime any time a type needs to be inferred. [0] http://lists.xml.org/archives/xml-dev/200207/msg01024.html -- PITHY WORDS OF WISDOM Old cars never die, they just smell that way. This posting is provided "AS IS" with no warranties, and confers no rights.
|
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
|