XML Editor
Sign up for a WebBoard account Sign Up Keyword Search Search More Options... Options
Chat Rooms Chat Help Help News News Log in to WebBoard Log in Not Logged in
Show tree view Topic
Go to previous topicPrev TopicGo to next topicNext Topic
Postnext
Zhen WangSubject: About typing system for XQuery in Stylus
Author: Zhen Wang
Date: 22 Oct 2006 05:06 AM
Is the typing system for XQuery in Stylus implemented according to the formal semantics of XQuery (http://www.w3.org/TR/xquery-semantics/)?
If so, which version is it?
Are those typing rules encoded in the implementation?

Thank you

Postnext
(Deleted User) Subject: About typing system for XQuery in Stylus
Author: (Deleted User)
Date: 23 Oct 2006 10:33 AM
The internal XQuery processor implements the latest XQuery specs (June 8th 2006), including the formal semantics; it doesn't implement the optional "static typing" feature.

>Are those typing rules encoded in the implementation?

I am not sure I understand what you mean by "encoded in the implementation"; if you are hoping that the schema types are loaded at runtime from a set of data files, this is not true.

Hope this helps,
Alberto

Postnext
Zhen WangSubject: About typing system for XQuery in Stylus
Author: Zhen Wang
Date: 23 Oct 2006 11:04 AM
So, even if the users speify an XML Schema for an XQuery expression, the Stylus implementation will not load type information from the XML Schema, and it will not do static type analysis, is it?

Thanks.

Postnext
(Deleted User) Subject: About typing system for XQuery in Stylus
Author: (Deleted User)
Date: 23 Oct 2006 11:19 AM
>So, even if the users speify an XML Schema for an XQuery
>expression, the Stylus implementation will not load
>type information from the XML Schema, and it will not do
>static type analysis, is it?

No, the internal XQuery processor *does* support the "schema import" feature (chapter 5.2.1 of the specs),
so if you have a query with a "import schema '...' at '...'" expression, the schema will be loaded and the types will be available during the evaluation.
The "static typing" feature (chapter 5.2.3 of the specs) is the capability of detecting run-time errors even before evaluation starts: e.g. if a loaded schema defines a 'book' type that has 'title' and 'subject' as child elements, and the query contains an XPath expression //book/author, that expression can be replaced with an empty sequence, as 'author' is not defined as valid child of 'book'. The internal XQuery processor will not perform such optimization and will have to run the query in any case.
If you need to use a processor that supports the "static typing" feature, have a look at the DataDirect XQuery processor (http://www.datadirect.com/products/xquery/index.ssp)

Hope this helps,
Alberto

Posttop
Zhen WangSubject: About typing system for XQuery in Stylus
Author: Zhen Wang
Date: 23 Oct 2006 10:45 PM
Thank you very much. It's very clear. :)

 
Go to previous topicPrev TopicGo to next topicNext Topic
Download A Free Trial of Stylus Studio 6 XML Professional Edition Today! Powered by Stylus Studio, the world's leading XML IDE for XML, XSLT, XQuery, XML Schema, DTD, XPath, WSDL, XHTML, SQL/XML, and XML Mapping!  
go

Log In Options

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