English | >> Français << | Deutsch | Magyar | 中文 | Polski adultinternetusers > Tutorials > XSLT Tutorial
>> Page 20 << | Précédent | Suivant | Contenu | Index des éléments

Feuille de style XSLT 1 effectue un tri textuel, tandis que Feuille de style XSLT 2 effectue un tri numérique. Notez la différence importante. Dans l'alphabet, 2 vient après 1, de sorte que 2 apparaît après 10 en mode textuel.

Feuille de style XSLT 1

Source Surf
<source>

<car id="11"/>
<car id="6"/>
<car id="105"/>
<car id="28"/>
<car id="9"/>

</source>

Sortie
<TABLE>
  <TR>
     <TH>Car-105</TH>
  </TR>
  <TR>
     <TH>Car-11</TH>
  </TR>
  <TR>
     <TH>Car-28</TH>
  </TR>
  <TR>
     <TH>Car-6</TH>
  </TR>
  <TR>
     <TH>Car-9</TH>
  </TR>
</TABLE>

Vue HTML
Car-105
Car-11
Car-28
Car-6
Car-9
Feuille de style XSLT
<xsl:stylesheet version = '1.0'
     xmlns:xsl='http://www.w3.org/1999/XSL/Transform'>

<xsl:template match="/">
     <TABLE>
          <xsl:for-each select="//car">
               <xsl:sort data-type="text" select="@id"/>
               <TR>
                    <TH>
                         <xsl:text>Car-</xsl:text>
                         <xsl:value-of select="@id"/>
                    </TH>
               </TR>
          </xsl:for-each>
     </TABLE>
</xsl:template>


</xsl:stylesheet>



Feuille de style XSLT 2

Source Surf
<source>

<car id="11"/>
<car id="6"/>
<car id="105"/>
<car id="28"/>
<car id="9"/>

</source>

Sortie
<TABLE>
  <TR>
     <TH>Car-6</TH>
  </TR>
  <TR>
     <TH>Car-9</TH>
  </TR>
  <TR>
     <TH>Car-11</TH>
  </TR>
  <TR>
     <TH>Car-28</TH>
  </TR>
  <TR>
     <TH>Car-105</TH>
  </TR>
</TABLE>

Vue HTML
Car-6
Car-9
Car-11
Car-28
Car-105
Feuille de style XSLT
<xsl:stylesheet version = '1.0'
     xmlns:xsl='http://www.w3.org/1999/XSL/Transform'>

<xsl:template match="/">
     <TABLE>
          <xsl:for-each select="//car">
               <xsl:sort data-type="number" select="@id"/>
               <TR>
                    <TH>
                         <xsl:text>Car-</xsl:text>
                         <xsl:value-of select="@id"/>
                    </TH>
               </TR>
          </xsl:for-each>
     </TABLE>
</xsl:template>


</xsl:stylesheet>


Kevin Carr in Stanton

Natural Skin Care and European Soaps
TickTalk 5
city of stanton
internetusers

City Of Stanton | City Of Stanton | Warren Stanton Council and Gary Taylor Stanton | City Of Stanton |



Take a moment to visit obey clothing or see them on twitter at march madness tournament or view them on facebook at hawaiian luxury shoes.

Take a moment to visit Men's Clothing Product Reviews and free stock videos or see them on twitter at Men's Clothing Product Reviews and free stock videos or view them on facebook at Men's Clothing Product Reviews and free stock videos.

You can also get Organic Skin Care products from Bliss Bath Body and you must check out their Natural Body Lotions and bath soaps

Now if you are looking for the best deals on surf clothing from Quiksilver and Roxy then you have to check these amazing deals here:

Hey, check out this Organic Skin Care European Soaps along with Natural Lavender Body Lotion and shea butter

and we can get surf t shirts surfing shirt and And you must check out this website swim suit swimming suit and swim trunks