Subject: Need XML tags too
From: "Sharmila Pandith" <sharmila@xxxxxxxxx>
Date: Mon, 3 May 1999 17:07:50 -0400
|
Hi,
I have the following code in the first xml file.
<coding>
<transportation>
<auto>
<auto_side value="sell">sell</auto_side>
<auto_category value="used">used</auto_category>
<auto_year>1991</auto_year>
<auto_make>Saab</auto_make>
<auto_model>900 Convertible</auto_model>
<auto_mileage>72000</auto_mileage>
<auto_price>$13,900</auto_price>
<auto_exterior>white</auto_exterior>
<auto_interior>gray leather</auto_interior>
<auto_body value="convertible">convertible</auto_body>
<auto_vin>372AB918098910X</auto_vin>
</auto>
</transportation>
</coding>
I would like to reproduce
<auto_side value="sell">sell</auto_side>
<auto_category value="used">used</auto_category>
<auto_year>1991</auto_year>
<auto_make>Saab</auto_make>
<auto_model>900 Convertible</auto_model>
<auto_mileage>72000</auto_mileage>
<auto_price>$13,900</auto_price>
<auto_exterior>white</auto_exterior>
<auto_interior>gray leather</auto_interior>
<auto_body value="convertible">convertible</auto_body>
<auto_vin>372AB918098910X</auto_vin>
in my second xml.
So, I wrote the following code:
<xsl:for-each select="advertisement/coding/transportation/auto">
<auto>
<xsl:apply-templates/>
</auto>
</xsl:for-each>
This gives me:
sell
used
1991
Saab
900 Convertible
72000
$13,900
white
gray leather
convertible
372AB918098910X
but not the xml tags.
Does anyone know how to get the XML tags too.
Thanks in advance,
S P
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|