Open dmj opened 5 years ago
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
This is a long standing issue, and I tested it with the latest version and here are my results. When using your proposed Schematron
<?xml version="1.0" encoding="utf-8"?>
<sch:schema xmlns:sch="http://purl.oclc.org/dsdl/schematron" queryBinding="xslt2">
<sch:pattern>
<sch:rule context="comment()">
<sch:assert test="false()">Found a comment</sch:assert>
</sch:rule>
</sch:pattern>
</sch:schema>
and this test XML
<?xml version="1.0" encoding="UTF-8"?>
<?pi Processing instruction ?>
<element attribute="value">
<!-- Comment -->
<element>Text content</element>
</element>
I get the following output when using the ISO Schematrons:
<?xml version="1.0" encoding="UTF-8"?>
<ns2:schematron-output xmlns:ns2="http://purl.oclc.org/dsdl/svrl" title="" schemaVersion="">
<ns2:active-pattern document="C:\dev\git\ph-schematron\ph-schematron-xslt\src\test\resources\issues\github83\test.xml" />
</ns2:schematron-output>
The same error with SchXslt 1.8.5:
<?xml version="1.0" encoding="UTF-8"?>
<ns2:schematron-output xmlns:ns2="http://purl.oclc.org/dsdl/svrl">
<ns2:active-pattern documents="C:\dev\git\ph-schematron\ph-schematron-schxslt\src\test\resources\issues\github83\test.xml" />
</ns2:schematron-output>
and with the pure version:
<?xml version="1.0" encoding="UTF-8"?>
<ns2:schematron-output xmlns:ns2="http://purl.oclc.org/dsdl/svrl">
<ns2:active-pattern />
</ns2:schematron-output>
In the meantime you maybe more qualified that question yourself @dmj ???
Using the following Schematron:
And the following document:
I expect the assertion to fail.
But instead I get the following:
This was discovered with running ph-schematron 5.2.0 against a in-progress schematron testsuite. The complete test results are shown here.