Enhancing @sch:fix

I am developing a library of validation files that makes use of a large number of schematron quick fixes. There are some <report>/<assert>s that need access to numerous global quick fixes. (I am using @sqf:use-when on the target <sqf:fix>es to filter some of these out, but I still want the options available to the source <report>/<assert> for a wide range of circumstances.) The result is a lot of clutter in @sqf:fix (every id ref itemized), which makes it hard to administer and edit.

It would be nice if [1] @sqf:fix (or an introduced alternative, say @sqf:fix-pattern) could use glob-like syntax to pick a class of fixes or [2] @sqf:fix (or an alternative, say @sqf:fixes) could pick a group of fixes by means of id reference to an <sqf:fixes> (and from there to all the children <sqf:fix>es)

Two example reports for hypothesized [1] and [2]…

. . . . . .
<report test="exists($calculated-errors)" sqf:fix-pattern="err-*">
   <value-of select="$calculated-errors/message"/>
</report>
<report test="exists($calculated-errors)" sqf:fixes="errors">
   <value-of select="$calculated-errors/message"/>
</report>
. . . . . .

…with a corresponding <sqf:fixes> that could be used in either scenario:

<sqf:fixes id="error">
   <sqf:fix id="err-01" use-when="$relevant-errors/@target = 'err-01'>
      . . . .
   </sqf:fix>
   <sqf:fix id="err-02"  use-when="$relevant-errors/@target = 'err-02'>
      . . . .
   </sqf:fix>
</sqf:fixes>

Thoughts?

jk
--
Joel Kalvesmaki
Editor in Byzantine Studies
Dumbarton Oaks
202 339 6435

Received on Tuesday, 26 July 2016 23:36:14 UTC