-
Notifications
You must be signed in to change notification settings - Fork 0
svrl home
This page lists the enhancements and proposals related to the Schematron Validation Reporting Language (SVRL).
Issue(s): #7
Description:
The Schematron standard defines SVRL by providing a (RelaxNG) schema only. There is no description on how to get from executing a Schematron-schema to the resulting SVRL. Both the older "skeleton" implementation and the newer "SchXslt" implementation create something that seems obvious. But this still leaves the exact production rules undefined. It's not a good idea to leave important things in standards to being obvious.
Proposed resolution:
Create a list of events that happen during Schematron execution and the resulting effects in the SVRL. For example:
- When a
pattern
becomes active, anactive-pattern
element appears in the SVRL as a direct child of the root element.- The attributes of this
active-pattern
element are computed as follows:-
id
: … -
documents
: … -
name
: … -
role
: …
-
- The attributes of this
- When a
rule
fires (when itscontext
attribute matches a node in the document to validate) afired-rule
element appears in the SVRL as a direct child of the root element.- The attributes … (etc.)
Remarks
There is some discussion about whether SVRL should be more nested (for instance fired-rule
as the child of active-pattern
instead of as its sibling). Although we can consider this, that's not what this is about. This is about defining unambiguously how SVRL is produced, including all attributes, from executing a Schematron-schema. Nesting or not is a different subject and should be treated as such.
Issue(s): #5
Description:
There are several attributes in SVRL that have, according to the SVRL schema, a different type than the same attribute in the official Schematron schema. Usually the SVRL type is not only different but also wrong for what the attribute stands for.
Proposed resolution:
Make sure that attributes which should (supposedly, see Define the production rules for SVRL) be copied from the Schematron schema on producing the SVRL have the same (or at least a correct) type.
Details:
The following table contains (in random order) the problems found so far.
Schematron attribute | Schematron type | SVRL attribute | SVRL type | Proposed resolution |
---|---|---|---|---|
phase/@id |
xs:ID |
schematron-output/@phase |
xs:NMTOKEN |
Change SVRL type to Schematron type. xs:NMTOKEN is wrong, it can contain a colon. |
/*/@schemaVersion |
non-empty string | /*/@schemaVersion |
untyped | Change SVRL type to Schematron type. |
ns/@prefix |
xs:string |
ns-prefix-in-attribute-values/@prefix |
xs:NMTOKEN |
Change SVRL type to Schematron type. xs:NMTOKEN is wrong, it can contain a colon. |
ns/@uri |
xs:anyURI |
ns-prefix-in-attribute-values/@uri |
untyped | Change SVRL type to Schematron type. |
pattern/@id |
xs:ID |
active-pattern/@id |
xs:NCName |
Change SVRL type to Schematron type. |
rule/@id |
xs:ID |
fired-rule/@id |
xs:NCName |
Change SVRL type to Schematron type. |
assert/@id |
xs:ID |
failed-assert/@id |
xs:NCName |
Change SVRL type to Schematron type. |
assert/@test |
xs:string |
failed-assert/@test |
untyped | Change SVRL type to Schematron type. |
diagnostic/@id |
xs:ID |
diagnostic-reference/@diagnostic |
xs:NMTOKEN |
Change SVRL type to Schematron type. xs:NMTOKEN is wrong, it can contain a colon. |
property/@id |
xs:ID |
property-reference/@property |
xs:NMTOKEN |
Change SVRL type to Schematron type. xs:NMTOKEN is wrong, it can contain a colon. |
Issue(s): #5
Description:
SVRL is an XML language that is produced, not created by hand. So elements and attributes in SVRL should have some connection to the Schematron executed to fill them. This does not always (supposedly, see Define the production rules for SVRL) seems to be the case.
Proposed resolution:
Make sure that for all attributes in SVRL it is clear how to produce/fill them. If this cannot be done in an obvious way, either remove the attribute from the SVRL, add it to Schematron or define a clear rule on how to fill it.
Details:
The following table contains (in random order) the attributes with problems found so far.
SVRL attribute | Remark |
---|---|
/schematron-output/@title |
- |
active-pattern/@name |
- |
active-pattern/@role |
- |
fired-rule/@name |
- |
active-pattern/@name |
- |
dir/@class |
Adding a class attribute to Schematron here probably makes sense. |
emph/@class |
Adding a class attribute to Schematron here probably makes sense. |
fired-rule/@document |
Unclear what its contents should be. Probably the (relative/absolute?) URI of the document the rule fired against. No implementation seen so far produces it in its SVRL. |
dir/@dir |
This attribute is called dir/@value in Schematron. Why it has a different name in the SVRL is unclear. |