English | Français | Deutsch | Magyar | 中文 | >> Polski << adultinternetusers > Tutorials > XSLT Tutorial
>> Strona 35 << | Poprzedni | Następny | Zawartość | Indeks elementu

Zmienna może przechowywać jako swoją wartość fragment drzewa wynikowego. Operacje dozwolone na fragmencie drzewa wynikowego są podzbiorem tych, których użyć można na zbiorze węzłów. Dana operacja jest dozwolona na fragmencie drzewa wtedy gdy operacja tej można byłoby użyć na łańcuchu znaków (z ewentualną, wstępną konwersją łańcucha znaków do liczby lub wartości logicznej). W szczególności, na fragmencie drzewa wynikowego, nie jest dozwolone użycie operatorów: /, // i []. Gdy operacja wykonywana jest na danym framencie drzewa wynikowego, jest wykonywana dokładnie tak jak byłaby wykonywna na odpowiadającym jej zbiorze węzłów. Dla porównania: Arkusz stylów XSLT 1 oraz Arkusz stylów XSLT 2.

Arkusz stylów XSLT 1

Źródło 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>

Dane wyjściowe
<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>

Widok HTML
1111111
22222222
AAA BBB
aaa bbb
1111111
22222222
Arkusz stylów 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>



Arkusz stylów XSLT 2

Źródło 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>

Dane wyjściowe
<P>

1111111


22222222

</P>
<P>

AAA
BBB


aaa
bbb

</P>
<P>

1111111


22222222

</P>

Widok HTML

1111111 22222222

AAA BBB aaa bbb

1111111 22222222

Arkusz stylów 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 ing suit and swim trunks