[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

[xsl] selection for xsl:copy


Subject: [xsl] selection for xsl:copy
From: "Nyberg, Marcus" <mny@xxxxxxxxx>
Date: Thu, 8 Mar 2001 13:13:11 +0100

Hello!

I'm going to use XSLT to transform one XML-document into another
XML-document. I want to copy all elements from file A (except the element
"archref") to file B.

A.xml

<test>
  <entry colname="blah blah">
    <archref href="e11_34.xml#string(all,"{89308-34234-39840A}") ">
       <unitid>e11/34</unitid>
    </archref>
  </entry>
  <entry colname="blah blah"> '{4243234-AB34435-30008}' 
  </entry>
  <entry colname="blah blah"> '{8434222-C24214-E32323}'
 </entry>
</test>

B.xml

<test>
  <entry colname="blah blah">
  </entry>
  <entry colname="blah blah"> '{4243234-AB34435-30008}' 
  </entry>
  <entry colname="blah blah"> '{8434222-C24214-E32323}'
 </entry>
</test>


I was thinking of using something like the following XSLT to make the
transformation

 <xsl:template match="@*|*|text()">
   <xsl:copy> 
     <xsl:apply-templates select="@*|*|text()"/>
   </xsl:copy>
 </xsl:template>

I need your help to make the XSLT that copies all elements except the
archref-element.

Regards!

/Marcus





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



Current Thread
Keywords