Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?xml version="1.0" encoding="UTF-8"?>
- <p:declare-step version="1.0"
- xmlns:p="http://www.w3.org/ns/xproc"
- name="main">
- <p:input port="source" /> <!--sequence="false" primary="true"-->
- <p:input port="schema" sequence="true" >
- <p:document href="http://docs-beta.rackspace.com/oxygen/13.1/mac/author/frameworks/rackbook/5.0/rng/rackbook.rng"/>
- </p:input>
- <p:output port="result" primary="true">
- <p:pipe step="tryvalidation" port="result"/>
- </p:output>
- <p:output port="report" sequence="true">
- <p:pipe step="tryvalidation" port="report"/>
- </p:output>
- <p:try name="tryvalidation">
- <p:group>
- <p:output port="result">
- <p:pipe step="xmlvalidate" port="result"/>
- </p:output>
- <p:output port="report" sequence="true">
- <p:empty/>
- </p:output>
- <p:validate-with-relax-ng name="xmlvalidate">
- <p:input port="source">
- <p:pipe step="main" port="source"/>
- </p:input>
- <p:input port="schema">
- <p:pipe step="main" port="schema"/>
- </p:input>
- </p:validate-with-relax-ng>
- </p:group>
- <p:catch name="catch">
- <p:output port="result">
- <p:pipe step="main" port="source"/>
- </p:output>
- <p:output port="report">
- <p:pipe step="id" port="result"/>
- </p:output>
- <p:error name="relaxng-validation-error" code="rax:E001" xmlns:rax="http://docs.rackspace.com/api">
- <p:input port="source">
- <p:inline><message>This document is invalid. No docs for you!</message></p:inline>
- </p:input>
- <p:log port="result" />
- </p:error>
- <p:identity name="id">
- <p:input port="source">
- <p:pipe step="catch" port="error"/>
- </p:input>
- </p:identity>
- </p:catch>
- </p:try>
- </p:declare-step>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement