github.com/matislovas/ratago@v0.0.0-20240408115641-cc0857415a7a/xslt/testdata/test.xsl (about)

     1  <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://example.org">
     2  
     3      <xsl:template match="/">
     4          <html>
     5              <body>
     6                  <xsl:apply-templates />
     7              </body>
     8          </html>
     9      </xsl:template>
    10  
    11      <xsl:template match="foo">
    12          <h3><xsl:text>(TITLE) </xsl:text><xsl:value-of select="@title" /></h3>
    13          <xsl:if test="@title">
    14              <xsl:apply-templates select="bar[1]" mode="correct" />
    15          </xsl:if>
    16      </xsl:template>
    17  
    18      <xsl:template match="bar">
    19          FAIL template mode
    20      </xsl:template>
    21  
    22      <xsl:template match="bar" mode="correct" priority="2">
    23          <p><xsl:value-of select="."/></p>
    24      </xsl:template>
    25  
    26      <xsl:template match="bar" mode="correct">
    27          FAIL template priority
    28      </xsl:template>
    29  
    30  </xsl:stylesheet>