xmlを並べ替えたい
私のxml形式は
<OTA_HotelAvailRS xmlns="http://www.opentravel.org/OTA" EchoToken="" SequenceNmbr="1" Target="Production" TimeStamp="2012-09-28T08:29:44Z" Version="1">
<SummaryResponse>
<AdditionalDetails>
<AdditionalDetail Amount="212,20 EUR" Code="TotalPackagePrice" CurrencyCode="EUR" DecPart="20" IntPart="212" Type="PackageInformation"></AdditionalDetail>
</AdditionalDetails>
</SummaryResponse>
<SummaryResponse>
<AdditionalDetails>
<AdditionalDetail Amount="212,20 EUR" Code="TotalPackagePrice" CurrencyCode="EUR" DecPart="20" IntPart="500" Type="PackageInformation"></AdditionalDetail>
</AdditionalDetails>
</SummaryResponse>
</OTA_HotelAvailRS>
私が使用しているXSLは
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:output method="xml" version="1.0" encoding="iso-8859-1" indent="yes"/>
<xsl:template match="@*|node()">
<xsl:copy>
<xsl:apply-templates select="@*|node()"/>
</xsl:copy>
</xsl:template>
<xsl:template match="OTA_HotelAvailRS">
<xsl:copy>
<xsl:apply-templates select="SummaryResponse/AdditionalDetails">
<xsl:sort select="AdditionalDetail/@IntPart" data-type="number" order="descending"/>
</xsl:apply-templates>
Value of :<xsl:value-of select="AdditionalDetail/@IntPart" />
</xsl:copy>
</xsl:template>
</xsl:stylesheet>
AdditionalDetailのIntPart属性でソートしたい。
誰か助けてください