Главная -> XML&... -> XSLT в примерах 
>> Страница 15 << | Назад | Вперед | Содержание | Указатель

Оси играют очень важную роль в XSLT. Для более подробной информации читайте XSLT reference. Сравните: ось child (преобразование 1), ось descendant (преобразование 2), ось parent (преобразование 3), ось ancestor (преобразование 4), ось following-sibling (преобразование 5), ось preceding-sibling (преобразование 6), ось following (преобразование 7), ось preceding (преобразование 8), ось attribute (преобразование 9), ось namespace (преобразование 10), ось self (преобразование 11), ось descendant-or-self (преобразование 12), ось ancestor-or-self (преобразование 13).

Преобразование 1

Исходный Surf
<source>

<AAA id="a1" pos="start">
     <BBB id="b1"/>
     <BBB id="b2"/>
</AAA>
<AAA id="a2">
     <BBB id="b3"/>
     <BBB id="b4"/>
     <CCC id="c1">
          <CCC id="c2"/>
     </CCC>
     <BBB id="b5">
          <CCC id="c3"/>
     </BBB>
</AAA>

</source>

Результат
<table border="1" cellpadding="6">
  <tr>
     <th colspan="2">Axis: child</th>
  </tr>
  <tr>
     <th>Element</th>
     <th>Node-set</th>
  </tr>
  <tr>
     <td>AAA id = a1</td>
     <td>b1 b2 </td>
  </tr>
  <tr>
     <td>BBB id = b1</td>
     <td/>
  </tr>
  <tr>
     <td>BBB id = b2</td>
     <td/>
  </tr>
  <tr>
     <td>AAA id = a2</td>
     <td>b3 b4 c1 b5 </td>
  </tr>
  <tr>
     <td>BBB id = b3</td>
     <td/>
  </tr>
  <tr>
     <td>BBB id = b4</td>
     <td/>
  </tr>
  <tr>
     <td>CCC id = c1</td>
     <td>c2 </td>
  </tr>
  <tr>
     <td>CCC id = c2</td>
     <td/>
  </tr>
  <tr>
     <td>BBB id = b5</td>
     <td>c3 </td>
  </tr>
  <tr>
     <td>CCC id = c3</td>
     <td/>
  </tr>
</table>

Представление HTML
Axis: child
Element Node-set
AAA id = a1 b1 b2
BBB id = b1
BBB id = b2
AAA id = a2 b3 b4 c1 b5
BBB id = b3
BBB id = b4
CCC id = c1 c2
CCC id = c2
BBB id = b5 c3
CCC id = c3
Преобразование XSLT
<xsl:stylesheet version = '1.0'
     xmlns:xsl='http://www.w3.org/1999/XSL/Transform'>

<xsl:template match="/">
     <table border="1" cellpadding="6">
          <tr>
               <th colspan="2">Axis: child</th>
          </tr>
          <tr>
               <th>Element</th>
               <th>Node-set</th>
          </tr>
          <xsl:for-each select="/source//*">
               <xsl:call-template name="print"/>
          </xsl:for-each>
     </table>
</xsl:template>

<xsl:template name="print">
     <tr>
          <td>
               <xsl:value-of select="name()"/>
               <xsl:text> id = </xsl:text>
               <xsl:value-of select="./@id"/>
          </td>
          <td>
               <xsl:for-each select="child::*">
                    <xsl:value-of select="./@id"/>
                    <xsl:text> </xsl:text>
               </xsl:for-each>
          </td>
     </tr>
</xsl:template>


</xsl:stylesheet>



Преобразование 2

Исходный Surf
<source>

<AAA id="a1" pos="start">
     <BBB id="b1"/>
     <BBB id="b2"/>
</AAA>
<AAA id="a2">
     <BBB id="b3"/>
     <BBB id="b4"/>
     <CCC id="c1">
          <CCC id="c2"/>
     </CCC>
     <BBB id="b5">
          <CCC id="c3"/>
     </BBB>
</AAA>

</source>

Результат
<table border="1" cellpadding="6">
  <tr>
     <th colspan="2">Axis: descendant</th>
  </tr>
  <tr>
     <th>Element</th>
     <th>Node-set</th>
  </tr>
  <tr>
     <td>AAA id = a1</td>
     <td>b1 b2 </td>
  </tr>
  <tr>
     <td>BBB id = b1</td>
     <td/>
  </tr>
  <tr>
     <td>BBB id = b2</td>
     <td/>
  </tr>
  <tr>
     <td>AAA id = a2</td>
     <td>b3 b4 c1 c2 b5 c3 </td>
  </tr>
  <tr>
     <td>BBB id = b3</td>
     <td/>
  </tr>
  <tr>
     <td>BBB id = b4</td>
     <td/>
  </tr>
  <tr>
     <td>CCC id = c1</td>
     <td>c2 </td>
  </tr>
  <tr>
     <td>CCC id = c2</td>
     <td/>
  </tr>
  <tr>
     <td>BBB id = b5</td>
     <td>c3 </td>
  </tr>
  <tr>
     <td>CCC id = c3</td>
     <td/>
  </tr>
</table>

Представление HTML
Axis: descendant
Element Node-set
AAA id = a1 b1 b2
BBB id = b1
BBB id = b2
AAA id = a2 b3 b4 c1 c2 b5 c3
BBB id = b3
BBB id = b4
CCC id = c1 c2
CCC id = c2
BBB id = b5 c3
CCC id = c3
Преобразование XSLT
<xsl:stylesheet version = '1.0'
     xmlns:xsl='http://www.w3.org/1999/XSL/Transform'>

<xsl:template match="/">
     <table border="1" cellpadding="6">
          <tr>
               <th colspan="2">Axis: descendant</th>
          </tr>
          <tr>
               <th>Element</th>
               <th>Node-set</th>
          </tr>
          <xsl:for-each select="/source//*">
               <xsl:call-template name="print"/>
          </xsl:for-each>
     </table>
