nw-xinclude-002

Tests that the base URI is preserved correctly in nested inclusions.

Test nw-xinclude-002.xml is expected to pass.

The pipeline


<p:declare-step xmlns:p="http://www.w3.org/ns/xproc" name="pipeline" version="3.0">
   <p:output port="result"/>
   <p:xinclude fixup-xml-base="true">
      <p:with-input href="../documents/four.xml"/>
   </p:xinclude>
</p:declare-step>
MorganaXProc passing XML Calabash passing

Schematron validation


<s:schema xmlns="http://www.w3.org/1999/xhtml" xmlns:s="http://purl.oclc.org/dsdl/schematron" queryBinding="xslt2">
   <s:pattern>
      <s:rule context="/">
         <s:assert test="four">Root element is not 'four'.</s:assert>
         <s:assert test="empty(four/@xml:base)">Four has an xml:base attribute.</s:assert>
         <s:assert test="ends-with(four/three/@xml:base, '/three.xml')">Three has wrong base uri.</s:assert>
         <s:assert test="ends-with(four/three/two/@xml:base, '/two.xml')">Two has wrong base uri.</s:assert>
         <s:assert test="ends-with(four/three/two/one/@xml:base, '/one.xml')">One has wrong base uri.</s:assert>
      </s:rule>
   </s:pattern>
</s:schema>

Revision history

17 May 2025, Norm Tovey-Walsh

Initial commit.