Subject: RE: [xsl] Identity and Modified identity transforms From: "Michael Kay" <mike@xxxxxxxxxxxx> Date: Mon, 3 Dec 2007 10:31:52 -0000 |
> I've aways considered the "Modified Identity" pattern to be > the identity template that walks the following sibling axis: > > <xsl:template match="node()"> > <xsl:copy> > <xsl:copy-of select="@*"/> > <xsl:apply-templates select="node()[1]"/> > </xsl:copy> > <xsl:apply-templates select="following-sibling::*[1]"/> > </xsl:template> > I usually use "modified identity transform" to mean an identity template supplemented by additional templates for specific nodes" - but of course the term is very general and could mean anything. The pattern above is one I usually refer to as "sibling recursion". Since that also covers use of any templates in a sibling-based tree walk, it should perhaps be "sibling recursion using identity template". I don't think you should be mixing "node()" and "*" like that... Michael Kay http://www.saxonica.com/
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] Identity and Modified identit, Andrew Welch | Thread | Re: [xsl] Identity and Modified ide, Andrew Welch |
[xsl] Identity and Modified identit, Andrew Welch | Date | Re: [xsl] Identity and Modified ide, Andrew Welch |
Month |