Subject:Setting Context for XPath Queries? Author:Randy Booth Date:27 Feb 2008 10:20 PM
I was curious if anyone could tell me if there is a way to set the context for Xpath queries? I get along pretty good without being able to do this, but I was curious if it can be done...
Subject:Setting Context for XPath Queries? Author:Minollo I. Date:27 Feb 2008 10:30 PM
You mean in the XPath evaluator available as part of the XML editor? Yes, just click on a specific element in the source, and try executing ".", for example.
Subject:Setting Context for XPath Queries? Author:Randy Booth Date:27 Feb 2008 10:38 PM
What I was talking about was when I was opening up the xpath query editor against an XML document... In my XSLT documents I often use <xsl:template match="(some node)"> to set the context for the evaluations that I'm performing in that template. When I run the XPath query editor against the source XML file I usually have to run my queries with // or by specifying the entire path. I was curious if there was a way to tell the xpath query editor to only evaluate a certain portion of the xml document when doing it's queries.
Subject:Setting Context for XPath Queries? Author:Minollo I. Date:27 Feb 2008 10:46 PM
...yes, that's the question that I think I answered. Clicking on the source panel on a specific element, attribute or text is the action which sets the context for the execution of the XPath.