[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Moving elements of place

Subject: Re: Moving elements of place
From: "beatrizlangiano" <beatrizlangiano@xxxxxxxxxx>
Date: Mon, 17 Mar 2003 14:11:58 -0300
xslt moving elements
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

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.