Page 1 of 1

XPath evaluation on xsl stylesheets

Posted: Wed Apr 14, 2004 6:12 pm
by sherkin
Hi everybody,

I'd like to use the XPath box to select template headers
(in a valid stylesheet), with :

//xsl:template/@name

But :? all I get is an error message about unresolved namespace.

And when I ask :
/*
I get the root element of the associated xml file :roll:
In fact all XPath expressions I type are evaluated in that xml document's context...

What's the matter ?

TIA

Sherkin

Posted: Wed Apr 14, 2004 7:47 pm
by Dan
The Xpath expressions are executed against the XML document associated to the stylesheet in order to make easy the design of the xsl:template "match" expressions. In this way you can evaluate the result of a match without the need of switching to the XML document.

Posted: Wed Apr 14, 2004 7:49 pm
by george
Hi Sherkin,

When editing a stylesheet the XPath works on the document selected as XML input in the associated transformation scenario. To get it to work on the stylsheet itself you can configure and associate a transformation scenario that has the same stylseet as input.

Best Regards,
George