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

RE: transforming XML into XML using XSLT.

Subject: RE: transforming XML into XML using XSLT.
From: "Shaikh, Neelkamal (MED, Oracle)" <Neelkamal.Shaikh@xxxxxxxxxx>
Date: Tue, 13 Aug 2002 16:49:16 -0500
xml to xml using xslt
Thank you.
Please find below the Input XML file , Required Output XML file and the
XSLT I had developed.


Input XML File

<?xml version="1.0" encoding="ISO-8859-1"?>
<?xml-stylesheet type="text/xsl" href="designCatalog.xsl"?>
<catalog>
	<cd>
		<title>Empire Burlesque</title>
		<artist>Bob Dylan</artist>
		<country>USA</country>
		<company>Columbia</company>
		<price>10.90</price>
		<year>1985</year>
	</cd>
	<cd>
		<title>Hide your heart</title>
		<artist>Bonnie Tyler</artist>
		<country>UK</country>
		<company>CBS Records</company>
		<price>9.90</price>
		<year>1988</year>
	</cd>
</catalog>


Required Output XML.


<?xml version="1.0" encoding="ISO-8859-1"?>
<catalog>
	<cd>
		<title>Empire Burlesque</title>
		<artist>Bob Dylan</artist>
	</cd>
	<cd>
		<title>Hide your heart</title>
		<artist>Bonnie Tyler</artist>
	</cd>
</catalog>


XSLT used:

<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output type="xml"/>
<xsl:template match="/">
	<catalog>
		<xsl:for-each select="catalog/cd">
		<cd>
			<xsl:value-of select="title"/>
			<xsl:value-of select="artist"/>
		</cd>
		</xsl:for-each>
	</catalog>
</xsl:template>
</xsl:stylesheet>

I don't have an exclusive processor , I am viewing the output in
Internet explorer 5.5.



-----Original Message-----
From: Charles Knell [mailto:cknell@xxxxxxxxxx]
Sent: Tuesday, August 13, 2002 3:48 PM
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: Re:  transforming XML into XML using XSLT.


It would be far easier to give you an example XSLT if you gave us
examples
of "before" and "after" versions of your XML.

-- 
Charles Knell
cknell@xxxxxxxxxx - email


---- "Shaikh, Neelkamal (MED, Oracle)" <Neelkamal.Shaikh@xxxxxxxxxx>
wrote:
> Hi,
> 
> Is it possible to convert XML[having useful +unnecessary data ]
> -----to-----> XML [having Useful data] using XSLT.Could you please
> help
> me out with an example.
> 
> Thanks in advance,
> Neel.
> 
>  XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
> 
>  

 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

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.