Subject: Re: [xsl] Identity and Modified identity transforms From: "Andrew Welch" <andrew.j.welch@xxxxxxxxx> Date: Mon, 3 Dec 2007 10:40:33 +0000 |
> 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...
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] Identity and Modified ide, Michael Kay | Thread | RE: [xsl] Identity and Modified ide, Michael Kay |
RE: [xsl] Identity and Modified ide, Michael Kay | Date | RE: [xsl] Identity and Modified ide, Michael Kay |
Month |