[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: what parsers support xml schema

  • To: "Murali Mani" <mani@C...>
  • Subject: RE: what parsers support xml schema
  • From: "Dare Obasanjo" <dareo@m...>
  • Date: Fri, 30 Aug 2002 15:03:51 -0700
  • Cc: "Maciejewski, Thomas" <Thomas.Maciejewski@l...>,<xml-dev@l...>
  • Thread-index: AcJQbyA/YjdBUZJLQaeofwCeBnUrIgAAFdQg
  • Thread-topic: what parsers support xml schema

top
  
> -----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!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.