Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: Sort money field with msxml

From: "Dimitre Novatchev" <dimitren@---.---.-->
To: NULL
Date: 6/5/2007 8:16:00 AM

Use the transform-and-sum template of FXSL.

Just search for "transform-and-sum"


Cheers,
Dimitre Novatchev


<hugo.calzada@g...> wrote in message 
news:1181036056.013418.151880@q......
I have the next xsl. This xsl try to sort a xml by a number
field(impbas). But this number has spanish format, so it use comma
instead of point (Ej.: 999,05 ? not 999.05 ?).
When I use the msxml parser, the sorting doesn't works, but if I use
the XMLSpy own parser, it works.
Any help? thank you-


---------------------- inicio: XSL ------------------------------

<?xml version="1.0" encoding="utf-16"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
       <xsl:template match="/">
               <table width="692px" border="0" cellpadding="2"
cellspacing="0">
                       <tr>
                               <td class="Cabeceras">Hotel </td>
                               <td class="Cabeceras">
                                       <img src="../imagenes/
spacer.gif" width="1" height="1"/>
                               </td>
                       </tr>
                       <tr>
                               <td colspan="8">
                                       <img src="../imagenes/
spacer.gif" width="1" height="5"/>
                               </td>
                       </tr>
                       <xsl:for-each select="/
DisponibilidadHotelRespuesta/infhot">
                               <xsl:sort data-type="number"
select="impbas" order="ascending"/>
                               <tr>
                                       <td>
                                               <xsl:value-of
select="nomser"/>
                                       </td>
                                       <td class="Registros"
align="right">
                                               <xsl:value-of
select="impbas"/>
                                       </td>
                               </tr>
                       </xsl:for-each>
               </table>
       </xsl:template>
</xsl:stylesheet>

---------------------- fin: XSL ------------------------------

---------------------- inicio: XML ------------------------------
<DisponibilidadHotelRespuesta>
       <infhot>
               <nomser>HOTEL ROYAL PLAZA</nomser>
               <impbas>777,6</impbas>
       </infhot>
       <infhot>
               <nomser>HOTEL IBIZA PLAYA</nomser>
               <impbas>436,5</impbas>
       </infhot>
       <infhot>
               <nomser>HOTEL EL CORSO</nomser>
               <impbas>665,4</impbas>
       </infhot>
       <infhot>
               <nomser>HOTEL EL PUERTO</nomser>
               <impbas>705,6</impbas>
       </infhot>
       <infhot>
               <nomser>HOTEL LOS MOLINOS</nomser>
               <impbas>636,3</impbas>
       </infhot>
       <infhot>
               <nomser>HOTEL PISCIS PARK</nomser>
               <impbas>384,6</impbas>
       </infhot>
       <infhot>
               <nomser>HOTEL TRES TORRES</nomser>
               <impbas>693</impbas>
       </infhot>
       <infhot>
               <nomser>HOTEL TORRE DEL MAR</nomser>
               <impbas>674,1</impbas>
       </infhot>
       <infhot>
               <nomser>HOTEL SOL IBIZA</nomser>
               <impbas>714</impbas>
       </infhot>
       <infhot>
               <nomser>HOTEL S ARGAMASSA SOL</nomser>
               <impbas>714</impbas>
       </infhot>
       <infhot>
               <nomser>HOTEL PINET PLAYA SOL</nomser>
               <impbas>630</impbas>
       </infhot>
       <infhot>
               <nomser>HOTEL PUEBLO IBIZA</nomser>
               <impbas>411,6</impbas>
       </infhot>
       <infhot>
               <nomser>HOTEL DON QUIJOTE</nomser>
               <impbas>271,8</impbas>
       </infhot>
       <infhot>
               <nomser>HOTEL ARGOS</nomser>
               <impbas>630</impbas>
       </infhot>
       <infhot>
               <nomser>HOTEL MARE NOSTRUM</nomser>
               <impbas>579</impbas>
       </infhot>
       <infhot>
               <nomser>HOTEL CLUB STELLA MARIS PARAISO</nomser>
               <impbas>394,8</impbas>
       </infhot>
       <infhot>
               <nomser>HOTEL SIMBAD</nomser>
               <impbas>638,4</impbas>
       </infhot>
       <infhot>
               <nomser>HOTEL BERGANTIN</nomser>
               <impbas>533,1</impbas>
       </infhot>
       <infhot>
               <nomser>INVISA HOTEL LA CALA</nomser>
               <impbas>598,2</impbas>
       </infhot>
       <infhot>
               <nomser>APARTHOTEL CLUB GARBI</nomser>
               <impbas>547,8</impbas>
       </infhot>
       <infhot>
               <nomser>CLUB TARIDA BEACH</nomser>
               <impbas>911,1</impbas>
       </infhot>
       <infhot>
               <nomser>INVISA HOTEL ES PLA</nomser>
               <impbas>537,6</impbas>
       </infhot>
       <infhot>
               <nomser>HOTEL VICTORIA</nomser>
               <impbas>453,6</impbas>
       </infhot>
       <infhot>
               <nomser>HOTEL PLAYA IMPERIAL</nomser>
               <impbas>529,2</impbas>
       </infhot>
       <infhot>
               <nomser>HOTEL MIAMI</nomser>
               <impbas>576,3</impbas>
       </infhot>
       <infhot>
               <nomser>HOTEL HAWAII IBIZA</nomser>
               <impbas>564,3</impbas>
       </infhot>
       <infhot>
               <nomser>HOTEL CLUB GOLETA/TRES CARABELAS</nomser>
               <impbas>756</impbas>
       </infhot>
       <infhot>
               <nomser>APTOS. CENTRAL PARK</nomser>
               <impbas>380,55</impbas>
       </infhot>
       <infhot>
               <nomser>HOTEL NAUTILUS</nomser>
               <impbas>665,4</impbas>
       </infhot>
       <infhot>
               <nomser>HOTEL CLUB HOTEL PORTINATX</nomser>
               <impbas>536,4</impbas>
       </infhot>
       <infhot>
               <nomser>HOTEL S ARGAMASSA PALACE</nomser>
               <impbas>1092</impbas>
       </infhot>
       <infhot>
               <nomser>APARTHOTEL NEREIDA</nomser>
               <impbas>487,2</impbas>
       </infhot>
       <infhot>
               <nomser>GRAN HOTEL PALLADIUM</nomser>
               <impbas>798</impbas>
       </infhot>
       <infhot>
               <nomser>APARTHOTEL TROPIC GARDEN(IBZ)</nomser>
               <impbas>697,2</impbas>
       </infhot>
       <infhot>
               <nomser>HOTEL SIRENIS CORAL PLAYA</nomser>
               <impbas>462</impbas>
       </infhot>
       <infhot>
               <nomser>APARTAMENTOS MONTEMAR (GLOBALES)</nomser>
               <impbas>254,1</impbas>
       </infhot>
       <infhot>
               <nomser>APARTAMENTOS DUQUESA PLAYA</nomser>
               <impbas>441</impbas>
       </infhot>

</DisponibilidadHotelRespuesta>

---------------------- fin: XML ------------------------------




transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent