P
Puzzled
http://www.biglist.com/lists/xsl-list/archives/200303/msg01242.html purports
to show how xslt can be used to copy all of an xhtml file & selectively
transform certain nodes. The copy works fine on its own, buit when I try to
follow the example and add another template to replace <navbar> with some
text stored in Navigation.htm, it seems to have no effect. Can some one
explain what I'm doing wrong? My XSLT stylesheets is included below.
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:include href="Navigation.htm" />
<xsl
utput method="xml" indent="no"/>
<xsl:template match="@*|node()">
<xsl:copy>
<xsl:apply-templates select="@*|node()"/>
</xsl:copy>
</xsl:template>
<xsl:template match="navbar">
<xsl:copy>
<p>
<xsl:call-template name="topNavigation" />
</p>
<xsl:apply-templates select="node() != 'navbar'"/>
</xsl:copy>
</xsl:template>
</xsl:stylesheet>
to show how xslt can be used to copy all of an xhtml file & selectively
transform certain nodes. The copy works fine on its own, buit when I try to
follow the example and add another template to replace <navbar> with some
text stored in Navigation.htm, it seems to have no effect. Can some one
explain what I'm doing wrong? My XSLT stylesheets is included below.
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:include href="Navigation.htm" />
<xsl
<xsl:template match="@*|node()">
<xsl:copy>
<xsl:apply-templates select="@*|node()"/>
</xsl:copy>
</xsl:template>
<xsl:template match="navbar">
<xsl:copy>
<p>
<xsl:call-template name="topNavigation" />
</p>
<xsl:apply-templates select="node() != 'navbar'"/>
</xsl:copy>
</xsl:template>
</xsl:stylesheet>