p:validate-with-json-schema 006 (AB)

Tests p:validate-with-json-schema: Default is XVRL on port 'report'.

Test ab-validate-with-json-schema-006.xml is expected to pass.

It requires the following features: p-validate-with-json-schema.

The pipeline


<p:declare-step xmlns:p="http://www.w3.org/ns/xproc" version="3.0">
   <p:output port="result"/>
   <p:validate-with-json-schema assert-valid="false">
      <p:with-input href="../documents/in-valid.json"/>
      <p:with-input port="schema" href="../documents/schema.json"/>
   </p:validate-with-json-schema>
   <p:identity>
      <p:with-input pipe="report"/>
   </p:identity>
</p:declare-step>
MorganaXProc passing

Schematron validation


<s:schema xmlns="http://www.w3.org/1999/xhtml" xmlns:s="http://purl.oclc.org/dsdl/schematron" queryBinding="xslt2">
   <s:ns uri="http://www.xproc.org/ns/xvrl" prefix="xvrl"/>
   <s:pattern>
      <s:rule context="/">
         <s:assert test="xvrl:report">The root element is not "report".</s:assert>
         <s:assert test="exists(xvrl:report/xvrl:detection)">There should be detection because JSON is invalid.</s:assert>
      </s:rule>
   </s:pattern>
</s:schema>

Revision history

04 Sep 2022, Achim Berndzen

Initial commit