|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] check if nodes match xpath expression
Dear all,
we have produced a simple stylesheet that transforms an XML document
into a simple HTML document, with tags in colours, etc. (like the IE5
default stylesheet).
We also have a parameter containing an xpath expression that can be
applied to the XML file. We want to highlight nodes in the translated
HTML page that match the xpath expression, e.g. the stylesheet looks
like this:
<xsl:param name="xpath"/>
....
<xsl:template match="node()">
..
</xsl:template>
This problem seems to appear in different forms in the FAQ but I
couldn't find a proper solution. I know that
<xsl:template match="$xpath">..</..>
won't work. Similarly,
<xsl:template match="node()">
<xsl:choose>
<xsl:when test="somefunc(.,$xpath)"/>
</xsl:choose>
</xsl:template>
to check whether the current node matches the xpath, since there is no
such function.
Has anyone had a similar problem?
Thanks,
Christian
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
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
|

Cart








