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: f...@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-boun...@oxygenxml.com> Im Auftrag von Kristen 
James Eberlein
Gesendet: Donnerstag, 12. Dezember 2019 21:10
An: oxygen-user@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@oxygenxml.com
https://www.oxygenxml.com/mailman/listinfo/oxygen-user
_______________________________________________
oXygen-user mailing list
oXygen-user@oxygenxml.com
https://www.oxygenxml.com/mailman/listinfo/oxygen-user

Reply via email to