</xsl:template>

<xsl:template name="print">
     <tr>
          <td>
               <xsl:value-of select="name()"/>
               <xsl:text> id = </xsl:text>
               <xsl:value-of select="./@id"/>
          </td>
          <td>
               <xsl:for-each select="descendant::*">
                    <xsl:value-of select="./@id"/>
                    <xsl:text> </xsl:text>
               </xsl:for-each>
          </td>
     </tr>
</xsl:template>


</xsl:stylesheet>



Преобразование 3

Исходный Surf
<source>

<AAA id="a1" pos="start">
     <BBB id="b1"/>
     <BBB id="b2"/>
</AAA>
<AAA id="a2">
     <BBB id="b3"/>
     <BBB id="b4"/>
     <CCC id="c1">
          <CCC id="c2"/>
     </CCC>
     <BBB id="b5">
          <CCC id="c3"/>
     </BBB>
</AAA>

</source>

Результат
<table border="1" cellpadding="6">
  <tr>
     <th colspan="2">Axis: parent</th>
  </tr>
  <tr>
     <th>Element</th>
     <th>Node-set</th>
  </tr>
  <tr>
     <td>AAA id = a1</td>
     <td>source </td>
  </tr>
  <tr>
     <td>BBB id = b1</td>
     <td>a1 </td>
  </tr>
  <tr>
     <td>BBB id = b2</td>
     <td>a1 </td>
  </tr>
  <tr>
     <td>AAA id = a2</td>
     <td>source </td>
  </tr>
  <tr>
     <td>BBB id = b3</td>
     <td>a2 </td>
  </tr>
  <tr>
     <td>BBB id = b4</td>
     <td>a2 </td>
  </tr>
  <tr>
     <td>CCC id = c1</td>
     <td>a2 </td>
  </tr>
  <tr>
     <td>CCC id = c2</td>
     <td>c1 </td>
  </tr>
  <tr>
     <td>BBB id = b5</td>
     <td>a2 </td>
  </tr>
  <tr>
     <td>CCC id = c3</td>
     <td>b5 </td>
  </tr>
</table>

Представление HTML
Axis: parent
Element Node-set
AAA id = a1 source
BBB id = b1 a1
BBB id = b2 a1
AAA id = a2 source
BBB id = b3 a2
BBB id = b4 a2
CCC id = c1 a2
CCC id = c2 c1
BBB id = b5 a2
CCC id = c3 b5
Преобразование XSLT
<xsl:stylesheet version = '1.0'
     xmlns:xsl='http://www.w3.org/1999/XSL/Transform'>

<xsl:template match="/">
     <table border="1" cellpadding="6">
          <tr>
               <th colspan="2">Axis: parent</th>
          </tr>
          <tr>
               <th>Element</th>
               <th>Node-set</th>
          </tr>
          <xsl:for-each select="/source//*">
               <xsl:call-template name="print"/>
          </xsl:for-each>
     </table>
</xsl:template>

<xsl:template name="print">
     <tr>
          <td>
               <xsl:value-of select="name()"/>
               <xsl:text> id = </xsl:text>
               <xsl:value-of select="./@id"/>
          </td>
          <td>
               <xsl:for-each select="parent::*">
                    <xsl:if test="not(@id)">
                         <xsl:value-of select="name()"/>
                    </xsl:if>
                    <xsl:value-of select="./@id"/>
                    <xsl:text> </xsl:text>
               </xsl:for-each>
          </td>
     </tr>
</xsl:template>


</xsl:stylesheet>



Преобразование 4

Исходный Surf
<source>

<AAA id="a1" pos="start">
     <BBB id="b1"/>
     <BBB id="b2"/>
</AAA>
<AAA id="a2">
     <BBB id="b3"/>
     <BBB id="b4"/>
     <CCC id="c1">
          <CCC id="c2"/>
     </CCC>
     <BBB id="b5">
          <CCC id="c3"/>
     </BBB>
</AAA>

</source>

Результат
<table border="1" cellpadding="6">
  <tr>
     <th colspan="2">Axis: ancestor</th>
  </tr>
  <tr>
     <th>Element</th>
     <th>Node-set</th>
  </tr>
  <tr>
     <td>AAA id = a1</td>
     <td>source </td>
  </tr>
  <tr>
     <td>BBB id = b1</td>
     <td>source a1 </td>
  </tr>
  <tr>
     <td>BBB id = b2</td>
     <td>source a1 </td>
  </tr>
  <tr>
     <td>AAA id = a2</td>
     <td>source </td>
  </tr>
  <tr>
     <td>BBB id = b3</td>
     <td>source a2 </td>
  </tr>
  <tr>
     <td>BBB id = b4</td>
     <td>source a2 </td>
  </tr>
  <tr>
     <td>CCC id = c1</td>
     <td>source a2 </td>
  </tr>
  <tr>
     <td>CCC id = c2</td>
     <td>source a2 c1 </td>
  </tr>
  <tr>
     <td>BBB id = b5</td>
     <td>source a2 </td>
  </tr>
  <tr>
     <td>CCC id = c3</td>
     <td>source a2 b5 </td>
  </tr>
</table>

Представление HTML
Axis: ancestor
Element Node-set
AAA id = a1 source
BBB id = b1 source a1
BBB id = b2 source a1
AAA id = a2 source
BBB id = b3 source a2
BBB id = b4 source a2
CCC id = c1 source a2
CCC id = c2 source a2 c1
BBB id = b5 source a2
CCC id = c3 source a2 b5
Преобразование XSLT
<xsl:stylesheet version = '1.0'
     xmlns:xsl='http://www.w3.org/1999/XSL/Transform'>

