Stefano,

Writing a template the way you did would be convenient, but like all
templating languages, you would need to design a way to escape the
markers, etc. This said, the thought of XSLT as a template language
for inline XML documents is interesting, and we've been toying with
it.

Right now, you have at least two ways:

1. Generate the document with the help of the XPL aggregate()
   function:

<p:input name="config"
href="aggregate('config', aggregate('directory', #instance#xpointer('C:\cygwin\home\SSantoro\orbeon')),
aggregate('file', #instance#xpointer(string(/form/@name))))"/>


2. Use an XSLT template. With XSLT 2.0, such templates can be very
   short, like:

<p:processor name="oxf:xslt">
  <p:input name="data" href="#instance"/>
  <p:input name="config">
    <config xsl:version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform";>
      <directory>C:\cygwin\home\SSantoro\orbeon</directory>
      <file><xsl:value-of select="/form/@name"/></file>
    </config>
  </p:input>
  <p:output name="data" id="file-serializer-config"/>
</p:processor>

And then, in your file-serializer processor:

<p:input name="config" href="#file-serializer-config"/>

-Erik

Stefano Santoro wrote:

> Hi,
>
> Being the newbie that I am, I can't seem to figure out how to
> use a pipe parameter (or an XPath result) to generate the output
> filenane.
>
> Could you please enlighten me on how to set up the file serializer
> config element so that I my dynamically set the file name?
>
>         <p:input name="config">
>             <config>
>                 <directory>C:\cygwin\home\SSantoro\orbeon</directory>
>                 <file> { #instance#xpointer(/form/@name) } </file>
>             </config>
>         ...
>
> Thanks kindly.
>
> Ciao
> Stefano



-------------------------------------------------------
This SF.Net email is sponsored by:
Sybase ASE Linux Express Edition - download now for FREE
LinuxWorld Reader's Choice Award Winner for best database on Linux.
http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click
_______________________________________________
orbeon-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/orbeon-user

Reply via email to