Re: [xsl] Moving elements of place

Subject: Re: [xsl] Moving elements of place
From: "beatrizlangiano" <beatrizlangiano@xxxxxxxxxx>
Date: Mon, 17 Mar 2003 14:11:58 -0300
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. 
How can I do this? 

<xsl:template match="XMI.content">
    <xsl:copy>
      <xsl:apply-templates 

select="@*|node()[not
(self::Model_Management.Model/Foundation.Core.ModelElemen
t.name)]"/> 
    </xsl:copy>
    <xsl:apply-templates 
select="Model_Management.Model/Foundation.Core.ModelEleme
nt.name"/>  
  </xsl:template>  


PS: if I want exclude ALL instances of an element (they 
appears in anyplace of XMI.content), and copy them at 
the 

end, what I must do? 



 
> This is the third time today that we've suggested this:
> 
> Use the identity transform, as discussed in the XSLT sp
ec under Copying:
> 
>   <xsl:template match="@*|node()">
>     <xsl:copy>
>       <xsl:apply-templates select="@*|node()"/>
>     </xsl:copy>
>   </xsl:template>
> 
> This will result in a recursive copy of all nodes.
> 
> Add to it a template that matches the nodes you want to
 treat specially:
> 
>   <xsl:template match="XMI.content">
>     <xsl:copy>
>       <xsl:apply-templates select="@*|node()[not
(self::foo)]"/>
>     </xsl:copy>
>     <xsl:apply-templates select="foo"/>
>   </xsl:template>
> 
> In this case, you're excluding the 'foo' element chilre
n of the 'XMI.content'
> element from being processed until after the copy of th
e XMI.content element
> is made.
> 
> Mike
> 
> -- 
>   Mike J. Brown   |  http://skew.org/~mike/resume/
>   Denver, CO, USA |  http://skew.org/xml/
> 
>  XSL-
List info and archive:  http://www.mulberrytech.com/xsl/x
sl-list
> 
> 

 
__________________________________________________________________________
E-mail Premium BOL
Antivírus, anti-spam e até 100 MB de espaço. Assine já!
http://email.bol.com.br/



 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread