Could someone explain me why the following gives me the error:
Keyword xsl:template may not contain xsl:next-match
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl = "http://www.w3.org/1999/XSL/Transform" version = "3.0">
<xsl:template match="*">
<xsl:value-of select="name(.)"/><br/>
<xsl:apply-templates/>
</xsl:template>
<xsl:template match="rc2">
<h1>this is first match</h1>
<xsl:next-match/>
</xsl:template>
</xsl:stylesheet>
while this version gives no error, but of course it does only one match
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl = "http://www.w3.org/1999/XSL/Transform" version = "3.0">
<xsl:template match="*">
<xsl:value-of select="name(.)"/><br/>
<xsl:apply-templates/>
<xsl:next-match/>
</xsl:template>
<xsl:template match="rc2">
<h1>this is first match</h1>
</xsl:template>
</xsl:stylesheet>
my test xml file is:
<?xml version="1.0"?>
<rc2/>
(question revision edit) i'm using Msxml2.XSLTemplate.6.0, Msxml2.FreeThreadedDOMDocument.6.0 and Msxml2.DOMDocument.6.0