[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: Américo Albuquerque <aalbuquerque@xxxxxxxxxxxxxxxx>
Date: Tue, 18 Mar 2003 10:28:49 -0000
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


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.