Tests p:document set document-property 'base-uri' correct: Relative uri in @href: Base uri of p:document to be used.
Test ab-p-document004.xml is expected to pass.
It requires the following features: webaccess.
<p:declare-step xmlns:p="http://www.w3.org/ns/xproc" version="3.0">
<p:output port="result"/>
<p:identity>
<p:with-input>
<p:document href="test-suite.html" xml:base="https://xproc.org/"/>
</p:with-input>
</p:identity>
<p:cast-content-type content-type="application/xml">
<p:with-input select="p:document-properties(.)"/>
</p:cast-content-type>
</p:declare-step>
<s:schema xmlns="http://www.w3.org/1999/xhtml" xmlns:s="http://purl.oclc.org/dsdl/schematron" queryBinding="xslt2">
<s:ns uri="http://www.w3.org/ns/xproc" prefix="p"/>
<s:ns prefix="j" uri="http://www.w3.org/2005/xpath-functions"/>
<s:pattern>
<s:rule context="/">
<s:assert test="j:map">The document root is not map.</s:assert>
<s:assert test="starts-with(j:map/j:string[@key='content-type']/text(), 'text/html')">Content type is not text/html.</s:assert>
<s:assert test="j:map/j:string[@key='base-uri']/text() = 'https://xproc.org/test-suite.html'">The base-uri property is not correct.</s:assert>
</s:rule>
</s:pattern>
</s:schema>
Changed test, so an existing resource is resolved.
Added attribute 'queryBinding' to schematron's schema.
Changed test from p:document-properties-document() to p:document-properties()
Change target for http-request to xproc.org.
Fixed result document
(
c:document-properties
, not
p:document-properties
)
Some new tests.