Closed dmj closed 4 years ago
Funny. I see that the skeleton implementation creates a @document property on svrl:active-pattern. This would imply that a processor should report a pattern to be active for every (subordinate) document. Is this the intended behaviour?
I was expecting that the intention would have been lost in the mists of time, but there is this entry in the initial comment:
2009-02-19
* RJ add experimental non-standard attribute active-pattern/@document which says which
document is being validated from that point to the next similar. This is to cope with the
experimental multi-document validation in the XSLT2 skeleton.
Okay, I see. Do you know if the svrl:active-pattern/@document will be included in an updated ISO spec?
@AndrewSales?
Sorry, to clarify: Schematron 2016 already defines svrl:active-pattern@documents in Annex D.2
# only active patterns are reported
active-pattern =
element active-pattern {
attribute id { xsd:NMTOKEN }?,
attribute documents { text }?,
attribute name { text }?,
attribute role { xsd:NMTOKEN }?,
empty
}
There it also reads:
Elements related to the same subordinate document should be grouped together.
The skeleton implementation creates a @document (singular) attribute with the document URI of the initial context document (i.e. not the subordinate document).
I think I am at a loss here.
As things stand, I would assume that the SVRL would indeed have to feature an active-pattern
per subordinate document or set of subordinate documents with their IRIs only as the value of documents
, in order to make explicit which context document(s) the fired-rule
s that follow it in the group apply to.
I would be inclined to agree, @dmj (if my interpretation is correct), that this is not very clear from the text of the standard.
Perhaps it is safer at this point to allow active-pattern/@documents
to stand, but also allow fired-rule/@document
as you propose.
Noting that attribute document { xsd:anyURI }?
was scheduled for addition to the named pattern fired-rule
in the 2020 standard, in order to address this technical defect in this (informative) Annex.
Schematron 2016 added the optional @documents attribute to indicate subordinate documents that should act as context for the pattern's rule. But there is no attribute in SVRL to indicate the document a rule fired in.
One might put it in the @location of svrl:failed-assert/svrl:successful-report (i.e. location="document('...')/...") but this seems wrong to me. A report consuming application would have to parse out this information.
I think it would be best if SVRL provided a way to explicitely report the document.