<xsl:template match="/">
     <table border="1" cellpadding="6">
          <tr>
               <th colspan="2">Axis: ancestor</th>
          </tr>
          <tr>
               <th>Element</th>
               <th>Node-set</th>
          </tr>
          <xsl:for-each select="/source//*">
               <xsl:call-template name="print"/>
          </xsl:for-each>
     </table>
</xsl:template>

<xsl:template name="print">
     <tr>
          <td>
               <xsl:value-of select="name()"/>
               <xsl:text> id = </xsl:text>
               <xsl:value-of select="./@id"/>
          </td>
          <td>
               <xsl:for-each select="ancestor::*">
                    <xsl:if test="not(@id)">
                         <xsl:value-of select="name()"/>
                    </xsl:if>
                    <xsl:value-of select="./@id"/>
                    <xsl:text> </xsl:text>
               </xsl:for-each>
          </td>
     </tr>
</xsl:template>


</xsl:stylesheet>



Преобразование 5

Исходный Surf
<source>

<AAA id="a1" pos="start">
     <BBB id="b1"/>
     <BBB id="b2"/>
</AAA>
<AAA id="a2">
     <BBB id="b3"/>
     <BBB id="b4"/>
     <CCC id="c1">
          <CCC id="c2"/>
     </CCC>
     <BBB id="b5">
          <CCC id="c3"/>
     </BBB>
</AAA>

</source>

Результат
<table border="1" cellpadding="6">
  <tr>
     <th colspan="2">Axis: following-sibling</th>
  </tr>
  <tr>
     <th>Element</th>
     <th>Node-set</th>
  </tr>
  <tr>
     <td>AAA id = a1</td>
     <td>a2 </td>
  </tr>
  <tr>
     <td>BBB id = b1</td>
     <td>b2 </td>
  </tr>
  <tr>
     <td>BBB id = b2</td>
     <td/>
  </tr>
  <tr>
     <td>AAA id = a2</td>
     <td/>
  </tr>
  <tr>
     <td>BBB id = b3</td>
     <td>b4 c1 b5 </td>
  </tr>
  <tr>
     <td>BBB id = b4</td>
     <td>c1 b5 </td>
  </tr>
  <tr>
     <td>CCC id = c1</td>
     <td>b5 </td>
  </tr>
  <tr>
     <td>CCC id = c2</td>
     <td/>
  </tr>
  <tr>
     <td>BBB id = b5</td>
     <td/>
  </tr>
  <tr>
     <td>CCC id = c3</td>
     <td/>
  </tr>
</table>

Представление HTML
Axis: following-sibling
Element Node-set
AAA id = a1 a2
BBB id = b1 b2
BBB id = b2
AAA id = a2
BBB id = b3 b4 c1 b5
BBB id = b4 c1 b5
CCC id = c1 b5
CCC id = c2
BBB id = b5
CCC id = c3
Преобразование XSLT
<xsl:stylesheet version = '1.0'
     xmlns:xsl='http://www.w3.org/1999/XSL/Transform'>

<xsl:template match="/">
     <table border="1" cellpadding="6">
          <tr>
               <th colspan="2">Axis: following-sibling</th>
          </tr>
          <tr>
               <th>Element</th>
               <th>Node-set</th>
          </tr>
          <xsl:for-each select="/source//*">
               <xsl:call-template name="print"/>
          </xsl:for-each>
     </table>
</xsl:template>

<xsl:template name="print">
     <tr>
          <td>
               <xsl:value-of select="name()"/>
               <xsl:text> id = </xsl:text>
               <xsl:value-of select="./@id"/>
          </td>
          <td>
               <xsl:for-each select="following-sibling::*">
                    <xsl:if test="not(@id)">
                         <xsl:value-of select="name()"/>
                    </xsl:if>
                    <xsl:value-of select="./@id"/>
                    <xsl:text> </xsl:text>
               </xsl:for-each>
          </td>
     </tr>
</xsl:template>


</xsl:stylesheet>



Преобразование 6

Исходный Surf
<source>

<AAA id="a1" pos="start">
     <BBB id="b1"/>
     <BBB id="b2"/>
</AAA>
<AAA id="a2">
     <BBB id="b3"/>
     <BBB id="b4"/>
     <CCC id="c1">
          <CCC id="c2"/>
     </CCC>
     <BBB id="b5">
          <CCC id="c3"/>
     </BBB>
</AAA>

</source>

Результат
<table border="1" cellpadding="6">
  <tr>
     <th colspan="2">Axis: preceding-sibling</th>
  </tr>
  <tr>
     <th>Element</th>
     <th>Node-set</th>
  </tr>
  <tr>
     <td>AAA id = a1</td>
     <td/>
  </tr>
  <tr>
     <td>BBB id = b1</td>
     <td/>
  </tr>
  <tr>
     <td>BBB id = b2</td>
     <td>b1 </td>
  </tr>
  <tr>
     <td>AAA id = a2</td>
     <td>a1 </td>
  </tr>
  <tr>
     <td>BBB id = b3</td>
     <td/>
  </tr>
  <tr>
     <td>BBB id = b4</td>
     <td>b3 </td>
  </tr>
  <tr>
     <td>CCC id = c1</td>
     <td>b3 b4 </td>
  </tr>
  <tr>
     <td>CCC id = c2</td>
     <td/>
  </tr>
  <tr>
     <td>BBB id = b5</td>
     <td>b3 b4 c1 </td>
  </tr>
  <tr>
     <td>CCC id = c3</td>
     <td/>
  </tr>
</table>

Представление HTML
Axis: preceding-sibling
Element Node-set
AAA id = a1
BBB id = b1
BBB id = b2 b1
AAA id = a2 a1
BBB id = b3
BBB id = b4 b3
CCC id = c1 b3 b4
CCC id = c2
BBB id = b5 b3 b4 c1
CCC id = c3
Преобразование XSLT
<xsl:stylesheet version = '1.0'
     xmlns:xsl='http://www.w3.org/1999/XSL/Transform'>

