Schematron error in OxygenXML 18

<oXygen/> general issues.
grethelgomez
Posts: 16
Joined: Fri Feb 10, 2017 6:10 pm

Schematron error in OxygenXML 18

Post by grethelgomez » Tue Jan 07, 2020 11:39 pm

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.

tavy
Posts: 197
Joined: Thu Jul 01, 2004 12:29 pm

Re: Schematron error in OxygenXML 18

Post by tavy » Wed Jan 08, 2020 3:51 pm

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
Octavian Nadolu
<oXygen/> XML Editor
http://www.oxygenxml.com

grethelgomez
Posts: 16
Joined: Fri Feb 10, 2017 6:10 pm

Re: Schematron error in OxygenXML 18

Post by grethelgomez » Thu Jan 09, 2020 8:02 pm

Hello Octavian,

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

Thanks!
Grethel.

Post Reply