XPath evaluation on xsl stylesheets

Having trouble installing Oxygen? Got a bug to report? Post it all here.
sherkin

XPath evaluation on xsl stylesheets

Post 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
Dan
Posts: 501
Joined: Mon Feb 03, 2003 10:56 am

Post 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.
george
Site Admin
Posts: 2095
Joined: Thu Jan 09, 2003 2:58 pm

Post 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
Post Reply