RE: [xsl] Xml to Xml

Subject: RE: [xsl] Xml to Xml
From: "Michael Kay" <mhk@xxxxxxxxx>
Date: Fri, 31 Oct 2003 13:13:42 -0000
Write an identity template rule that copies elements:

<xsl:template match="*">
<xsl:copy>
<xsl:copy-of select="@*"/>
<xsl:apply-templates/>
</xsl:copy>
</xsl:template>

And an empty template rule that skips the others:

<xsl:template match="V|U"/>

Michael Kay

> -----Original Message-----
> From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx 
> [mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of 
> poppe chris
> Sent: 31 October 2003 12:20
> To: XSL-List@xxxxxxxxxxxxxxxxxxxxxx
> Subject: [xsl] Xml to Xml
> 
> 
> 
> 
> Hello i want to converse an xml doc to an other one but 
> leaving out some 
> elements, ive tried several ways but it just wont work,
> 
> here's what the original xml looks like
> <?xml version="1.0"?>
> <Bitstream xml:base="../CONTENT/final.yuv" 
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; xmlns="YUV" 
> xmlns:yuv="YUV" xsi:schemaLocation="YUV 
> file:/D:/school/DIA-BSDL-1%5B1%5D.1/DELIVERY_2003_08_13/BSDLSo
urce/../CONTENT/SCHEMAS/YUV.xsd">
	<Frame>
		<Y>
			<Ysample>0 811008</Ysample>
		</Y>
		<V>
			<Vsample>811008 405504</Vsample>
		</V>
		<U>
			<Usample>1216512 405504</Usample>
		</U>
	</Frame>
	<Frame>
		<Y>
			<Ysample>1622016 811008</Ysample>
		</Y>
		<V>
			<Vsample>2433024 405504</Vsample>
		</V>
		<U>
			<Usample>2838528 405504</Usample>
		</U>
	</Frame>
</Bitstream>

now i want the same but withouth the V and U elements and their children

thus something like
<Bitstream ...>
  <Frame>
     <Y>   <Ysample>...</Ysample></Y>
  </Frame>
  ...
</Bitstream>

thanks in advance,
Chris

_________________________________________________________________
Volg Expeditie Robinson op de voet! 
http://entertainment.msn.be/tv/expeditierobinson/


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


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


Current Thread