schematron
schematron copied to clipboard
Wrong order of children in svrl:failed-assert / svrl:successful-report
Given the following Schematron:
<schema xmlns="http://purl.oclc.org/dsdl/schematron" queryBinding="xslt2">
<pattern>
<rule context="/">
<assert test="false()" diagnostics="d1" properties="p1"/>
</rule>
</pattern>
<diagnostics>
<diagnostic id="d1"/>
</diagnostics>
<properties>
<property id="p1"/>
</properties>
</schema>
The skeleton creates the following SVRL report when applied:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<svrl:schematron-output xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:saxon="http://saxon.sf.net/"
xmlns:schold="http://www.ascc.net/xml/schematron"
xmlns:iso="http://purl.oclc.org/dsdl/schematron"
xmlns:xhtml="http://www.w3.org/1999/xhtml"
title=""
schemaVersion=""><!--
-->
<svrl:active-pattern document="file:/tmp/test.sch"/>
<svrl:fired-rule context="/"/>
<svrl:failed-assert test="false()"
location="/*:schema[namespace-uri()='http://purl.oclc.org/dsdl/schematron'][1]">
<svrl:text/>
<svrl:diagnostic-reference diagnostic="d1"/>
<svrl:property id="p1"/>
</svrl:failed-assert>
</svrl:schematron-output>
Here the svrl:diagnostic-reference and the svrl:property (which should read svrl:property-reference) follow the svrl:text. But the SVRL grammar declares it the other way around:
failed-assert =
element failed-assert {
attlist.assert-and-report, diagnostic-reference*, property-reference*, human-text
}