ab-system-property-002
Tests p:system-property().
Test is expected to pass.
The pipeline
<p:declare-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:identity>
<p:with-input>
<result>
<episode>{p:system-property('Q{http://www.w3.org/ns/xproc}episode')}</episode>
<locale>{p:system-property('Q{http://www.w3.org/ns/xproc}locale')}</locale>
<product-name>{p:system-property('Q{http://www.w3.org/ns/xproc}product-name')}</product-name>
<product-version>{p:system-property('Q{http://www.w3.org/ns/xproc}product-version')}</product-version>
<vendor>{p:system-property('Q{http://www.w3.org/ns/xproc}vendor')}</vendor>
<vendor-uri>{p:system-property('Q{http://www.w3.org/ns/xproc}vendor-uri')}</vendor-uri>
<version>{p:system-property('Q{http://www.w3.org/ns/xproc}version')}</version>
<xpath-version>{p:system-property('Q{http://www.w3.org/ns/xproc}xpath-version')}</xpath-version>
<psvi-supported>{p:system-property('Q{http://www.w3.org/ns/xproc}psvi-supported')}</psvi-supported>
</result>
</p:with-input>
</p:identity>
</p:declare-step>
Result
<result xmlns:t="http://xproc.org/ns/testsuite/3.0">
<episode>E-6a415275-1c0b-40ac-a5d7-b3f00127ca49</episode>
<locale>en-US</locale>
<product-name>XML Calabash</product-name>
<product-version>3.0.5-SNAPSHOT</product-version>
<vendor>Norm Tovey-Walsh</vendor>
<vendor-uri>https://xmlcalabash.com/</vendor-uri>
<version>3.0 3.1</version>
<xpath-version>3.1</xpath-version>
<psvi-supported>true</psvi-supported>
</result>
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:pattern>
<s:rule context="/">
<s:assert test="result">The document root is not result.</s:assert>
<s:assert test="string-length(result/episode/text()) !=0">Text node of result/episode is empty string.</s:assert>
<s:assert test="string-length(result/locale/text()) !=0">Text node of result/locale is empty string.</s:assert>
<s:assert test="string-length(result/product-name/text()) !=0">Text node of result/product-name is empty string.</s:assert>
<s:assert test="string-length(result/product-version/text()) !=0">Text node of result/product-version is empty string.</s:assert>
<s:assert test="string-length(result/vendor/text()) !=0">Text node of result/vendor is empty string.</s:assert>
<s:assert test="string-length(result/vendor-uri/text()) !=0">Text node of result/vendor-uri is empty string.</s:assert>
<s:assert test="string-length(result/version/text()) !=0">Text node of result/version is empty string.</s:assert>
<s:assert test="string-length(result/xpath-version/text()) !=0">Text node of result/xpath-version is empty string.</s:assert>
<s:assert test="string-length(result/psvi-supported/text()) !=0">Text node of result/psvi-supported is empty string.</s:assert>
</s:rule>
</s:pattern>
</s:schema>
Revision history
- 10 Jun 2021, Achim Berndzen
- Added attribute 'queryBinding' to schematron's schema.
- 31 Mar 2020, Achim Berndzen
- Replaced double curly brackets in TVT with single ones.
- 14 Jul 2019, Achim Berndzen
- Added tests for p:system-property