[oXygen-user] Spell check: Forbidden words in a term list
Franz-Josef Knelangen
fjk at akgsoftware.de
Thu Dec 12 23:46:21 CST 2019
Hi Kris,
you could use schematron and schematron quick fix to achieve that. Here is an example from the schematron file used for the Oxygen user manual that you could adapt to your use case.
Greetings,
Franz-Josef
<sch:pattern>
<sch:rule context="text()">
<sch:report test="matches(.,'[oO][xX]ygen')
and parent::node()/local-name() != 'ph'
and parent::node()/local-name() != 'keyword'
and parent::node()/local-name() != 'xmlelement'
and parent::node()/local-name() != 'filepath'
and parent::node()/local-name() != 'indexterm'
and parent::node()/local-name() != 'shortdesc'
and parent::node()/local-name() != 'entry'
and parent::node()/local-name() != 'link'
and parent::node()/local-name() != 'dt'
and parent::node()/local-name() != 'linktext'
and parent::node()/local-name() != 'uicontrol'
and parent::node()/local-name() != 'term'
and parent::node()/local-name() != 'b'
and parent::node()/local-name() != 'xref'
and parent::node()/local-name() != 'i'
and parent::node()/local-name() != 'codeph'
and parent::node()/local-name() != 'codeblock'
and parent::node()/local-name() != 'title'" sqf:fix="replaceWithProKey">
Should use product key instead!
</sch:report>
<sqf:fix id="replaceWithProKey">
<sqf:description>
<sqf:title>Replace with product key</sqf:title>
</sqf:description>
<sqf:stringReplace regex="[oO][xX]ygen">
<ph keyref="product"/>
</sqf:stringReplace>
</sqf:fix>
</sch:rule>
</sch:pattern>
AKG Software Consulting GmbH
Franz-Josef Knelangen
Uhlandstraße 12
79423 Heitersheim
Germany
Tel.: +49 (0)7634 5612-611
Fax: +49 (0)7634 5612-300
E-Mail: fjk at akgsoftware.de
Internet: www.akgsoftware.de
Geschäftsführer: Dipl.-Ing. Artur K. Günther, Dipl.-Ing. Arno Brüggemann, Dipl.-Ing. (FH) Bernhard Feser, Dipl.-Ing. Jens Günther
Sitz der Gesellschaft: Heitersheim, HRB 310383 (Amtsgericht Freiburg)
-----Ursprüngliche Nachricht-----
Von: oXygen-user <oxygen-user-bounces at oxygenxml.com> Im Auftrag von Kristen James Eberlein
Gesendet: Donnerstag, 12. Dezember 2019 21:10
An: oxygen-user at oxygenxml.com
Betreff: [oXygen-user] Spell check: Forbidden words in a term list
________________________________
Externe E-Mail: Vorsicht beim Öffnen von Anhängen und Klicken auf Links!
________________________________
Is there a way to suggest a replacement?
For example, if I make "barcode" a forbidden word, can the Spell check message suggest "bar code"?
--
Best,
Kris
Kristen James Eberlein
Chair, OASIS DITA Technical Committee
Principal consultant, Eberlein Consulting www.eberleinconsulting.com
+1 919 622-1501; kriseberlein (skype)
_______________________________________________
oXygen-user mailing list
oXygen-user at oxygenxml.com
https://www.oxygenxml.com/mailman/listinfo/oxygen-user
More information about the oXygen-user
mailing list