p:xquery 011 (AB)

Tests p:xquery: Simple json document as source

Test ab-xquery-011.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:with-input port="source">
         <p:inline content-type="application/json">2</p:inline>
      <p:with-input port="query">
         <answer>{{40 + .}}</answer>
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:rule context="/">
         <s:assert test="answer">Root element is not 'answer'.</s:assert>
         <s:assert test="answer/text()='42'">The answer is not '42'.</s:assert>

Revision history

10 Jun 2021, Achim Berndzen

Added attribute 'queryBinding' to schematron's schema.

13 Sep 2019, Achim Berndzen

Tests for p:xquery (Partly ported from 1.0)