W3C home > Mailing lists > Public > xmlschema-dev@w3.org > May 2009

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>
>   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
Received on Friday, 15 May 2009 09:23:39 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 23:15:51 UTC