Test p:add-xml-base with all=true and relative=false when a descendant element already has a relative xml:base attribute.
Test nw-add-xml-base-006.xml is expected to pass.
<p:declare-step xmlns:err="http://www.w3.org/ns/xproc-error" xmlns:p="http://www.w3.org/ns/xproc" version="3.0">
<p:output port="result"/>
<p:identity>
<p:with-input>
<document xml:base="http://example.com/documents/document.xml">
<child1/>
<child2 xml:base="c/chapter.xml">
<grandchild1 xml:base="s/section.xml"/>
</child2>
</document>
</p:with-input>
</p:identity>
<p:add-xml-base all="true" relative="false"/>
</p:declare-step>
<s:schema xmlns="http://www.w3.org/1999/xhtml" xmlns:err="http://www.w3.org/ns/xproc-error" xmlns:s="http://purl.oclc.org/dsdl/schematron" queryBinding="xslt2">
<s:pattern>
<s:rule context="/">
<s:assert test="document">Root element is not 'document'.</s:assert>
<s:assert test="document/@xml:base = 'http://example.com/documents/document.xml'">document has the wrong base URI.</s:assert>
</s:rule>
</s:pattern>
<s:pattern>
<s:rule context="/document">
<s:assert test="child1">Missing child1</s:assert>
<s:assert test="child2">Missing child2</s:assert>
<s:assert test="child1/@xml:base = 'http://example.com/documents/document.xml'">child1 has the wrong base URI.</s:assert>
</s:rule>
</s:pattern>
<s:pattern>
<s:rule context="/document/child2">
<s:assert test="@xml:base = 'http://example.com/documents/c/chapter.xml'">child2 has the wrong base URI.</s:assert>
<s:assert test="grandchild1">Missing grandchild1</s:assert>
<s:assert test="grandchild1/@xml:base = 'http://example.com/documents/c/s/section.xml'">grandchild1 has the wrong base URI.</s:assert>
</s:rule>
</s:pattern>
</s:schema>
Created test for p:add-xml-base.