[oXygen-user] Parameter substitution in global grouped SQF fixes

Oxygen XML Editor Support (Octavian Nadolu)
Wed Dec 23 03:54:47 CST 2015


Hello Amanda,

Yes, the quick fix groups with abstract parameters, that are defined 
globally, does not work in oXygen. Thank you for reporting this problem. 
I added an issue on our issue tracker regarding it. I can give you a 
patch when the problem will be fixed, if you want.

Best Regards,
Octavian
-- 
Octavian Nadolu
<oXygen/> XML Editor
http://www.oxygenxml.com

On 22.12.2015 19:29, Amanda Galtman wrote:
> Hi,
>
> I've read in the Schematron Quick Fixes spec that a fix definition or fix group can be global inside <sqf:fixes> or it can be local inside a given Schematron <rule> element. I am seeing cases where a fix group with an abstract parameter works as expected when the fix is inside <rule>, but the parameter substitution does not happen when the fix is inside <sqf:fixes>. The Schematron part of the substitution works as expected, so the problem seems restricted to the quick-fix. The substitution also works when I don't group fixes inside <sqf:group>.
>
> The April 2015 draft of the SQF spec says "To be done" in the "Variables and parameter" section. I am not sure whether I'm doing something wrong, or whether the implementation is incomplete. I'm hoping someone on the list knows more.
>
>
> Here's a simple test case that you can put inside the DocBook 5.0 RelaxNG schema. (The "s" namespace is http://purl.oclc.org/dsdl/schematron and I also had to add the sqf namespace definition.)
>
>    <sqf:fixes>
>      <sqf:group id="testfix">
>        <sqf:fix id="testfix1">
>          <sqf:param name="expectedrolevalue" abstract="true"/>
>          <sqf:description>
>            <sqf:title>Set role=$expectedrolevalue</sqf:title>
>            <sqf:p>Set the role attribute to the value '$expectedrolevalue'.</sqf:p>
>          </sqf:description>
>          <sqf:add node-type="attribute" target="role">$expectedrolevalue</sqf:add>
>        </sqf:fix>
>      </sqf:group>
>    </sqf:fixes>
>
>    <s:pattern abstract="true" id="testcase_ABSTRACT">
>      <s:rule context="db:para/db:$childname">
>        <s:assert test="@role='$expectedrolevalue'" sqf:fix="testfix">Expected role attribute to be set to $expectedrolevalue.</s:assert>
>      </s:rule>
>    </s:pattern>
>
>    <s:pattern is-a="testcase_ABSTRACT">
>      <s:param name="childname" value="literal"/>
>      <s:param name="expectedrolevalue" value="blah"/>
>    </s:pattern>
>
> The quick fix doesn't properly substitute "blah" for $expectedrolevalue. But it does if you either remove <sqf:group> and change id="testfix1" to id="testfix", OR move the entire <sqf:group> element into <s:rule>.
>
>
> Thanks,
> Amanda
> _______________________________________________
> oXygen-user mailing list
> 
> https://www.oxygenxml.com/mailman/listinfo/oxygen-user
>





More information about the oXygen-user mailing list