This is similar for example, to what you have in Java when you can only use a variable that has been declared previously in the same method. In XPL, you can see it as a design choice that makes it easier to understand the flow of execution of a pipeline, and also slightly easier for implementations to connect processors together. This also naturally eliminates the risk of creating loops.
In general, as you say, order is important. For example, given the way inputs and outputs are connected in the example below, this is the only possible order:
<p:processor ...>
...
<p:output id="a"/>
</p:processor> <p:processor ...>
<p:input href="#a"/>
<p:output id="b"/>
</p:processor> <p:processor ...>
<p:input href="#a"/>
<p:input href="#b"/>
...
</p:processor>Do you have a specific reason for putting the serializer first?
-Erik
Damon Rand wrote:
> Hi there,
> I am wondering why the order of processors is important? In this
> example I want to put my serializer at the top of the xml file
> but I can't because it seems it has to go after the output it
> references??
>
> Damon..
>
>
> <p:config xmlns:p="http://www.orbeon.com/oxf/pipeline">
>
> <p:processor uri="oxf/processor/request" xmlns:p="http://www.orbeon.com/oxf/pipeline">
> <p:input name="config">
> <config>
> <include>/request/parameters</include>
> </config>
> </p:input>
> <p:output name="data" id="request"/>
> </p:processor>
>
> <!-- Display xml for debugging -->
> <p:processor uri="oxf/processor/xml-serializer" xmlns:p="http://www.orbeon.com/oxf/pipeline">
> <p:input name="config">
> <config>
> <content-type>text/xml</content-type>
> </config>
> </p:input>
> <p:input name="data" href="#request"/>
> </p:processor>
