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
Chuck WhiteSubject: Weird XQuery results?
Author: Chuck White
Date: 17 Mar 2003 06:41 PM
It seems to me that the following simple XQuery should return nothing, because the expression is calling for the parent node, and there can't be a parent node of the root node, which is the context node at the time the query is being initialized. However, in Stylus, it actually does return something -- the entire XML document:

let $i := (..) return $i

Postnext
Richard CrawfordSubject: Richard Crawford FedEx Trade Networks is out of the office.
Author: Richard Crawford
Date: 18 Mar 2003 12:44 AM
I will be out of the office starting 03/14/2003 and will not return until
03/31/2003.

I will respond to your message when I return. If you require immediate
attention please e-mail EC_Support@fedex.com

Posttop
Alberto MassariSubject: Weird XQuery results?
Author: Alberto Massari
Date: 18 Mar 2003 06:08 AM
Hi Chuck,

the XQuery specs is not so clear about what is the current context node at startup; our choice was to set the document element as the startup context node, so the ".." axis will return the document node.

Hope this helps,
Alberto

 
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.