Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?xml version="1.0" encoding="UTF-8"?>
- <p:declare-step xmlns:p="http://www.w3.org/ns/xproc"
- version="1.0">
- <p:input port="source"/>
- <!-- <p:output port="result" primary="true" sequence="false"/>-->
- <p:output port="secondary" primary="false" sequence="true"/>
- <p:variable name="input-base" select="p:base-uri(/*)"/>
- <p:variable name="output-wadl" select="p:resolve-uri('foo.xml',$input-base)"/>
- <p:validate-with-xml-schema assert-valid="true" mode="strict" name="validate">
- <p:input port="schema">
- <p:document href="xsd/wadl.xsd"/>
- </p:input>
- </p:validate-with-xml-schema>
- <p:xslt name="style" version="2.0">
- <p:input port="source">
- <p:pipe step="validate" port="result"/>
- </p:input>
- <p:input port="stylesheet">
- <p:document href="xsl/normalizeWadl.xsl"/>
- </p:input>
- <p:input port="parameters">
- <p:empty/>
- </p:input>
- </p:xslt>
- <p:validate-with-xml-schema assert-valid="true" mode="strict" name="post-validate">
- <p:input port="schema">
- <p:document href="xsd/wadl.xsd"/>
- </p:input>
- </p:validate-with-xml-schema>
- <!-- This doesn't work. Guess you can't use AVTs in pipelines.
- But how do you get it to dereference the variable?-->
- <p:store href="{$output-wadl}">
- <p:log port="result" href="xproc1.log"/>
- </p:store>
- <p:for-each>
- <p:iteration-source>
- <p:pipe step="style" port="secondary"/>
- </p:iteration-source>
- <p:store encoding="utf-8" indent="true" omit-xml-declaration="false">
- <p:log port="result" href="xproc2.log"/>
- <!-- This has no apparent effect. The files still land in my home dir -->
- <p:with-option name="href" select="resolve-uri(base-uri(/*),$input-base)"/>
- </p:store>
- </p:for-each>
- </p:declare-step>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement