[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: XPath and XSD/RNG
The XQuery formal semantics infers types for the result of a path expression based on schema knowledge; if the inferred type is "empty" then the path expression can't select anything. However, the inference rules aren't perfect, in the sense that there are cases where a more precise type could be inferred. It's a while since I looked at them in detail, but IIRC they only deal with downwards axes. Michael Kay http://www.saxonica.com/ > -----Original Message----- > From: Stefan Tilkov [mailto:stefan.tilkov@i...] > Sent: 01 June 2005 16:13 > To: xml-dev@l... > Subject: XPath and XSD/RNG > > Is there a way to check whether an XPath expression could > possibly be > true for a document conforming to a particular W3C XML Schema (or > Relax NG schema) without having access to the document? Is this > something that toolkits support? > > E.g. if the schema disallows /root/element/subelement, the XPath > expression /root/element/subelement[0] cannot yield a > non-null result > for any conforming document. > > Thanks, > Stefan > > -- > Stefan Tilkov, stefan.tilkov@i..., http://www.innoq.com > innoQ Deutschland GmbH, Halskestr. 17, D-40880 Ratingen, Germany > Phone: +49 170 471 2624 Fax: +49 2102 77160-1 > ICQ: 177869128, AIM: stefantilkov, Weblog: > http://www.innoq.com/blog/st/ > > > > ----------------------------------------------------------------- > The xml-dev list is sponsored by XML.org <http://www.xml.org>, an > initiative of OASIS <http://www.oasis-open.org> > > The list archives are at http://lists.xml.org/archives/xml-dev/ > > To subscribe or unsubscribe from this list use the subscription > manager: <http://www.oasis-open.org/mlmanage/index.php> > >
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|