ab-system-property-001

Tests p:system-property().

Test ab-system-property-001.xml is expected to pass.

The pipeline


<p:declare-step xmlns:p="http://www.w3.org/ns/xproc" version="3.0">
   <p:output port="result"/>
   <p:identity>
      <p:with-input>
         <result>
            <episode>{p:system-property('p:episode')}</episode>
            <locale>{p:system-property('p:locale')}</locale>
            <product-name>{p:system-property('p:product-name')}</product-name>
            <product-version>{p:system-property('p:product-version')}</product-version>
            <vendor>{p:system-property('p:vendor')}</vendor>
            <vendor-uri>{p:system-property('p:vendor-uri')}</vendor-uri>
            <version>{p:system-property('p:version')}</version>
            <xpath-version>{p:system-property('p:xpath-version')}</xpath-version>
            <psvi-supported>{p:system-property('p:psvi-supported')}</psvi-supported>
         </result>
      </p:with-input>
   </p:identity>
</p:declare-step>
MorganaXProc passing XML Calabash passing

Schematron validation


<s:schema xmlns="http://www.w3.org/1999/xhtml" xmlns:s="http://purl.oclc.org/dsdl/schematron" 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.

14 Jul 2019, Achim Berndzen

Added tests for p:system-property