<xsl:template match="/">
     <table border="1" cellpadding="6">
          <tr>
               <th colspan="2">Axis: preceding-sibling</th>
          </tr>
          <tr>
               <th>Element</th>
               <th>Node-set</th>
          </tr>
          <xsl:for-each select="/source//*">
               <xsl:call-template name="print"/>
          </xsl:for-each>
     </table>
</xsl:template>

<xsl:template name="print">
     <tr>
          <td>
               <xsl:value-of select="name()"/>
               <xsl:text> id = </xsl:text>
               <xsl:value-of select="./@id"/>
          </td>
          <td>
               <xsl:for-each select="preceding-sibling::*">
                    <xsl:if test="not(@id)">
                         <xsl:value-of select="name()"/>
                    </xsl:if>
                    <xsl:value-of select="./@id"/>
                    <xsl:text> </xsl:text>
               </xsl:for-each>
          </td>
     </tr>
</xsl:template>


</xsl:stylesheet>



Преобразование 7

Исходный Surf
<source>

<AAA id="a1" pos="start">
     <BBB id="b1"/>
     <BBB id="b2"/>
</AAA>
<AAA id="a2">
     <BBB id="b3"/>
     <BBB id="b4"/>
     <CCC id="c1">
          <CCC id="c2"/>
     </CCC>
     <BBB id="b5">
          <CCC id="c3"/>
     </BBB>
</AAA>

</source>

Результат
<table border="1" cellpadding="6">
  <tr>
     <th colspan="2">Axis: following</th>
  </tr>
  <tr>
     <th>Element</th>
     <th>Node-set</th>
  </tr>
  <tr>
     <td>AAA id = a1</td>
     <td>a2 b3 b4 c1 c2 b5 c3 </td>
  </tr>
  <tr>
     <td>BBB id = b1</td>
     <td>b2 a2 b3 b4 c1 c2 b5 c3 </td>
  </tr>
  <tr>
     <td>BBB id = b2</td>
     <td>a2 b3 b4 c1 c2 b5 c3 </td>
  </tr>
  <tr>
     <td>AAA id = a2</td>
     <td/>
  </tr>
  <tr>
     <td>BBB id = b3</td>
     <td>b4 c1 c2 b5 c3 </td>
  </tr>
  <tr>
     <td>BBB id = b4</td>
     <td>c1 c2 b5 c3 </td>
  </tr>
  <tr>
     <td>CCC id = c1</td>
     <td>b5 c3 </td>
  </tr>
  <tr>
     <td>CCC id = c2</td>
     <td>b5 c3 </td>
  </tr>
  <tr>
     <td>BBB id = b5</td>
     <td/>
  </tr>
  <tr>
     <td>CCC id = c3</td>
     <td/>
  </tr>
</table>

Представление HTML
Axis: following
Element Node-set
AAA id = a1 a2 b3 b4 c1 c2 b5 c3
BBB id = b1 b2 a2 b3 b4 c1 c2 b5 c3
BBB id = b2 a2 b3 b4 c1 c2 b5 c3
AAA id = a2
BBB id = b3 b4 c1 c2 b5 c3
BBB id = b4 c1 c2 b5 c3
CCC id = c1 b5 c3
CCC id = c2 b5 c3
BBB id = b5
CCC id = c3
Преобразование XSLT
<xsl:stylesheet version = '1.0'
     xmlns:xsl='http://www.w3.org/1999/XSL/Transform'>

<xsl:template match="/">
     <table border="1" cellpadding="6">
          <tr>
               <th colspan="2">Axis: following</th>
          </tr>
          <tr>
               <th>Element</th>
               <th>Node-set</th>
          </tr>
          <xsl:for-each select="/source//*">
               <xsl:call-template name="print"/>
          </xsl:for-each>
     </table>
</xsl:template>

<xsl:template name="print">
     <tr>
          <td>
               <xsl:value-of select="name()"/>
               <xsl:text> id = </xsl:text>
               <xsl:value-of select="./@id"/>
          </td>
          <td>
               <xsl:for-each select="following::*">
                    <xsl:if test="not(@id)">
                         <xsl:value-of select="name()"/>
                    </xsl:if>
                    <xsl:value-of select="./@id"/>
                    <xsl:text> </xsl:text>
               </xsl:for-each>
          </td>
     </tr>
</xsl:template>


</xsl:stylesheet>



Преобразование 8

Исходный Surf
<source>

<AAA id="a1" pos="start">
     <BBB id="b1"/>
     <BBB id="b2"/>
</AAA>
<AAA id="a2">
     <BBB id="b3"/>
     <BBB id="b4"/>
     <CCC id="c1">
          <CCC id="c2"/>
     </CCC>
     <BBB id="b5">
          <CCC id="c3"/>
     </BBB>
</AAA>

</source>

Результат
<table border="1" cellpadding="6">
  <tr>
     <th colspan="2">Axis: preceding</th>
  </tr>
  <tr>
     <th>Element</th>
     <th>Node-set</th>
  </tr>
  <tr>
     <td>AAA id = a1</td>
     <td/>
  </tr>
  <tr>
     <td>BBB id = b1</td>
     <td/>
  </tr>
  <tr>
     <td>BBB id = b2</td>
     <td>b1 </td>
  </tr>
  <tr>
     <td>AAA id = a2</td>
     <td>a1 b1 b2 </td>
  </tr>
  <tr>
     <td>BBB id = b3</td>
     <td>a1 b1 b2 </td>
  </tr>
  <tr>
     <td>BBB id = b4</td>
     <td>a1 b1 b2 b3 </td>
  </tr>
  <tr>
     <td>CCC id = c1</td>
     <td>a1 b1 b2 b3 b4 </td>
  </tr>
  <tr>
     <td>CCC id = c2</td>
     <td>a1 b1 b2 b3 b4 </td>
  </tr>
  <tr>
     <td>BBB id = b5</td>
     <td>a1 b1 b2 b3 b4 c1 c2 </td>
  </tr>
  <tr>
     <td>CCC id = c3</td>
     <td>a1 b1 b2 b3 b4 c1 c2 </td>
  </tr>
