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:report test="matches(.,'_')" sqf:fix="ReplaceUnderscore1" role="error">IDs must not contain underscores.</sch:report>
<sqf:title>Replace the underscores with hyphens.</sqf:title>
<sqf:stringReplace match="text()" regex="_">-</sqf:stringReplace>
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.