Skip to content
This repository was archived by the owner on Nov 2, 2020. It is now read-only.
This repository was 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

@dmj

Description

@dmj

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugDescription of a bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions