I am just getting to grips with XML and I was wondering if you could help me
with something that no-one seems able or willing to help with..
I have an XSLT file which should be transforming a straight XML file
http://www.discovertravelandtours.co...cation=Germany
To another XML file
http://www.discovertravelandtours.co...cation=Germany
As you can see the second one is not being output with the element names I
have defined in the XSLT, its just plain text.
The XSLT is given below, all I need is a bit of info on how to make it
output in the same way as the original file (plain xml).
<?xml version="1.0" encoding="UTF-8"?>
<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 = "/">
<xsl:for-each select="Booking/segment">
<xsl:element name="res">
<xsl:value-of select="ReservationNumber" />
</xsl:element>
<xsl:element name="Nights">
<xsl:value-of select="NumberofDays" />
</xsl:element>
<xsl:element name="MAdults">
<xsl:value-of select="NumberofMaleAdults" />
</xsl:element>
<xsl:element name="FAdults">
<xsl:value-of select="NumberofFemaleAdults" />
</xsl:element>
<xsl:element name="MChildren">
<xsl:value-of select="NumberofMaleChildren" />
</xsl:element>
<xsl:element name="FChildren">
<xsl:value-of select="NumberofFemaleChildren" />
</xsl:element>
<xsl:element name="From">
<xsl:value-of select="From" />
</xsl:element>
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>
Thanks in advance