I'm trying to build a XSLT pattern that select the fiveth <articulo> element of the following document:
I think that the follow template must select the fiveth <articulo> element:<xsl:template match="//articulo"><p div class="miclass"><apply-templates/></p></xsl:template>but the XSLT proccesor doesn´t found it.//articulo will select every <articulo> element that is the fifth <articulo> child of its parent, not the fifth in the whole document.What is the correct pattern to do it?articulo[count(preceding::articulo)=4]But do you really want to do this? Don't you want to make the stylesheet more general, so it can select any articulo element selected by a stylesheet parameter? I would normally do this kind of selection in the <xsl:apply-templates select="XXX"/> expression, not in the pattern. But it's your application...