Document properties 005
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" name="main" version="3.0">
<p:output port="result"/>
<p:variable name="a" select="3 + 4"/>
<p:cast-content-type content-type="application/xml">
<p:with-input port="source"
select="p:document-properties($a)">
<doc/>
</p:with-input>
</p:cast-content-type>
</p:declare-step>
Result
<map xmlns="http://www.w3.org/2005/xpath-functions"
xmlns:t="http://xproc.org/ns/testsuite/3.0"/>
Schematron checks
<s:schema xmlns:s="http://purl.oclc.org/dsdl/schematron"
xmlns:t="http://xproc.org/ns/testsuite/3.0" queryBinding="xslt2">
<s:ns prefix="j"
uri="http://www.w3.org/2005/xpath-functions"/>
<s:pattern>
<s:rule context="/">
<s:assert test="j:map">The pipeline root is not 'j:map'.</s:assert>
<s:assert test="count(j:map/*)=0">Root j:map shouldnt have child elements.</s:assert>
</s:rule>
</s:pattern>
</s:schema>
Revision history
- 28 Dec 2024, Norm Tovey-Walsh
- Fixed utterly bogus XPath expression.
- 27 Nov 2021, Achim Berndzen
- Fixed test as consequence of pr#1042.
- 10 Jun 2021, Achim Berndzen
- Added attribute 'queryBinding' to schematron's schema.
- 23 Nov 2019, Achim Berndzen
- Changed test from p:document-properties-document() to p:document-properties()
- 03 Dec 2018, Achim Berndzen
- Changed test, because it not an error anymore, if
parameter of p:document-properties-document() is not a
document.
- 24 Sep 2017, Norman Walsh
- Port my test suite; add documentation and schemas