<xsl:template match="alg:*[count(parent::md:Extensions)=0]">
<xsl:call-template name="error">
<xsl:with-param name="m">
<xsl:text>alg:</xsl:text>
<xsl:value-of select="local-name()"/>
<xsl:text> must only appear within an Extensions element</xsl:text>
</xsl:with-param>
</xsl:call-template>
</xsl:template>
Was converted from the match pattern alg:*[not(parent::md:Extensions)] to alg:*[count(parent::md:Extensions)=0] to overcome a potential bug in the native Java XSLT processor. This might not be the most effective way to find such errors, so needs review. An alternative exists (but is more generic on the match, so might prevent further templates from matching on alg:).
<xsl:template match="alg:*">
<xsl:if test="not(parent::md:Extensions)">
<xsl:call-template name="error">
<xsl:with-param name="m">
<xsl:text>alg:</xsl:text>
<xsl:value-of select="local-name()"/>
<xsl:text> must only appear within an Extensions element</xsl:text>
</xsl:with-param>
</xsl:call-template>
</xsl:if>
</xsl:template>
The template:
Was converted from the match pattern
alg:*[not(parent::md:Extensions)]
toalg:*[count(parent::md:Extensions)=0]
to overcome a potential bug in the native Java XSLT processor. This might not be the most effective way to find such errors, so needs review. An alternative exists (but is more generic on the match, so might prevent further templates from matching onalg:
).