xsl-list
[Top] [All Lists]

Simple XML to XML transformation question

2004-11-17 11:06:08
Hi,

I'm basically trying to modify the name of root node element...

with the following XML file...

<?xml-stylesheet type="text/xsl" href="renewal.xsl"?>
<Data>
        <car>Chevy</car>
        <car>Dodge</car>
        <car>Ford</car>
</Data>

How could I change the <Data> element to <Car>

and the <Car> tags to <Model>

My initial attempt at an XSL file was as follows...

<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform";>
<xsl:output method="xml" version="1.0" encoding="iso-8859-1" indent="yes"/>
<xsl:template match="Data">
 <Car>
  <xsl:apply-templates select="Car"/>
 </Car>
</xsl:template>
 <xsl:template match="cd">
 <Model>
 </Model>
</template>
</xsl:stylesheet>

Is seems to output a blank page??

Any ideas guys?

Cheers,

Nick



--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--