<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <p>Hi all,</p>
    <p><br>
    </p>
    <p>I want to write a Schematron rule which checks whether a
      keyref'ed element contains a blank character.</p>
    <p><br>
    </p>
    <p>WRONG:   <ph keyref="mykey"> </ph><br>
    </p>
    <p>CORRECT: <ph keyref="mykey"></ph></p>
    <p><br>
    </p>
    <p>I adapted another rule and tried the following, but it does not
      work as expected.<br>
      In addition, it should apply to any keyref'ed element, not only to
      <ph>.</p>
    <p><br>
    </p>
    <p>  <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>><br>
          <sch:rule context="*[contains(@class, 'ph')][@keyref]"><br>
            <sch:assert test="not(contains(text(), ' '))">No blank
      allowed inside keyref'ed ph elements</sch:assert><br>
          </sch:rule><br>
        </sch:pattern></p>
    <p><br>
    </p>
    <p>Any help would be greatly appreciated.</p>
    <p><br>
    </p>
    <p>Regards,</p>
    <p>Frank<br>
    </p>
    <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>