[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Copying parent nodes with different selection of
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0"> <xsl:output indent="yes" /> <xsl:variable name="copy-me"> <Header> <Meta /> </Header> <Body> <Document> <Preceding-1 /> <Preceding-2 /> <Make-Toute-Seul-1 /> <Make-Toute-Seul-2 /> <Make-Toute-Seul-3 /> <Following-1 /> <Following-2 /> </Document> </Body> </xsl:variable> <xsl:template match="/"> <xsl:apply-templates select="$copy-me/*"/> </xsl:template> <xsl:template match="Body"> <xsl:variable name="x" select="Document/*[starts-with(name(),'Make-Toute-Seul-')]"/> <xsl:copy> <xsl:for-each select="$x"> <Document> <xsl:copy-of select="(../* except $x)|."/> </Document> </xsl:for-each> </xsl:copy> </xsl:template> </xsl:stylesheet>
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|