p:document 029

Tests p:document with json document is correctly loaded.

Test ab-p-document029.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:cast-content-type content-type="application/xml">
                <p:with-input>
                    <p:document href="../documents/JSon-doc1.json" content-type="application/json"/>
                </p:with-input> 
            </p:cast-content-type>
            
        </p:declare-step>
   
MorganaXProc passing XML Calabash passing

Schematron validation


      <s:schema xmlns:s="http://purl.oclc.org/dsdl/schematron">
         <s:ns uri="http://www.w3.org/2005/xpath-functions" prefix="x"/>
         <s:pattern>
            <s:rule context="/">
               <s:assert test="x:map">There is no root element 'map' (in xpath-functions-namespace).</s:assert>
               <s:assert test="count(x:map/*)=1">'map' does not have exactly one child element.</s:assert>
               <s:assert test="x:map/x:string">'map' does not have a child element named 'string'.</s:assert>
               <s:assert test="x:map/x:string/text()='value'">'map/string' does not have a text node child 'value'.</s:assert>
               <s:assert test="count(x:map/x:string/@*)=1">'map/string' does not have exactly one attribute.</s:assert>
               <s:assert test="x:map/x:string/@key">'map/string' does not have an attribute named 'key'.</s:assert>
               <s:assert test="x:map/x:string/@key='key'">Attribute 'key' does not have the text value of 'key'.</s:assert>
            </s:rule>
         </s:pattern>
      </s:schema>
   

Revision history

05 Oct 2018 08:21, Norman Walsh

Fix ab-p-document029.xml

04 Oct 2018 18:13, Achim Berndzen

One new and one corrected test.

29 Aug 2018 15:54, Achim Berndzen

Now I have all tests where p:document needs a content-type according to the new specs

25 Apr 2018 18:11, Achim Berndzen

More tests.