<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<p>Hm,</p>
<p><br>
</p>
<p>The rule incorrectly outputs the warning when there is no blank
in the element, even with the change you're proposing.</p>
<p><br>
</p>
<p>All DITA elements seem to have a class attribute. The other
Schematron rules I am using are all written with class attributes
and they work.</p>
<p><br>
</p>
<p>I don't know if the following has to do with this issue. Since
today I am always getting the following error when I save a
Schematron rule. I then click "Save anyway".<br>
</p>
<blockquote>
<p><font face="Courier New, Courier, monospace">access denied
("java.security.AllPermission" "<all permissions>"
"<all actions>")</font><br>
</p>
</blockquote>
<p>I don't know what is causing this.</p>
<p><br>
</p>
<hr width="100%" size="2">
<p><br>
</p>
<div class="moz-cite-prefix">Am 14.02.2024 um 10:02 schrieb David
Maus:<br>
</div>
<blockquote type="cite" cite="mid:87mss3ju54.wl-lists@dmaus.name">
<pre class="moz-quote-pre" wrap="">Moin!
On Wed, 14 Feb 2024 09:48:18 +0100,
Frank Dissinger wrote:
</pre>
<blockquote type="cite">
<pre class="moz-quote-pre" wrap="">
[1 <multipart/alternative (7bit)>]
[1.1 <text/plain; UTF-8 (8bit)>]
[1.2 <text/html; UTF-8 (8bit)>]
Hi all,
I want to write a Schematron rule which checks whether a keyref'ed element contains a blank character.
WRONG: <ph keyref="mykey"> </ph>
CORRECT: <ph keyref="mykey"></ph>
I adapted another rule and tried the following, but it does not work as expected.
In addition, it should apply to any keyref'ed element, not only to <ph>.
<sch:pattern id="Check_blanks" xmlns:sch=<a class="moz-txt-link-rfc2396E" href="http://purl.oclc.org/dsdl/schematron">"http://purl.oclc.org/dsdl/schematron"</a>>
<sch:rule context="*[contains(@class, 'ph')][@keyref]">
<sch:assert test="not(contains(text(), ' '))">No blank allowed inside keyref'ed ph elements</sch:assert>
</sch:rule>
</sch:pattern>
</pre>
</blockquote>
<pre class="moz-quote-pre" wrap="">
Your rule matches all elements with @keyref and with an @class
attribute that contains 'ph'.
The two examples do not have a @class attribute, thus the rule doesn't
fire.
Maybe rewrite the rule as
sch:rule context="*[@keyref]"?
HTH,
-- David
</pre>
<blockquote type="cite">
<pre class="moz-quote-pre" wrap="">
Any help would be greatly appreciated.
Regards,
Frank
--
Frank Dissinger
Documentation Manager
....................................................................
CGS ORIS GmbH
Email <a class="moz-txt-link-abbreviated" href="mailto:frank.dissinger@cgs-oris.com">frank.dissinger@cgs-oris.com</a> | Web <a class="moz-txt-link-abbreviated" href="http://www.cgs-oris.com">www.cgs-oris.com</a>
Address Kettelerstr. 24 | D-63512 Hainburg | Germany
Phone +49 6182 9626-27 | Fax +49 6182 9626-99
Commercial register Offenbach, HRB no. 21495
Managing directors Bernd Rückert, Christoph Thommessen
</pre>
</blockquote>
</blockquote>
<div class="moz-signature">-- <br>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<title></title>
<div class="moz-signature">
<style>
div.signature {font-family: Verdana, sans-serif; font-size: 10pt; color: #7F8C8D; padding-top: 0.4em;}
div.name {padding-bottom: 0.8em; padding-top: 0.8em}
div.contact {padding-bottom: 0.8em;}
p {margin: 0;}
span.separator {border-top-style: dotted; border-top-width: 2px; padding-top: 0.6em;}
a {color: inherit}
</style>
<div class="signature">
<div class="name">
<p><strong>Frank Dissinger</strong></p>
<p>Documentation Manager</p>
<p>....................................................................</p>
</div>
<div class="contact">
<p><strong>CGS ORIS GmbH</strong></p>
<p><strong>Email </strong><a
href="mailto:frank.dissinger@cgs-oris.com"
target="_blank" class="moz-txt-link-freetext">frank.dissinger@cgs-oris.com</a>
| <strong>Web</strong> <a
href="http://www.cgs-oris.com/" target="_blank">www.cgs-oris.com</a></p>
<p><strong>Address</strong> Kettelerstr. 24 | D-63512
Hainburg | Germany</p>
<p><strong>Phone</strong> +49 6182 9626-27 | <strong>Fax</strong>
+49 6182 9626-99</p>
<p><strong>Commercial register</strong> Offenbach, HRB no.
21495</p>
<p><strong>Managing directors</strong> Bernd Rückert,
Christoph Thommessen</p>
<p><br>
</p>
<a href="https://www.cgs-oris.com/signatur"><img
alt="https://www.cgs-oris.com/Signatur.png"
longdesc="https://www.cgs-oris.com/signatur"
src="https://www.cgs-oris.com/Signatur.png" width="394"
height="200"></a> </div>
</div>
</div>
</div>
</body>
</html>