[oXygen-user] Need help with a Schematron rule
Franz-Josef Knelangen
fjk at akgsoftware.de
Wed Feb 14 06:05:01 CST 2024
Hi Frank,
the provided code works: added it to my rules.sch and removed the ph to catch all keyref‘ed elements:
<sch:pattern>
<sch:rule context="*[@keyref]">
<sch:assert test="not(contains(text(), ' '))">No blanks allowed inside keyref'ed elements</sch:assert>
</sch:rule>
</sch:pattern>
Now it reports correctly – the yellow elements have red underlines in Oxy – they don’t come over with the clipboard:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE topic PUBLIC "-//OASIS//DTD DITA Topic//EN" "topic.dtd">
<topic id="Untitled1">
<title>Test Schematron</title>
<body>
<p><ph keyref="prod-short"> </ph></p>
<p><ph keyref="prod-short"/></p>
<p><keyword keyref="prod-name"> </keyword></p>
<p><keyword keyref="prod-name"/>
</p>
</body>
</topic>
And only these 2 in the “Problems” pod:
No blanks allowed inside keyref'ed elements
No blanks allowed inside keyref'ed elements
Must be something else in your configuration…
Greetings,
Franz-Josef
Franz-Josef Knelangen
Leiter Dokumentation
Main: +49 7634 5612-0
Facebook<https://www.facebook.com/akgsoftware/> | Xing<https://www.xing.com/pages/akgsoftware> | LinkedIn<https://www.linkedin.com/company/18590571> | YouTube<https://www.youtube.com/c/AKGSoftware-infrastructure>
[cid:image002_01fef2d4-1f7d-4ea5-9727-748ef31e8852.png]
AKG Software Consulting GmbH
Uhlandstr. 12
D-79423 Heitersheim
www.akgsoftware.de<https://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 i. Br.)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.oxygenxml.com/pipermail/oxygen-user/attachments/20240214/1cc6209f/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image002_01fef2d4-1f7d-4ea5-9727-748ef31e8852.png
Type: image/png
Size: 6793 bytes
Desc: image002_01fef2d4-1f7d-4ea5-9727-748ef31e8852.png
URL: <http://www.oxygenxml.com/pipermail/oxygen-user/attachments/20240214/1cc6209f/attachment.png>
More information about the oXygen-user
mailing list