English | Français | Deutsch | >> Magyar << | 中文 | Polski adultinternetusers > Tutorials > XSLT Tutorial
>> Oldal 19 << | Előző | Következő | Tartalom | Elem index

Az xsl:for-each ( XSLT stíluslap 1 és XSLT stíluslap 2 ) vagy az xsl:apply-templates segítségével kiválasztott elemek ( XSLT stíluslap 3 ) rendezhet?ek. A rendezés sorrendjét az order attribútum szabja meg. Az XSLT stíluslap 1 n?vekv?, míg az XSLT stíluslap 2Cs?kken? sorrendben rendez.

XSLT stíluslap 1

XML forrás
<source>

<name>John</name>
<name>Josua</name>
<name>Charles</name>
<name>Alice</name>
<name>Martha</name>
<name>George</name>

</source>

Kimenet
<TABLE>
  <TR>
     <TH>Alice</TH>
  </TR>
  <TR>
     <TH>Charles</TH>
  </TR>
  <TR>
     <TH>George</TH>
  </TR>
  <TR>
     <TH>John</TH>
  </TR>
  <TR>
     <TH>Josua</TH>
  </TR>
  <TR>
     <TH>Martha</TH>
  </TR>
</TABLE>

HTML nézet
Alice
Charles
George
John
Josua
Martha
XSLT stíluslap
<xsl:stylesheet version = '1.0'
     xmlns:xsl='http://www.w3.org/1999/XSL/Transform'>

<xsl:template match="/">
     <TABLE>
          <xsl:for-each select="//name">
               <xsl:sort order="ascending" select="."/>
               <TR>
                    <TH>
                         <xsl:value-of select="."/>
                    </TH>
               </TR>
          </xsl:for-each>
     </TABLE>
</xsl:template>


</xsl:stylesheet>



XSLT stíluslap 2

XML forrás
<source>

<name>John</name>
<name>Josua</name>
<name>Charles</name>
<name>Alice</name>
<name>Martha</name>
<name>George</name>

</source>

Kimenet
<TABLE>
  <TR>
     <TH>Martha</TH>
  </TR>
  <TR>
     <TH>Josua</TH>
  </TR>
  <TR>
     <TH>John</TH>
  </TR>
  <TR>
     <TH>George</TH>
  </TR>
  <TR>
     <TH>Charles</TH>
  </TR>
  <TR>
     <TH>Alice</TH>
  </TR>
</TABLE>

HTML nézet
Martha
Josua
John
George
Charles
Alice
XSLT stíluslap
<xsl:stylesheet version = '1.0'
     xmlns:xsl='http://www.w3.org/1999/XSL/Transform'>

<xsl:template match="/">
     <TABLE>
          <xsl:for-each select="//name">
               <xsl:sort order="descending" select="."/>
               <TR>
                    <TH>
                         <xsl:value-of select="."/>
                    </TH>
               </TR>
          </xsl:for-each>
     </TABLE>
</xsl:template>


</xsl:stylesheet>



XSLT stíluslap 3

XML forrás
<source>

<name>John</name>
<name>Josua</name>
<name>Charles</name>
<name>Alice</name>
<name>Martha</name>
<name>George</name>

</source>

Kimenet
<TABLE>
  <TR>
     <TH>Martha</TH>
  </TR>
  <TR>
     <TH>Josua</TH>
  </TR>
  <TR>
     <TH>John</TH>
  </TR>
  <TR>
     <TH>George</TH>
  </TR>
  <TR>
     <TH>Charles</TH>
  </TR>
  <TR>
     <TH>Alice</TH>
  </TR>
</TABLE>

HTML nézet
Martha
Josua
John
George
Charles
Alice
XSLT stíluslap
<xsl:stylesheet version = '1.0'
     xmlns:xsl='http://www.w3.org/1999/XSL/Transform'>

<xsl:template match="/">
     <TABLE>
          <xsl:apply-templates select="//name">
               <xsl:sort order="descending" select="."/>
          </xsl:apply-templates>
     </TABLE>
</xsl:template>

<xsl:template match="name">
     <TR>
          <TH>
               <xsl:value-of select="."/>
          </TH>
     </TR>
</xsl:template>


</xsl:stylesheet>


Kevin Carr in Stanton

Natural Skin Care and European Soaps
Kevin Carr
Mayor Dave Shawver Stanton
Internetusers
This is the website that has all the latest for surf, skate and snow. You can also see it here:. You'll be glad you saw the surf apparel.

Take a moment to visit 1cecilia448 or see them on twitter at 1cecilia448 or view them on facebook at 1cecilia448.

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