[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: Identity and Modified identity transforms

Subject: RE: Identity and Modified identity transforms
From: "Michael Kay" <mike@xxxxxxxxxxxx>
Date: Mon, 3 Dec 2007 10:31:52 -0000
RE:  Identity and Modified identity transforms
> 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

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Cast Your Vote

We need your help – Vote for DataDirect XML Products!

  • Best SOA or XML site

Winners and finalists announced at SOA World Conference in November.

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2007 All Rights Reserved.