</table>

Представление HTML
Axis: preceding
Element Node-set
AAA id = a1
BBB id = b1
BBB id = b2 b1
AAA id = a2 a1 b1 b2
BBB id = b3 a1 b1 b2
BBB id = b4 a1 b1 b2 b3
CCC id = c1 a1 b1 b2 b3 b4
CCC id = c2 a1 b1 b2 b3 b4
BBB id = b5 a1 b1 b2 b3 b4 c1 c2
CCC id = c3 a1 b1 b2 b3 b4 c1 c2
Преобразование XSLT
<xsl:stylesheet version = '1.0'
     xmlns:xsl='http://www.w3.org/1999/XSL/Transform'>

<xsl:template match="/">
     <table border="1" cellpadding="6">
          <tr>
               <th colspan="2">Axis: preceding</th>
          </tr>
          <tr>
               <th>Element</th>
               <th>Node-set</th>
          </tr>
          <xsl:for-each select="/source//*">
               <xsl:call-template name="print"/>
          </xsl:for-each>
     </table>
</xsl:template>

<xsl:template name="print">
     <tr>
          <td>
               <xsl:value-of select="name()"/>
               <xsl:text> id = </xsl:text>
               <xsl:value-of select="./@id"/>
          </td>
          <td>
               <xsl:for-each select="preceding::*">
                    <xsl:if test="not(@id)">
                         <xsl:value-of select="name()"/>
                    </xsl:if>
                    <xsl:value-of select="./@id"/>
                    <xsl:text> </xsl:text>
               </xsl:for-each>
          </td>
     </tr>
</xsl:template>


</xsl:stylesheet>



Преобразование 9

Исходный Surf
<source>

<AAA id="a1" pos="start">
     <BBB id="b1"/>
     <BBB id="b2"/>
</AAA>
<AAA id="a2">
     <BBB id="b3"/>
     <BBB id="b4"/>
     <CCC id="c1">
          <CCC id="c2"/>
     </CCC>
     <BBB id="b5">
          <CCC id="c3"/>
     </BBB>
</AAA>

</source>

Результат
<table border="1" cellpadding="6">
  <tr>
     <th colspan="2">Axis: attribute</th>
  </tr>
  <tr>
     <th>Element</th>
     <th>Node-set</th>
  </tr>
  <tr>
     <td>AAA id = a1</td>
     <td>id pos </td>
  </tr>
  <tr>
     <td>BBB id = b1</td>
     <td>id </td>
  </tr>
  <tr>
     <td>BBB id = b2</td>
     <td>id </td>
  </tr>
  <tr>
     <td>AAA id = a2</td>
     <td>id </td>
  </tr>
  <tr>
     <td>BBB id = b3</td>
     <td>id </td>
  </tr>
  <tr>
     <td>BBB id = b4</td>
     <td>id </td>
  </tr>
  <tr>
     <td>CCC id = c1</td>
     <td>id </td>
  </tr>
  <tr>
     <td>CCC id = c2</td>
     <td>id </td>
  </tr>
  <tr>
     <td>BBB id = b5</td>
     <td>id </td>
  </tr>
  <tr>
     <td>CCC id = c3</td>
     <td>id </td>
  </tr>
</table>

Представление HTML
Axis: attribute
Element Node-set
AAA id = a1 id pos
BBB id = b1 id
BBB id = b2 id
AAA id = a2 id
BBB id = b3 id
BBB id = b4 id
CCC id = c1 id
CCC id = c2 id
BBB id = b5 id
CCC id = c3 id
Преобразование XSLT
<xsl:stylesheet version = '1.0'
     xmlns:xsl='http://www.w3.org/1999/XSL/Transform'>

<xsl:template match="/">
     <table border="1" cellpadding="6">
          <tr>
               <th colspan="2">Axis: attribute</th>
          </tr>
          <tr>
               <th>Element</th>
               <th>Node-set</th>
          </tr>
          <xsl:for-each select="/source//*">
               <xsl:call-template name="print"/>
          </xsl:for-each>
     </table>
</xsl:template>

<xsl:template name="print">
     <tr>
          <td>
               <xsl:value-of select="name()"/>
               <xsl:text> id = </xsl:text>
               <xsl:value-of select="./@id"/>
          </td>
          <td>
               <xsl:for-each select="attribute::*">
                    <xsl:if test="not(@id)">
                         <xsl:value-of select="name()"/>
                    </xsl:if>
                    <xsl:value-of select="./@id"/>
                    <xsl:text> </xsl:text>
               </xsl:for-each>
          </td>
     </tr>
</xsl:template>


</xsl:stylesheet>



Преобразование 10

Исходный Surf
<source>

<AAA id="a1" pos="start">
     <BBB id="b1"/>
     <BBB id="b2"/>
</AAA>
<AAA id="a2">
     <BBB id="b3"/>
     <BBB id="b4"/>
     <CCC id="c1">
          <CCC id="c2"/>
     </CCC>
     <BBB id="b5">
          <CCC id="c3"/>
     </BBB>
</AAA>

</source>

Результат
<table border="1" cellpadding="6">
  <tr>
     <th colspan="2">Axis: namespace</th>
  </tr>
  <tr>
     <th>Element</th>
     <th>Node-set</th>
  </tr>
  <tr>
     <td>AAA id = a1</td>
     <td>xml </td>
  </tr>
  <tr>
     <td>BBB id = b1</td>
     <td>xml </td>
  </tr>
  <tr>
     <td>BBB id = b2</td>
     <td>xml </td>
  </tr>
  <tr>
     <td>AAA id = a2</td>
     <td>xml </td>
  </tr>
  <tr>
     <td>BBB id = b3</td>
     <td>xml </td>
  </tr>
  <tr>
     <td>BBB id = b4</td>
     <td>xml </td>
  </tr>
  <tr>
     <td>CCC id = c1</td>
     <td>xml </td>
  </tr>
  <tr>
     <td>CCC id = c2</td>
     <td>xml </td>
  </tr>
  <tr>
     <td>BBB id = b5</td>
     <td>xml </td>
  </tr>
  <tr>
     <td>CCC id = c3</td>
     <td>xml </td>
  </tr>
</table>

Представление HTML
Axis: namespace
Element Node-set
AAA id = a1 xml
BBB id = b1 xml
BBB id = b2 xml
AAA id = a2 xml
BBB id = b3 xml
BBB id = b4 xml
CCC id = c1 xml
CCC id = c2 xml
BBB id = b5 xml
CCC id = c3 xml
Преобразование XSLT
<xsl:stylesheet version = '1.0'
     xmlns:xsl='http://www.w3.org/1999/XSL/Transform'>

<xsl:template match="/">
     <table border="1" cellpadding="6">
          <tr>
               <th colspan="2">Axis: namespace</th>
          </tr>
          <tr>
               <th>Element</th>
               <th>Node-set</th>
          </tr>
          <xsl:for-each select="/source//*">
               <xsl:call-template name="print"/>
          </xsl:for-each>
     </table>
</xsl:template>

<xsl:template name="print">
     <tr>
          <td>
               <xsl:value-of select="name()"/>
               <xsl:text> id = </xsl:text>
               <xsl:value-of select="./@id"/>
          </td>
          <td>
               <xsl:for-each select="namespace::*">
                    <xsl:if test="not(@id)">
                         <xsl:value-of select="name()"/>
                    </xsl:if>
                    <xsl:value-of select="./@id"/>
                    <xsl:text> </xsl:text>
               </xsl:for-each>
          </td>
     </tr>
</xsl:template>


</xsl:stylesheet>



Преобразование 11

Исходный Surf
<source>

<AAA id="a1" pos="start">
     <BBB id="b1"/>
     <BBB id="b2"/>
</AAA>
<AAA id="a2">
     <BBB id="b3"/>
     <BBB id="b4"/>
     <CCC id="c1">
          <CCC id="c2"/>
     </CCC>
     <BBB id="b5">
          <CCC id="c3"/>
     </BBB>
</AAA>

</source>

Результат
<table border="1" cellpadding="6">
  <tr>
     <th colspan="2">Axis: self</th>
  </tr>
  <tr>
     <th>Element</th>
     <th>Node-set</th>
  </tr>
  <tr>
     <td>AAA id = a1</td>
     <td>a1 </td>
  </tr>
  <tr>
     <td>BBB id = b1</td>
     <td>b1 </td>
  </tr>
  <tr>
     <td>BBB id = b2</td>
     <td>b2 </td>
  </tr>
  <tr>
     <td>AAA id = a2</td>
     <td>a2 </td>
  </tr>
  <tr>
     <td>BBB id = b3</td>
     <td>b3 </td>
  </tr>
  <tr>
     <td>BBB id = b4</td>
     <td>b4 </td>
  </tr>
  <tr>
     <td>CCC id = c1</td>
     <td>c1 </td>
  </tr>
  <tr>
     <td>CCC id = c2</td>
     <td>c2 </td>
  </tr>
  <tr>
     <td>BBB id = b5</td>
     <td>b5 </td>
  </tr>
  <tr>
     <td>CCC id = c3</td>
     <td>c3 </td>
  </tr>
</table>

Представление HTML
Axis: self
Element Node-set
AAA id = a1 a1
BBB id = b1 b1
BBB id = b2 b2
AAA id = a2 a2
BBB id = b3 b3
BBB id = b4 b4
CCC id = c1 c1
CCC id = c2 c2
BBB id = b5 b5
CCC id = c3 c3
Преобразование XSLT
<xsl:stylesheet version = '1.0'
     xmlns:xsl='http://www.w3.org/1999/XSL/Transform'>

<xsl:template match="/">
     <table border="1" cellpadding="6">
          <tr>
               <th colspan="2">Axis: self</th>
          </tr>
          <tr>
               <th>Element</th>
               <th>Node-set</th>
          </tr>
          <xsl:for-each select="/source//*">
               <xsl:call-template name="print"/>
          </xsl:for-each>
     </table>
</xsl:template>

<xsl:template name="print">
     <tr>
          <td>
               <xsl:value-of select="name()"/>
               <xsl:text> id = </xsl:text>
               <xsl:value-of select="./@id"/>
          </td>
          <td>
               <xsl:for-each select="self::*">
                    <xsl:if test="not(@id)">
                         <xsl:value-of select="name()"/>
                    </xsl:if>
                    <xsl:value-of select="./@id"/>
                    <xsl:text> </xsl:text>
               </xsl:for-each>
          </td>
     </tr>
</xsl:template>


</xsl:stylesheet>



Преобразование 12

Исходный Surf
<source>

<AAA id="a1" pos="start">
     <BBB id="b1"/>
     <BBB id="b2"/>
</AAA>
<AAA id="a2">
     <BBB id="b3"/>
     <BBB id="b4"/>
     <CCC id="c1">
          <CCC id="c2"/>
     </CCC>
     <BBB id="b5">
          <CCC id="c3"/>
     </BBB>
</AAA>

</source>

