Altova Mailing List Archives>Archive Index >xsl-list Archive Home >Recent entries >Thread Prev - [xsl] Identity and Modified identity transforms [Thread Next] Re: [xsl] Identity and Modified identity transformsTo: Date: 12/3/2007 10:41:00 AM > I don't think you should be mixing "node()" and "*" like that...
:) nope.... sorry about that, I should've changed it after cutting and
pasting from the example (or got it right in the first place).
The proper [insert name here] should use node(), and possibly
apply-templates to attributes and contain an attribute template to
allow overriding:
<xsl:template match="node()">
<xsl:copy>
<xsl:apply-templates select="@*|node()[1]"/>
</xsl:copy>
<xsl:apply-templates select="following-sibling::node()[1]"/>
</xsl:template>
<xsl:template match="@*">
<xsl:copy-of select="."/>
</xsl:template>
Maybe the extra template isn't needed and could be incorporated into
the main template?
I don't know of the top of my head what node()[1] would do if the
currrent node was an attribute... | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
