[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: Moving elements of place
Hi Beatriz > -----Mensagem original----- > De: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx > [mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx] Em nome de > beatrizlangiano > Enviada: segunda-feira, 17 de Março de 2003 17:12 > Para: xsl-list@xxxxxxxxxxxxxxxxxxxxxx > Cc: xsl-list@xxxxxxxxxxxxxxxxxxxxxx > Assunto: Re: Moving elements of place > > > Hi Mike, this template exclude all elements child of > XMI.content, and I don't want this. > In this example, I want exlcude only > Foundation.Core.ModelElement.name. The best way, has sugested by Mike, is to use the identity template and change a bit on the those you want to be diferent: <xsl:template match="@*|node()"> <xsl:copy> <xsl:apply-templates select="@*|node()"/> </xsl:copy> </xsl:template> <xsl:template match="XMI.content"> <xsl:copy> <xsl:apply-templates select="@*|node()"/> </xsl:copy> <!-- now just select your node in a diferent mode --> <xsl:apply-templates select="Model_Management.Model/Foundation.Core.ModelEleme" mode="NewCopy"/> </xsl:template> <!-- this will ignore all 'Foundation.Core.ModelEleme' nodes --> <xsl:template match="Foundation.Core.ModelEleme"/> <!-- this will do whatever you want it to do --> <xsl:template match="Foundation.Core.ModelEleme" mode="NewCopy"> <!-- just reapply-templates to the corrent node --> <xsl:apply-templates select="."/> <!-- you also could use <xsl:copy-of select="."/> --> </xsl:template> Hope that this helps you XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
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
|