Результат
<table border="1" cellpadding="6">
  <tr>
     <th colspan="2">Axis: descendant-or-self</th>
  </tr>
  <tr>
     <th>Element</th>
     <th>Node-set</th>
  </tr>
  <tr>
     <td>AAA id = a1</td>
     <td>a1 b1 b2 </td>
  </tr>
  <tr>
     <td>BBB id = b1</td>
     <td>b1 </td>
  </tr>
  <tr>
     <td>BBB id = b2</td>
     <td>b2 </td>
  </tr>
  <tr>
     <td>AAA id = a2</td>
     <td>a2 b3 b4 c1 c2 b5 c3 </td>
  </tr>
  <tr>
     <td>BBB id = b3</td>
     <td>b3 </td>
  </tr>
  <tr>
     <td>BBB id = b4</td>
     <td>b4 </td>
  </tr>
  <tr>
     <td>CCC id = c1</td>
     <td>c1 c2 </td>
  </tr>
  <tr>
     <td>CCC id = c2</td>
     <td>c2 </td>
  </tr>
  <tr>
     <td>BBB id = b5</td>
     <td>b5 c3 </td>
  </tr>
  <tr>
     <td>CCC id = c3</td>
     <td>c3 </td>
  </tr>
</table>

Представление HTML
Axis: descendant-or-self
Element Node-set
AAA id = a1 a1 b1 b2
BBB id = b1 b1
BBB id = b2 b2
AAA id = a2 a2 b3 b4 c1 c2 b5 c3
BBB id = b3 b3
BBB id = b4 b4
CCC id = c1 c1 c2
CCC id = c2 c2
BBB id = b5 b5 c3
CCC id = c3 c3
Преобразование XSLT
<xsl:stylesheet version = '1.0'
     xmlns:xsl='http://www.w3.org/1999/XSL/Transform'>

<xsl:template match="/">
     <table border="1" cellpadding="6">
          <tr>
               <th colspan="2">Axis: descendant-or-self</th>
          </tr>
          <tr>
               <th>Element</th>
               <th>Node-set</th>
          </tr>
          <xsl:for-each select="/source//*">
               <xsl:call-template name="print"/>
          </xsl:for-each>
     </table>
</xsl:template>

<xsl:template name="print">
     <tr>
          <td>
               <xsl:value-of select="name()"/>
               <xsl:text> id = </xsl:text>
               <xsl:value-of select="./@id"/>
          </td>
          <td>
               <xsl:for-each select="descendant-or-self::*">
                    <xsl:if test="not(@id)">
                         <xsl:value-of select="name()"/>
                    </xsl:if>
                    <xsl:value-of select="./@id"/>
                    <xsl:text> </xsl:text>
               </xsl:for-each>
          </td>
     </tr>
</xsl:template>


</xsl:stylesheet>



Преобразование 13

Исходный Surf
<source>

<AAA id="a1" pos="start">
     <BBB id="b1"/>
     <BBB id="b2"/>
</AAA>
<AAA id="a2">
     <BBB id="b3"/>
     <BBB id="b4"/>
     <CCC id="c1">
          <CCC id="c2"/>
     </CCC>
     <BBB id="b5">
          <CCC id="c3"/>
     </BBB>
</AAA>

</source>

Результат
<table border="1" cellpadding="6">
  <tr>
     <th colspan="2">Axis: ancestor-or-self </th>
  </tr>
  <tr>
     <th>Element</th>
     <th>Node-set</th>
  </tr>
  <tr>
     <td>AAA id = a1</td>
     <td>source a1 </td>
  </tr>
  <tr>
     <td>BBB id = b1</td>
     <td>source a1 b1 </td>
  </tr>
  <tr>
     <td>BBB id = b2</td>
     <td>source a1 b2 </td>
  </tr>
  <tr>
     <td>AAA id = a2</td>
     <td>source a2 </td>
  </tr>
  <tr>
     <td>BBB id = b3</td>
     <td>source a2 b3 </td>
  </tr>
  <tr>
     <td>BBB id = b4</td>
     <td>source a2 b4 </td>
  </tr>
  <tr>
     <td>CCC id = c1</td>
     <td>source a2 c1 </td>
  </tr>
  <tr>
     <td>CCC id = c2</td>
     <td>source a2 c1 c2 </td>
  </tr>
  <tr>
     <td>BBB id = b5</td>
     <td>source a2 b5 </td>
  </tr>
  <tr>
     <td>CCC id = c3</td>
     <td>source a2 b5 c3 </td>
  </tr>
</table>

Представление HTML
Axis: ancestor-or-self
Element Node-set
AAA id = a1 source a1
BBB id = b1 source a1 b1
BBB id = b2 source a1 b2
AAA id = a2 source a2
BBB id = b3 source a2 b3
BBB id = b4 source a2 b4
CCC id = c1 source a2 c1
CCC id = c2 source a2 c1 c2
BBB id = b5 source a2 b5
CCC id = c3 source a2 b5 c3
Преобразование XSLT
<xsl:stylesheet version = '1.0'
     xmlns:xsl='http://www.w3.org/1999/XSL/Transform'>

<xsl:template match="/">
     <table border="1" cellpadding="6">
          <tr>
               <th colspan="2">Axis: ancestor-or-self </th>
          </tr>
          <tr>
               <th>Element</th>
               <th>Node-set</th>
          </tr>
          <xsl:for-each select="/source//*">
               <xsl:call-template name="print"/>
          </xsl:for-each>
     </table>
</xsl:template>

<xsl:template name="print">
     <tr>
          <td>
               <xsl:value-of select="name()"/>
               <xsl:text> id = </xsl:text>
               <xsl:value-of select="./@id"/>
          </td>
          <td>
               <xsl:for-each select="ancestor-or-self ::*">
                    <xsl:if test="not(@id)">
                         <xsl:value-of select="name()"/>
                    </xsl:if>
                    <xsl:value-of select="./@id"/>
                    <xsl:text> </xsl:text>
               </xsl:for-each>
          </td>
     </tr>
</xsl:template>


</xsl:stylesheet>

Raleigh.ruCopyright © 2002

Kevin Carr

Natural Skin Care 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.

