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

     1  <xsl:stylesheet
     2      xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
     3      version="1.0">
     4  
     5  <xsl:output method="xml" /> 
     6  
     7  <!--match first element of last item of any orderedlist-->
     8  <!-- <xsl:template match="orderedlist/listitem[position()!=1][position()=last()]/*[1]"> -->
     9  <xsl:template match="orderedlist/listitem[position()!=1][position()=last()]/*[1]">
    10     <xsl:text>First element of last item of orderedlist</xsl:text>
    11     <xsl:copy>
    12       <xsl:apply-templates select="@*|node()"/>
    13     </xsl:copy>
    14  </xsl:template>
    15  
    16  </xsl:stylesheet>
    17  
    18