Page 1 of 1

Schematron error in OxygenXML 18

Posted: Tue Jan 07, 2020 11:39 pm
by grethelgomez
Hi,

We use Schematrons to check our DITA content. For the moment, some of our authors use OxygenXML 21 and others use 18.
We recently added the following QuickFix in one of our rules:

Code: Select all

<sqf:fix id="addProdname" use-for-each="//series/keyword/@conkeyref">
	<xsl:variable name="newProdname" select="substring-after(substring-after($sqf:current,'/'),'_')" />
	<sqf:description>
		<sqf:title><sch:value-of select="$newProdname"/></sqf:title>
	</sqf:description>
	<sqf:add match="//prodname" target="base" node-type="attribute">
		<sch:value-of select="$newProdname"/>
	</sqf:add>
</sqf:fix>
OxygenXML 18 shows the following error, but not 21: cvc-complex-type.3.2.2: Attribute 'use-for-each' is not allowed to appear in element 'sqf:fix'.

Is there a way to tell OxygenXML 18 that this shouldn't be considered an error?

Thanks!
Grethel.

Re: Schematron error in OxygenXML 18

Posted: Wed Jan 08, 2020 3:51 pm
by tavy
Hello Grethel,

Unfortunately, in Oxygen XML Editor version 18 the SQF "use-for-each" feature is not available. Therefore, you cannot use a quick fix that has the "use-for-each" attribute.
The only way to avoid the error is to have this rule implemented differently for the two versions of Oxygen. Maybe add this rule in a separate Schematron file that is not active for Oxygen version 18, and create a different rule for Oxygen version 18 that will not have a quick fix or will have a different quick fix. To implement this you can have different project files for v18 and v21, and different validation depending on the current opened project.

Best Regards,
Octavian

Re: Schematron error in OxygenXML 18

Posted: Thu Jan 09, 2020 8:02 pm
by grethelgomez
Hello Octavian,

Using different projects is a great idea. I will give it a try.

Thanks!
Grethel.