Boardshorts are designed to be quick-drying, and are generally made from smooth polyester or nylon material. They are durable and hold up to wear from contact with a surfboard, yet are comfortable and light-weight. They are well-adapted to their use in various active watersports. These are the best board shorts around: Volcom Board Shorts
Hurley Board Shorts
Quiksilver Board Shorts
Roxy Board Shorts
Billabong Board Shorts
Adidas Board Shorts
Emerica Board Shorts
Element Board Shorts
Analog Board Shorts
Alpinestars Board Shorts
Quiksilver Board Shorts
C1rca Board Shorts
DC Board Shorts
Dakine Board Shorts
Etnies Board Shorts
Independent Board Shorts
Jet Pilot Board Shorts
Kr3w Board Shorts
RVCA Board Shorts
LRG Board Shorts
Matix Board Shorts
Lost Board Shorts
Metal Mulisha Board Shorts
O'Neill Board Shorts
Boardshorts do not have an elastic waist like many swim shorts do; instead they have a more rigid waistband which opens at the front, often with a velcro fly. The waistband is also held together at the front with a lace-up tie. This double fail-safe system is in order to ensure that the shorts cannot be pulled off the body by the force of the wave when a surfer is tumbled under water during a wipeout. Another common feature of authentic surfing boardshort design is a very small pocket sealed with velcro and vented with a grommet. This is designed to be a secure place to carry a car key or house key while in the water: Volcom Boardshorts
Hurley Boardshorts
Quiksilver Boardshorts
Roxy Boardshorts
Billabong Boardshorts
Adidas Boardshorts
Emerica Boardshorts
Element Boardshorts
Analog Boardshorts
Alpinestars Boardshorts
Quiksilver Boardshorts
C1rca Boardshorts
DC Boardshorts
Dakine Boardshorts
Etnies Boardshorts
Independent Boardshorts
Jet Pilot Boardshorts
Kr3w Boardshorts
RVCA Boardshorts
LRG Boardshorts
Matix Boardshorts
Lost Boardshorts
Metal Mulisha Boardshorts
O'Neill Boardshorts
Boardshorts are normally longer than some shorts or form-fitting speedo styles of swimwear and sometimes they have a baggy appearance. Boardshorts are longer than normal shorts for one major reason: surfboards are covered with a layer of sticky wax, which allows the surfer to stand on the board without slipping off. However, this wax can rip leg hair off the surfer when he is sitting on the board waiting for waves. Long boardshorts cover the back of the leg when sitting on the board, preventing the wax from ripping at the leg hair. The length of boardshorts is also affected according to fashion trends; ranging from mid-thigh (old school) to below the knee, covering the entire knee. They often sit low in the back, exposing the top of the buttocks. Many designs use vibrant color, Hawaiian floral images and highlighted stitching; however not all boardshorts have these features: Volcom Boardshort
Hurley Boardshort
Quiksilver Boardshort
Roxy Boardshort
Billabong Boardshort
Adidas Boardshort
Emerica Boardshort
Element Boardshort
Analog Boardshort
Alpinestars Boardshort
Quiksilver Boardshort
C1rca Boardshort
DC Boardshort
Dakine Boardshort
Etnies Boardshort
Independent Boardshort
Jet Pilot Boardshort
Kr3w Boardshort
RVCA Boardshort
LRG Boardshort
Matix Boardshort
Lost Boardshort
Metal Mulisha Boardshort
O'Neill Boardshort
Although the basic design for boardshorts remains largely the same, some manufacturers have taken advantage of new technology. Because surfers and other water-sports enthusiasts commonly wear boardshorts without underwear, one of the major complaints has been about the use of velcro for the fly closure which tends to entangle pubic hair. A solution that some manufactures have come up with is to use a neoprene fly, which does not allow the fly to completely open, but provides enough stretch so that the shorts can be easily pulled on and off. Pubic hair does not get caught on the neoprene fly. To remedy another common complaint, about boardshorts stitching in the inseam area which would rub directly against the wearer's skin, many manufacturers switched to a seamless design, or use welding or glue, rather than stitches. Although it is very common for boardshorts to be worn as is, some male wearers prefer to wear boxers, a jockstrap or briefs under them. Some female wearers wear a swimsuit or bikini bottom under them. Volcom Board Short
Hurley Board Short
Quiksilver Board Short
Roxy Board Short
Billabong Board Short
Adidas Board Short
Emerica Board Short
Element Board Short
Analog Board Short
Alpinestars Board Short
Quiksilver Board Short
C1rca Board Short
DC Board Short
Dakine Board Short
Etnies Board Short
Independent Board Short
Jet Pilot Board Short
Kr3w Board Short
RVCA Board Short
LRG Board Short
Matix Board Short
Lost Board Short
Metal Mulisha Board Short
O'Neill Board Short
Here are few links to some of the more popular Volcom surf clothing products:

Volcom Shirts
Volcom Tees
Volcom Shorts
Volcom Hats
Volcom Shoes
Volcom Boardshorts
Volcom Jackets

Here are few links to some of the more popular Element apparel and clothing products:

Element Shirts
Element Tees
Element Shorts
Element Hats
Element Shoes
Element Boardshorts
Element Jackets

Here are few links to some of the more popular Ezekiel apparel and clothing products:

Ezekiel Shirts
Ezekiel Tees
Ezekiel Shorts
Ezekiel Hats
Ezekiel Shoes
Ezekiel Boardshorts
Ezekiel Jackets

Here are few links to some of the more popular RVCA apparel and clothing products:

RVCA Shirts
RVCA Tees
RVCA Shorts
RVCA Hats
RVCA Shoes
RVCA Boardshorts
RVCA Jackets

HB Surf Shop
HB Sport Apparel
OC Sport Shop
OC Sport Apparel
All Sport Apparel
All Surf clothing

 

Master Plumber Orange County, Stanton, CA

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