
June 10th, 2003, 03:55 PM
|
|
Junior Member
|
|
Join Date: Jun 2003
Posts: 2
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
|
XML newbie -- handling one element differently
This is probably obvious, but I cannot get it to work, after having tried various approaches. The following stylesheet will bascilly copy everything from the source to the target. What I need to do is way to trap if the current node is a table tag (I am transforming xhtml) and pass that off to a separate section of the xsl document. I know the name() function will get me the name of the current node, but I can't seem to get the test working properly. Thanks in advance for any assistance to a struggling newcomer!
<?xml version="1.0"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/ | @* | node()">
<xsl:copy>
<xsl:apply-templates select="@* | node()"/>
</xsl:copy>
</xsl:template>
</xsl:stylesheet>
|