usnistgov / scapval

Other
4 stars 2 forks source link

SRC-10 does not provide a useful locator to problem content #6

Open gscottwilson opened 7 years ago

gscottwilson commented 7 years ago

When SRC-10 fails it provides the xpath to the overall Benchmark element, and not the specific offending element within. The schematron rule can be reworded to provide a more useful xpath

david-waltermire commented 7 years ago

We should address this using a @subject attribute on the schematron assert.

From the Schematron spec:

5.5.14 subject attribute A path allowing more precise specification of nodes. The path expression is evaluated in the context of the context node of the current rule. If no subject attribute is specified, the current subject node may be used. NOTE The subject attribute is required because the rule context may have been selected for reasons of convenience or performance, in association with the particular assertion tests. In such cases, the rule context may not be useful to identify users, and the nodes located by the subject attribute may be more useful. Similarly, it may not be possible to determine from an assertion test which nodes the the assertion test has tested. In such a case, the nodes located by the subject attribute may be more useful.