|
next
|
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
|
|
|