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

Une variable peut contenir un fragment de l'arbre résultat. Les opérations autorisées sur un fragment de l'arbre résultat constituent un sous-ensemble de celles autorisées sur un ensemble de noeuds. Une opération est autorisée sur un fragment de l'arbre résultat seulement si elle l'est sur une chaîne (cette dernière peut d'abord impliquer la conversion de la chaîne en un nombre ou un booléen). En particulier, il est interdit d'utiliser les opérateurs /, // et [] sur les fragments. Lorsqu'une opération autorisée est effectuée sur un fragment de l'arbre résultat, elle est effectuée de la même manière que sur l'ensemble de noeuds équivalent. Comparez Feuille de style XSLT 1 et Feuille de style XSLT 2.

Feuille de style XSLT 1

Source Surf
<source>

<TABLE border="1">
     <TR>
          <TD>AAA</TD>
          <TD>BBB</TD>
     </TR>
     <TR>
          <TD>aaa</TD>
          <TD>bbb</TD>
     </TR>
</TABLE>
<TABLE border="1">
     <TR>
          <TD>1111111</TD>
     </TR>
     <TR>
          <TD>22222222</TD>
     </TR>
</TABLE>

</source>

Sortie
<TABLE border="1">

  <TR>

     <TD>1111111</TD>

  </TR>

  <TR>

     <TD>22222222</TD>

  </TR>

</TABLE>
<TABLE border="1">

  <TR>

     <TD>AAA</TD>

     <TD>BBB</TD>

  </TR>

  <TR>

     <TD>aaa</TD>

     <TD>bbb</TD>

  </TR>

</TABLE>
<TABLE border="1">

  <TR>

     <TD>1111111</TD>

  </TR>

  <TR>

     <TD>22222222</TD>

  </TR>

</TABLE>

Vue HTML
1111111
22222222
AAA BBB
aaa bbb
1111111
22222222
Feuille de style XSLT
<xsl:stylesheet version = '1.0'
     xmlns:xsl='http://www.w3.org/1999/XSL/Transform'>

<xsl:variable name="A1">
     <xsl:copy-of select="//TABLE[1]"/>
</xsl:variable>
<xsl:variable name="A2">
     <xsl:copy-of select="//TABLE[2]"/>
</xsl:variable>
<xsl:template match="/">
     <xsl:copy-of select="$A2"/>
     <xsl:copy-of select="$A1"/>
     <xsl:copy-of select="$A2"/>
</xsl:template>


</xsl:stylesheet>



Feuille de style XSLT 2

Source Surf
<source>

<TABLE border="1">
     <TR>
          <TD>AAA</TD>
          <TD>BBB</TD>
     </TR>
     <TR>
          <TD>aaa</TD>
          <TD>bbb</TD>
     </TR>
</TABLE>
<TABLE border="1">
     <TR>
          <TD>1111111</TD>
     </TR>
     <TR>
          <TD>22222222</TD>
     </TR>
</TABLE>

</source>

Sortie
<P>

1111111


22222222

</P>
<P>

AAA
BBB


aaa
bbb

</P>
<P>

1111111


22222222

</P>

Vue HTML

1111111 22222222

AAA BBB aaa bbb

1111111 22222222

Feuille de style XSLT
<xsl:stylesheet version = '1.0'
     xmlns:xsl='http://www.w3.org/1999/XSL/Transform'>

<xsl:variable name="A1">
     <xsl:copy-of select="//TABLE[1]"/>
</xsl:variable>
<xsl:variable name="A2">
     <xsl:copy-of select="//TABLE[2]"/>
</xsl:variable>
<xsl:template match="/">
     <P>
          <xsl:value-of select="$A2"/>
     </P>
     <P>
          <xsl:value-of select="$A1"/>
     </P>
     <P>
          <xsl:value-of select="$A2"/>
     </P>
</xsl:template>


</xsl:stylesheet>


Kevin Carr in Stanton

Natural Skin Care and European Soaps
Kevin Carr
Mayor Dave Shawver Stanton
Internetusers

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



Take a moment to visit 1cecilia438 or see them on twitter at 1cecilia410 or view them on facebook at hawaiian luxury shoes.

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