rng-extension

XML Calabash Relax NG validation extension step that returns a report with XPath error locations

Repository
Git URL https://github.com/transpect/rng-extension.git
SVN URL https://github.com/transpect/rng-extension
Base URI http://transpect.io/calabash-extensions/rng-extension/

Source ⬇

tr:validate-with-rng-sch

Import

<p:import href="http://transpect.io/calabash-extensions/rng-extension/xpl/rng-schematron.xpl"/>

Dependencies

Synopsis

<tr:validate-with-rng-sch xmlns:tr="http://transpect.io">
  <p:input port="source" primary="true"/>
  <p:output port="result" primary="true"/>
  <p:output port="reports"/>
  <p:output port="text"/>
  <p:option name="rngfile"/>
  <p:option name="full-path-notation" select="'2'"/>
  <p:option name="info-messages" select="'1'"/>
</tr:validate-with-rng-sch>

tr:validate-with-rng-PI

Import

<p:import href="http://transpect.io/calabash-extensions/rng-extension/xpl/rng-validate-to-PI.xpl"/>

Dependencies

Synopsis

<tr:validate-with-rng-PI xmlns:tr="http://transpect.io">
  <p:input port="source" primary="true"/>
  <p:input port="schema"/>
  <p:output port="result" primary="true"/>
  <p:output port="report"/>
  <p:option name="debug" required="false" select="'no'"/>
  <p:option name="debug-dir-uri" select="'debug'"/>
  <p:option name="status-dir-uri" select="'status?enabled=false'"/>
  <p:option name="remove-srcpaths" required="false" select="'true'"/>
  <p:option name="remove-xml-base" required="false" select="'true'"/>
</tr:validate-with-rng-PI>

tr:validate-with-rng-sample

Sample front-end step for tr:validate-with-rng

Import

<p:import href="http://transpect.io/calabash-extensions/rng-extension/xpl/rng-validate.xpl"/>

Synopsis

<tr:validate-with-rng-sample xmlns:tr="http://transpect.io">
  <p:input port="source" primary="true"/>
  <p:input port="schema"/>
  <p:output port="result" primary="true"/>
</tr:validate-with-rng-sample>

tr:validate-with-rng

Provides advanced Relax NG validation in that it returns a report (you don’t have to try/catch in order to get the errors) and that each error has its location in the document expressed as XPath instead of line numbers. The necessity for XPath locations arises when you validate documents that consist of a single line or documents that are created in memory. We wonder why no one has thought of this in the original SAX error specification.

Import

<p:import href="http://transpect.io/calabash-extensions/rng-extension/xpl/validate-with-rng-declaration.xpl"/>

Synopsis

<tr:validate-with-rng xmlns:tr="http://transpect.io">
  <p:input port="source" primary="true"/>
  <p:input port="schema"/>
  <p:output port="result" primary="true"/>
  <p:output port="report"/>
</tr:validate-with-rng>

GitHub sync date: 2024-04-23+02:00