Should Schematron Quick Fixes be Offered for Attributes?
Posted: Mon Sep 28, 2015 4:30 am
Hello,
Using Author 17.0. Working in DITA.
Apologies if this is not the right place to ask, but I can't find any relevant information on this:
I have a schematron that checks ids to see if they contain underscores, which we do not allow.
I have set a quick fix to replace underscores with hyphens, like this:
The schematron finds the underscores but the quick fix is not offered.
I have tried the same quick fix with the context set as an element, and the quick fix is offered and works, so I'm assuming the problem is that quick fixes don't work for attributes. Is that correct? As I said, I can't find a definitive statement on this anywhere, and it seems strange that the schematron finds the error but the quick fix isn't offered.
Cheers,
Eddie.
Using Author 17.0. Working in DITA.
Apologies if this is not the right place to ask, but I can't find any relevant information on this:
I have a schematron that checks ids to see if they contain underscores, which we do not allow.
I have set a quick fix to replace underscores with hyphens, like this:
Code: Select all
<sch:rule context="@id">
<sch:report test="matches(.,'_')" sqf:fix="ReplaceUnderscore1" role="error">IDs must not contain underscores.</sch:report>
<sqf:fix id="ReplaceUnderscore1">
<sqf:description>
<sqf:title>Replace the underscores with hyphens.</sqf:title>
</sqf:description>
<sqf:stringReplace match="text()" regex="_">-</sqf:stringReplace>
</sqf:fix>
</sch:rule>
I have tried the same quick fix with the context set as an element, and the quick fix is offered and works, so I'm assuming the problem is that quick fixes don't work for attributes. Is that correct? As I said, I can't find a definitive statement on this anywhere, and it seems strange that the schematron finds the error but the quick fix isn't offered.
Cheers,
Eddie.