1. They do not. The SQL processor expects a "data" input, a "config" input, and a "data" output. Since we do not really need anything in the "data" input, we just send a dummy element.
2. The Null serializer is there to force reading the "data" output of the SQL procesor. XPL is based on a lazy evaluation model, so outputs are not read if nobody requires reading them. Without the Null serializer, the SQL processor's "data" output would never be read in this particular pipeline, so the processor would not execute at all.
The Null serializer has a mandatory "data" input, which references with the href attribute the output with id "dummy" of the SQL processor, which happens to be the SQL processor's "data" output. The SQL processor requires the input and output names to be "data" and "config", but you choose the ids and hrefs. In this case the id chosen to connect the two processors is called "dummy".
3. The <dummy/> element within the connection makes sure that the processor outputs at least a root element. The SQL processor's body is a template for its output. In this case, we only do updates, so the <dummy/> element is the only output that will be generated. In general, you would rather put enclose all the updates within a <dummy>...</dummy> or <root>...</root> element.
I agree that in this particular example, there is quite a load of dummy elements and ids! You could imagine XPL having shortcuts for the dummy inputs and outputs. At the moment, you are required to use the tricks shown in this file.
4. No. populate.xpl does not declare any p:param elements, which means that it does not take any inputs or outputs. All the inputs and output ids declared in populate.xpl are local to this particular pipeline.
If that helps, consider that a pipeline is a function taking and returning named parameters. Those are exposed with p:param. Everything else in the pipeline is the equivalent of local variables in a function.
I hope this helps,
-Erik
Tony Tay wrote:
> hi Erik,
>
> Finally, i managed to insert and retrieve data to and from the
> Oracle database. The next thing which i find confusing is the <p:
> input ...> and <p: output> markups. Thanks for your help, am new
> and still learning the robes of moving to a web-based approach to do
> things which i normally do in VC++ (heavy client).
>
> Questions:
>
> 1. How does the following relate to each other (in file populate.xpl) ?
>
> <p:input name="data">
> <dummy/>
> </p:input>
>
> <p:output name="output" id="dummy" debug="my-sql-result"/>
>
> Is "data" and "output" only valid within this .xpl file ?
>
> 2. What does the null-serializer do ?
>
> <p:processor uri="oxf/processor/null-serializer">
> <p:input name="data" href="#dummy"/>
> </p:processor>
>
> 3. Why do we need the <dummy/> empty markup, both in the item 1 and also within
> the <sql: connection> ... <dummy/> </sql: connection> (in populate.xpl)
>
> 4. Does the "data" from populate.xpl has anything to do "data" in
> view.xpl ?
> Regards, > Tony
_______________________________________________ oxf-users mailing list [EMAIL PROTECTED] http://mail.orbeon.com/mailman/listinfo/oxf-users
