Subject: RE: [xsl] Moving elements of place From: Américo Albuquerque <aalbuquerque@xxxxxxxxxxxxxxxx> Date: Tue, 18 Mar 2003 10:28:49 -0000 |
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: [xsl] 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
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Moving elements of place, beatrizlangiano | Thread | [xsl] Variable Values for Params, email@xxxxxxxxxxxxxx |
[xsl] xsl:variable and creating con, Hesselberth, Jan | Date | RE: [xsl] Re: Documenting XML -and-, Dimitre Novatchev |
Month |