nw-base-uri-008
Test that the result of p:json-merge has no base URI.
Test is expected to pass.
The pipeline
<p:declare-step xmlns:c="http://www.w3.org/ns/xproc-step"
xmlns:p="http://www.w3.org/ns/xproc"
xmlns:t="http://xproc.org/ns/testsuite/3.0" version="3.0">
<p:output port="result"/>
<p:pack wrapper="wrapper">
<p:with-input port="source">
<doc1/>
<doc2/>
<doc3/>
</p:with-input>
<p:with-input port="alternate">
<doc-a/>
<doc-b/>
<doc-c/>
</p:with-input>
</p:pack>
<p:for-each>
<p:cast-content-type content-type="application/xml">
<p:with-input select="p:document-properties(.)"/>
</p:cast-content-type>
</p:for-each>
<p:wrap-sequence wrapper="wrapper"/>
</p:declare-step>
Result
<wrapper xmlns:t="http://xproc.org/ns/testsuite/3.0">
<map xmlns="http://www.w3.org/2005/xpath-functions">
<string key="content-type">application/xml</string>
</map>
<map xmlns="http://www.w3.org/2005/xpath-functions">
<string key="content-type">application/xml</string>
</map>
<map xmlns="http://www.w3.org/2005/xpath-functions">
<string key="content-type">application/xml</string>
</map>
</wrapper>
Schematron checks
<s:schema xmlns="http://www.w3.org/1999/xhtml"
xmlns:s="http://purl.oclc.org/dsdl/schematron" xmlns:t="http://xproc.org/ns/testsuite/3.0"
queryBinding="xslt2">
<s:ns prefix="fn"
uri="http://www.w3.org/2005/xpath-functions"/>
<s:pattern>
<s:rule context="/">
<s:assert test="wrapper">Document element is wrong</s:assert>
</s:rule>
</s:pattern>
<s:pattern>
<s:rule context="/wrapper">
<s:assert test="not(exists(//*[@key='base-uri']))">There should be no base-uri property</s:assert>
</s:rule>
</s:pattern>
</s:schema>
Revision history
- 29 Jun 2026, Norm Tovey-Walsh
- Created test