Skip to content

Rule not fired when context is a comment node #83

Description

@dmj

Using the following Schematron:

<sch:schema>
  <sch:pattern>
    <sch:rule context="comment()">
      <sch:assert test="false()"/>
    </sch:rule>
  </sch:pattern>
</sch:schema>

And the following document:

<?pi Processing instruction ?>
<element attribute="value">
  <!-- Comment -->
  <element>Text content</element>
</element>

I expect the assertion to fail.

But instead I get the following:

<?xml version="1.0" encoding="UTF-8"?>
<schematron-output xmlns="http://purl.oclc.org/dsdl/svrl">
  <active-pattern/>
</schematron-output>

This was discovered with running ph-schematron 5.2.0 against a in-progress schematron testsuite. The complete test results are shown here.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions