schematron icon indicating copy to clipboard operation
schematron copied to clipboard

Does not validate if rule context is a processing instruction or comment

Open dmj opened this issue 7 years ago • 0 comments

The variable 'only-child-elements' is calculated wrongly:

https://github.com/Schematron/schematron/blob/master/trunk/schematron/code/iso_schematron_skeleton_for_saxon.xsl#L486

<xsl:param name="only-child-elements">
  <xsl:choose>
    <xsl:when test="//iso:rule[contains(@context,'(')]">true</xsl:when>
    <xsl:otherwise>false</xsl:otherwise>
  </xsl:choose>
</xsl:param>

If @context contains a paren then only-child-elements should be false, not true.

This is convered by https://github.com/dmj/schematron-test/blob/t/more-tests/rule/rule-context-01.xspec

dmj avatar Oct 25 '18 14:10 dmj