My goal for my Xproc pipeline below is to take in a source XML document, run 2 XSLT transforms with <p:xslt>
steps, then feed the output XML after the 2nd <p:xslt>
to the <c:body>
of the <p:http-request>
step:
<p:declare-step xmlns:p="http://www.w3.org/ns/xproc"
xmlns:c="http://www.w3.org/ns/xproc-step"
version="1.0">
<p:input port="source" primary="true"/>
<p:output port="result" primary="true"/>
<p:serialization port="result"
indent="false"
method="xml"
encoding="utf-8"
omit-xml-declaration="false"
doctype-system="myDTD.dtd"
doctype-public="-//DOCTYPE-HERE"/>
<p:xslt>
<p:input port="stylesheet">
<p:document href="XSLT-1.xslt"/>
</p:input>
</p:xslt>
<p:xslt>
<p:input port="stylesheet">
<p:document href="XSLT-2.xslt"/>
</p:input>
</p:xslt>
<p:http-request omit-xml-declaration="false"
encoding="UTF-8">
<p:input port="source">
<p:inline>
<c:request href="http://localhost:80/myRESTserver/dburi/myDOC.xml"
auth-method="basic"
username="user"
password="admin"
method="put">
<c:body content-type="text/xml" >
</c:body>
</c:request>
</p:inline>
</p:input>
</p:http-request>
Is there a way to achieve this? When I try executing this code as is, the <p:http-request>
is invoked first (PUTS an empty XML file into the database).