[Schematron] Forbidden words
Post here questions and problems related to editing and publishing DITA content.
-
- Posts: 6
- Joined: Tue Feb 04, 2020 10:16 am
[Schematron] Forbidden words
I have a Schematron rule to detect forbidden words, it works well, but I can't show just the word to modify in the paragraph. The interface shows only the beginning of the paragraph as in the attached image
Here is my code, I tried several things without ever finding the solution maybe it is impossible to underline just the word in a paragraph with Schematron?
fWords.png
.Here is my code, I tried several things without ever finding the solution maybe it is impossible to underline just the word in a paragraph with Schematron?
Code: Select all
<sch:rule context="//text()">
<sch:report role="warn" test="(not (normalize-space('will')='')
and parent::node()/local-name() != 'ph'">
The word "will" should not be used.
</sch:report>
</sch:rule>
You do not have the required permissions to view the files attached to this post.
-
- Posts: 9450
- Joined: Fri Jul 09, 2004 5:18 pm
Re: [Schematron] Forbidden words
Hi,
The Schematron validation highlights entire elements based on the validation rules you write, so you cannot highlight a specific word in the text content using Schematron rules. We have an internal issue for this and if we manage to implement it we'll update this forum thread.
In the meantime I would recommend our free to use Terminology Checker add-on:
https://www.oxygenxml.com/doc/versions/ ... addon.html
As an example we use it for the Oxygen user's manual with the Microsoft Style Guide rules taken from the Vale project:
https://github.com/oxygenxml/userguide/ ... rm-checker
Regards,
Radu
The Schematron validation highlights entire elements based on the validation rules you write, so you cannot highlight a specific word in the text content using Schematron rules. We have an internal issue for this and if we manage to implement it we'll update this forum thread.
In the meantime I would recommend our free to use Terminology Checker add-on:
https://www.oxygenxml.com/doc/versions/ ... addon.html
As an example we use it for the Oxygen user's manual with the Microsoft Style Guide rules taken from the Vale project:
https://github.com/oxygenxml/userguide/ ... rm-checker
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 922
- Joined: Thu May 02, 2019 2:32 pm
Re: [Schematron] Forbidden words
Post by chrispitude »
I will add my vote for Terminology Checker!
We were using Schematron for our style guide checks on text() elements, and we hit the same limitation that only the beginning of the text() elements are highlighted.
When the recent 3.0.0 update to Terminology Checker came out, I saw that it had some enhancements I was waiting for, and I decided to try it out. I am happy to say that it works very well! It is a big step forward for our style guide checks.
Terminology Checker checks are also easier to write than Schematron checks. And I was able to write a quick perl script that converted our Schematron regular-expression checks on text() elements to Terminology Checker regular-expression checks, which made migration very easy.
Plus, you can check an entire book on-demand by right-clicking the map in the DITA Maps Manager and running Terminology Checker from there.
We do have some XPath-specific checks that must remain in Schematron for now. We filed EXM-48448 for Terminology Checker to support XPath-specific checks.
We also filed EXM-48463 for Terminology Checker to consider the "Ignore elements" list used by spell-checking and AutoCorrect (defined in Preferences > Editor > Spell Check), so all the textual features are consistent with each other.
We were using Schematron for our style guide checks on text() elements, and we hit the same limitation that only the beginning of the text() elements are highlighted.
When the recent 3.0.0 update to Terminology Checker came out, I saw that it had some enhancements I was waiting for, and I decided to try it out. I am happy to say that it works very well! It is a big step forward for our style guide checks.
Terminology Checker checks are also easier to write than Schematron checks. And I was able to write a quick perl script that converted our Schematron regular-expression checks on text() elements to Terminology Checker regular-expression checks, which made migration very easy.
Plus, you can check an entire book on-demand by right-clicking the map in the DITA Maps Manager and running Terminology Checker from there.
We do have some XPath-specific checks that must remain in Schematron for now. We filed EXM-48448 for Terminology Checker to support XPath-specific checks.
We also filed EXM-48463 for Terminology Checker to consider the "Ignore elements" list used by spell-checking and AutoCorrect (defined in Preferences > Editor > Spell Check), so all the textual features are consistent with each other.
Return to “DITA (Editing and Publishing DITA Content)”
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ Artificial Intelligence (AI Positron Assistant add-on)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service