Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: [xsl] Recursive substitution

From: David Carlisle <davidc@--------->
To:
Date: 11/4/2005 9:29:00 PM
> Output Expected XML:

The code I supplied last time gives that output on your new input file.

The only difference is that you have changed from wanting just the text
of the name attribute to a copy of the node, so change

Register: <xsl:value-of select="@name"/>

to

<xsl:copy-of select="."/>



<xsl:stylesheet version="2.0"
              xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

<xsl:key name="r" match="define" use="@name"/>

<xsl:template match="x">
 <xsl:apply-templates select="block"/>
</xsl:template>

<xsl:template match="reg">
<xsl:copy-of select="."/>
</xsl:template>

<xsl:template match="ref">
 <xsl:apply-templates select="key('r',@name)"/>
</xsl:template>

</xsl:stylesheet>


________________________________________________________________________
This e-mail has been scanned for all viruses by Star. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
________________________________________________________________________


transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent