Skip to content
This repository has been archived by the owner on Nov 2, 2020. It is now read-only.

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

Open
dmj opened this issue Oct 25, 2018 · 0 comments · May be fixed by #73
Open

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

dmj opened this issue Oct 25, 2018 · 0 comments · May be fixed by #73
Labels
bug Description of a bug

Comments

@dmj
Copy link
Member

dmj commented Oct 25, 2018

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Description of a bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants