<div style="font-family: Arial, sans-serif; font-size: 14px;">Thanks.<br></div><div style="font-family: Arial, sans-serif; font-size: 14px;"><br></div><div style="font-family: Arial, sans-serif; font-size: 14px;">With the documents attribute, it works with SchXslt and doesn't work in Oxygen. Without the documents attribute, it works in Oxygen and doesn't work in SchXslt. So it seems like there's no way to write a Schematron schema that uses XInclude that will work everywhere. It seems like it must be a bug in either Oxygen or SchXslt. I thought it was an Oxygen bug because the SchXslt behaviour corresponds to the Schematron book. But I'm just learning Schematron so I can't be sure.</div><div style="font-family: Arial, sans-serif; font-size: 14px;"><br></div><div style="font-family: Arial, sans-serif; font-size: 14px;">-- <br></div><div style="font-family: Arial, sans-serif; font-size: 14px;">Danny MacMillan<br></div><div style="font-family: Arial, sans-serif; font-size: 14px;"><br></div>
<div class="protonmail_signature_block" style="font-family: Arial, sans-serif; font-size: 14px;">
    <div class="protonmail_signature_block-user protonmail_signature_block-empty">
        
            </div>
    
            <div class="protonmail_signature_block-proton">
        Sent with <a target="_blank" href="https://proton.me/" rel="noopener noreferrer">Proton Mail</a> secure email.
    </div>
</div>
<div style="font-family: Arial, sans-serif; font-size: 14px;"><br></div><div class="protonmail_quote">
        ------- Original Message -------<br>
        On Thursday, May 11th, 2023 at 00:19, Oxygen XML Editor Support (Octavian Nadolu) <support@oxygenxml.com> wrote:<br><br>
        <blockquote class="protonmail_quote" type="cite">
            
    <div class="moz-cite-prefix">Hello Danny, </div>
    <div class="moz-cite-prefix"><br>
    </div>
    <div class="moz-cite-prefix">The XInclude is automatically expanded
      when you validate with Schematron in Oxygen. Therefore, you do not
      need to use the "documents" attribute. The sample
      subdocuments-1.sch file can be changed something like this:<br>
    </div>
    <div class="moz-cite-prefix"><br>
    </div>
    <div class="moz-cite-prefix"><?xml version="1.0"
      encoding="UTF-8"?><br>
      <schema xmlns=<a href="http://purl.oclc.org/dsdl/schematron" class="moz-txt-link-rfc2396E" rel="noreferrer nofollow noopener" target="_blank">"http://purl.oclc.org/dsdl/schematron"</a>
      queryBinding="xslt3"><br>
        <pattern><br>
          <rule context="p"><br>
            <assert test="@class ne 'brightred'"><br>
              The class <value-of select="@class"/> is forbidden <br>
              (<value-of select="base-uri(.)"/>)!<br>
            </assert><br>
          </rule><br>
        </pattern><br>
      </schema><br>
    </div>
    <div class="moz-cite-prefix"><br>
    </div>
    <div class="moz-cite-prefix">Best Regards,</div>
    <div class="moz-cite-prefix">Octavian<br>
    </div>
    <div class="moz-cite-prefix"><br>
    </div>
    <div class="moz-cite-prefix">On 5/10/2023 12:21 AM, Danny MacMillan
      wrote:<br>
    </div>
    <blockquote type="cite">
      
      <div style="font-family: Arial, sans-serif; font-size: 14px;">Hello,</div>
      <div style="font-family: Arial, sans-serif; font-size: 14px;"><br>
      </div>
      <div style="font-family: Arial, sans-serif; font-size: 14px;">I'm
        going through the Schematron book by Erik Siegel and one of his
        examples improperly passes validation in Oxygen XML while it
        correctly fails validation using SchXslt.</div>
      <div style="font-family: Arial, sans-serif; font-size: 14px;"><br>
      </div>
      <div style="font-family: Arial, sans-serif; font-size: 14px;">The
        code for the book is here: <span><a href="https://github.com/xatapult/schematron-book-code.git" rel="noreferrer nofollow noopener" target="_blank">https://github.com/xatapult/schematron-book-code</a></span><br>
      </div>
      <div style="font-family: Arial, sans-serif; font-size: 14px;"><br>
      </div>
      <div style="font-family: Arial, sans-serif; font-size: 14px;">I
        open both <span>examples/additional-features/subdocuments-1.sch</span>
        and <span>data/subdocuments-master.xml</span> from that project
        in Oxygen and select the tab with the XML file. Then I click the
        dropdown on the Validation button on the toolbar and click
        Validate with... and then I select the subdocuments-1.sch file
        using the dropdown. When I proceed Oxygen says it passes. This
        is the same approach I have used for all other examples in the
        book. But I created an explicit validation scenario for this
        also and it behaves the same way.</div>
      <div style="font-family: Arial, sans-serif; font-size: 14px;"><br>
      </div>
      <div style="font-family: Arial, sans-serif; font-size: 14px;">Note
        that if you want to test this you should clone the repository
        because the subdocuments-master.xml file incorporates other
        files in the repository by reference using XInclude and this is
        indeed what seems not to be working in Oxygen.<br>
      </div>
      <div style="font-family: Arial, sans-serif; font-size: 14px;"><br>
      </div>
      <div style="font-family: Arial, sans-serif; font-size: 14px;">By
        contrast if I run the same validation using the schxslt-cli.jar
        I get the following, expected result.</div>
      <div style="font-family: Arial, sans-serif; font-size: 14px;"><br>
      </div>
      <div style="font-family: Arial, sans-serif; font-size: 14px;"><span style="font-family: Menlo, Consolas, Courier New, monospace;">[invalid]
/home/user/task/schematron-book-code/data/subdocuments-master.xml</span>
        <div><span style="font-family: Menlo, Consolas, Courier New,
            monospace;">[invalid]
            /home/user/task/schematron-book-code/data/subdocuments-master.xml
            failed-assert /Q{}document[1]/Q{}p[1] </span></div>
        <div><span style="font-family: Menlo, Consolas, Courier New,
            monospace;">        The class brightred is forbidden </span></div>
        <div><span style="font-family: Menlo, Consolas, Courier New,
            monospace;">       
            (<a class="moz-txt-link-freetext" rel="noopener noreferrer" target="_blank">file:/home/user/task/schematron-book-code/data/subdocuments-2.xml</a>)!</span></div>
        <span></span></div>
      <div style="font-family: Arial, sans-serif; font-size: 14px;"><br>
      </div>
      <div style="font-family: Arial, sans-serif; font-size: 14px;">I am
        using the latest Oxygen: <span><oXygen/> XML Editor 25.1,
          build 2023042509</span><br>
      </div>
      <div style="font-family: Arial, sans-serif; font-size: 14px;"><br>
      </div>
      <div style="font-family: Arial, sans-serif; font-size: 14px;">Thanks,</div>
      <div style="font-family: Arial, sans-serif; font-size: 14px;"><br>
      </div>
      <div style="font-family: Arial, sans-serif; font-size: 14px;">-- <br>
      </div>
      <div style="font-family: Arial, sans-serif; font-size: 14px;">Danny
        MacMillan<br>
      </div>
      <br>
      <div style="font-family:
        Arial, sans-serif; font-size: 14px;" class="protonmail_signature_block">
        <div class="protonmail_signature_block-proton"> Sent with <a rel="noreferrer nofollow noopener" href="https://proton.me/" target="_blank">Proton Mail</a> secure
          email. </div>
      </div>
      <br>
      <fieldset class="moz-mime-attachment-header"></fieldset>
      <pre class="moz-quote-pre">_______________________________________________
oXygen-user mailing list
<a href="mailto:oXygen-user@oxygenxml.com" class="moz-txt-link-abbreviated" rel="noreferrer nofollow noopener" target="_blank">oXygen-user@oxygenxml.com</a>
<a href="https://www.oxygenxml.com/mailman/listinfo/oxygen-user" class="moz-txt-link-freetext" rel="noreferrer nofollow noopener" target="_blank">https://www.oxygenxml.com/mailman/listinfo/oxygen-user</a>
</pre>
    </blockquote>
    <p><br>
    </p>
    <pre cols="72" class="moz-signature">--
Octavian Nadolu
<oXygen/> XML Editor
<a href="http://www.oxygenxml.com" class="moz-txt-link-freetext" rel="noreferrer nofollow noopener" target="_blank">http://www.oxygenxml.com</a></pre>
  


        </blockquote><br>
    </div>