SQF on XSpec
Posted: Fri Jul 01, 2022 10:36 pm
Hi. Just got done with my SQF validation on our Schematron modules, now working on an XSpec SQF. I was a bit thrown when I didn't see the quick fix "light bulb" on something that was clearly being warned about - I usually use that rather than the mouse-over. The mouse-over was there, but not the light bulb - is this a configuration thing or a bug?
Scott
Scott
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<sch:schema queryBinding="xslt2"
xmlns:sch="http://purl.oclc.org/dsdl/schematron"
xmlns:x="http://www.jenitennison.com/xslt/xspec"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:sqf="http://www.schematron-quickfix.com/validator/process">
<sch:ns uri="http://www.jenitennison.com/xslt/xspec" prefix="x"/>
<sch:pattern id="sqf-run-as">
<sch:rule context="x:description">
<sch:assert test="@run-as = 'external'" sqf:fix="add-run-as" id="sch0001" role="warn">
<sch:name/> SHOULD have @run-as="external" set unless it is known to cause issues.
</sch:assert>
<sqf:fix id="add-run-as">
<sqf:description>
<sqf:title>Add x:description/@run-as="external"</sqf:title>
</sqf:description>
<sqf:add node-type="attribute" target="run-as" select="'external'"/>
</sqf:fix>
</sch:rule>
</sch:pattern>
</sch:schema>