D
daz_oldham
Hi
I have done the folloing XSLT and although it does write out my
elements as I want, it is also writing out ALL of the information in
the child nodes and attributes as it loops around.
Any ideas would be greatly appreciated - I am sure it is something
tiny!
Best regards and many thanks
Darren
<?xml version="1.0" encoding="iso-8859-1" ?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:ns1="http://www.someurl.com/abc/2002/09"
<xsl:template
match="ns1:ABC_AccomAvailRS/ns1:AccommodationSearchResponse/ns1:Accommodations">
This is the start of our XSLT Transformation.<br />
<xsl:for-each select="ns1:AccommodationSegment">
<div name="dvHotelName"
style="background-color:#0033FF;padding:2px">
<xsl:value-of select="@AccommodationName"/> - <xsl:value-of
select="@OfficialRating"/>
</div>
<xsl:apply-templates />
<b>
<xsl:value-of select="ns1escription"/>
</b>
</xsl:for-each>
<br />End of the XSLT Transformation
</xsl:template>
<xsl:template match="ns1:Image[1]">
<img src="{@ThumbnailURL}" />
</xsl:template>
</xsl:stylesheet>
I have done the folloing XSLT and although it does write out my
elements as I want, it is also writing out ALL of the information in
the child nodes and attributes as it loops around.
Any ideas would be greatly appreciated - I am sure it is something
tiny!
Best regards and many thanks
Darren
<?xml version="1.0" encoding="iso-8859-1" ?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:ns1="http://www.someurl.com/abc/2002/09"
<xsl:template
match="ns1:ABC_AccomAvailRS/ns1:AccommodationSearchResponse/ns1:Accommodations">
This is the start of our XSLT Transformation.<br />
<xsl:for-each select="ns1:AccommodationSegment">
<div name="dvHotelName"
style="background-color:#0033FF;padding:2px">
<xsl:value-of select="@AccommodationName"/> - <xsl:value-of
select="@OfficialRating"/>
</div>
<xsl:apply-templates />
<b>
<xsl:value-of select="ns1escription"/>
</b>
</xsl:for-each>
<br />End of the XSLT Transformation
</xsl:template>
<xsl:template match="ns1:Image[1]">
<img src="{@ThumbnailURL}" />
</xsl:template>
</xsl:stylesheet>