Ok. I tried to test the code with Saxon 6.5.2 with the following stuff:
XML source document:
Code:
<?xml version="1.0" encoding="UTF-8"?>
<document>
<article>
<title>Title#1</title>
</article>
<article>
<title>Title#2</title>
</article>
<article>
<title>Title#3</title>
</article>
</document>
XSL stylesheet:
Code:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="article">
<xsl:apply-templates select="title"/>
</xsl:template>
<xsl:template match="article[position()=1]">
<xsl:apply-templates select="title"/>
</xsl:template>
<xsl:template match="article[position()=1]/title">
<xsl:text>Title#1</xsl:text>
</xsl:template>
<xsl:template match="article[position()>1]/title">
<xsl:text>Title#x</xsl:text>
</xsl:template>
</xsl:stylesheet>
and got the following output:
Code:
Title#1
Title#x
Title#x
That is, it's working fine.
Try to test exactly the same code with the same source doc. It's interesting: what will be the output with libxslt 10032? May be you need to add a template rule for the document root(/)? Although built-in template is applied when it's not there, but in any case try to put also the template rule for document root.
Regards,
Armen