[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: "Andrew Welch" <andrew.j.welch@xxxxxxxxx>
Date: Mon, 3 Dec 2007 10:40:33 +0000
Re:  Identity and Modified identity transforms
> 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

PURCHASE STYLUS STUDIO ONLINE TODAY!

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

Buy Stylus Studio Now

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-2013 All Rights Reserved.