I am not sure there is a topic dedicated to the explanation of the name attribute, but it's actually quite simple.
Each processor declares inputs and outputs identified by a name. These names define the interface to that processor, the contract that defines what inputs and outputs do. If you are using an existing processor, for example the XSLT processor, you have to use the names declared by that processor. To know what names you must use, you have to consult the documentation for each processor. We have tried to be consistent and to use "config" and "data" as often as possible. For example, for the XSLT processor, see:
http://www.orbeon.com/oxf/doc/processors-xslt
A pipeline can also be viewed as a processor. If that pipeline decides to export inputs and outputs, it must do so using the <p:param name="..."/> syntax. This defines its interface. You can compare this to writing your own method in Java, as opposed to using an existing method. The difference is that in Java, you address method parameters by position when you call a method. In XPL, you always address them by name. Therefore it is important to use the right name when you call a processor (or a pipeline).
This also applies to the cases where the Web Application Controller
calls your own pipelines: the WAC has to know the names of the inputs
and outputs to connect to. Therefore, you have to use the names
("data" and "instance") documented here:http://www.orbeon.com/oxf/doc/processors-controller
Now if you implement a pipeline or write a new processor in Java, and you don't have any external naming constraints (such as the ones defined by the WAC, or is somebody expects to call your pipeline using names defined in advance), you are absolutely free to use any name you want.
I hope this clarifies the question.
-Erik
Scott McMullan wrote:
> Hi, > > There is confusion here surrounding the correct values that the "name" > attribute can take. > > For example, it's used to help define a pipeline's input/outputs: > <p:param name="instance" type="input"/> > <p:param name="data" type="output"/> > > it's also used to define a processor's input/output: > <p:processor uri="oxf/processor/pipeline"> > <p:input name="config" href="view-account-get-balance.xpl"/> > <p:output name="data" id="balance"/> > > or > > <p:processor uri="oxf/processor/xslt"> > <p:input name="data" href="#instance"/> > <p:input name="config"> > > > First we thought the name attribute's value was arbitrary, similar to a java > variable name. Then we found some examples where a pipeline expected an > input with a specific name (eg., for xslt, there must be an input named > "config"). > > Can you point us to documentation that comprehensively explains the use of > the name attribute? > > Thanks. > > -Scott McMullan > UC Berkeley Center for Document Engineering
_______________________________________________ oxf-users mailing list [EMAIL PROTECTED] http://mail.orbeon.com/mailman/listinfo/oxf-users
