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

RE: Validating XPath queries

From: Michael Kay <mike@saxonica.com>
Date: Fri, 15 May 2009 10:23:02 +0100
To: "'Paul Steckler'" <Paul.Steckler@nicta.com.au>, <xmlschema-dev@w3.org>
Message-ID: <87A965CF59DA49C0803B31765F6CEB95@Sealion>
RE: Validating XPath queries
 
> 
>   Does anyone know of a tool that validates XPath queries 
> against XML schemas?  For a given schema, a query is valid if 
> there exists a document valid in the schema for which the 
> query returns at least one result.

Sure, Saxon-SA does this as part of schema-aware XSLT and XQuery processing,
and the functionality could be packaged to do what you are asking. Well, it
does almost this: Given an XPath expression and a schema type (typically a
complex type), Saxon will tell you whether the expression is capable of
selecting anything when applied to a context node of that type.
> 
>    I've seen mention on this list of XPath somehow 
> incorporated into XML Scheme 1.1.  Does that capability 
> obviate the value of such a tool?
> 

No, the fact that XSD uses XPath for defining assertions doesn't directly
help with your requirement.

Michael Kay
http://www.saxonica.com/
Received on Friday, 15 May 2009 09:23:39 GMT

Subscribe to the Stylus Scoop newsletter for helpful XML tips and tutorials.
Email
First Name
Last Name
Company

Download Stylus Studio 6 XML Enterprise Edition

Subscribe in XML format
RSS 2.0
Atom 0.3
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-2007 All Rights Reserved.