oxf:file-serializer

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

oxf:file-serializer

msalmadan@yahoo.com
Hi All,
 
Is it possible to set  <file>dynamicnameXml.xml</file> to be dynamically passed on instead of hardcoded name?
  <p:processor name="oxf:file-serializer">
  <p:input name="config">
  <config>
   <directory>/home/user/xml/xml</directory>
   <file>dynamicnameXml.xml</file>
   <make-directories>true</make-directories>
   <append>false</append>
  </config>
  </p:input>
  <p:input name="data" href="#converteddataForm" />
    </p:processor>
 
Thanks,
Majeed



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: oxf:file-serializer

Alexander Žaťko
Yes. You can prepare your config XML snippet (say using the XSLT processor) and then just feed it into the oxf:file-serializer processor like this (not tested):

<p:processor name="oxf:xslt">
<p:input name="data" href="#instance"/>
<p:input name="config">
<xsl:stylesheet version="2.0">
<!-- your config-producing XSLT below -->
<xsl:template match="/">
<config>
<directory>/home/user/xml/xml</directory>
<file>
<!-- here you can dynamically generate the file name using for example the <xsl:value-of select="somefunction()"/> -->
</file>
<make-directories>true</make-directories>
<append>false</append>
</config>
</xsl:template>
</xsl:stylesheet>
<p:output name="data" id="myconfig"/>
</p:processor>

<p:processor name="oxf:file-serializer">
<p:input name="config" href="#myconfig" />
<p:input name="data" href="#converteddataForm" />
</p:processor>

A.

On 6.2.2009, at 20:41, Majeed Almadan wrote:

Hi All,
 
Is it possible to set  <file>dynamicnameXml.xml</file> to be dynamically passed on instead of hardcoded name?
  xf:file-serializer">
  <p:input name="config">
  <config>
   <directory>/home/user/xml/xml</directory>
   <file>dynamicnameXml.xml</file>
   <make-directories>true</make-directories>
   <append>false</append>
  </config>
  </p:input>
  <p:input name="data" href="#converteddataForm" />
    </p:processor>
 
Thanks,
Majeed


--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: [hidden email]
For general help: [hidden email]
OW2 mailing lists service home page:



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Re: oxf:file-serializer

msalmadan@yahoo.com
Thanks Alexander  for the sample code.

--- On Fri, 2/6/09, Alexander Žaťko <[hidden email]> wrote:
From: Alexander Žaťko <[hidden email]>
Subject: [ops-users] Re: oxf:file-serializer
To: [hidden email]
Date: Friday, February 6, 2009, 2:19 PM

Yes. You can prepare your config XML snippet (say using the XSLT processor) and then just feed it into the oxf:file-serializer processor like this (not tested):

<p:processor name="oxf:xslt">
<p:input name="data" href="#instance"/>
<p:input name="config">
<xsl:stylesheet version="2.0">
<!-- your config-producing XSLT below -->
<xsl:template match="/">
<config>
<directory>/home/user/xml/xml</directory>
<file>
<!-- here you can dynamically generate the file name using for example the <xsl:value-of select="somefunction()"/> -->
</file>
<make-directories>true</make-directories>
<append>false</append>
</config>
</xsl:template>
</xsl:stylesheet>
<p:output name="data" id="myconfig"/>
</p:processor>

<p:processor name="oxf:file-serializer">
<p:input name="config" href="#myconfig" />
<p:input name="data" href="#converteddataForm" />
</p:processor>

A.

On 6.2.2009, at 20:41, Majeed Almadan wrote:

Hi All,
 
Is it possible to set  <file>dynamicnameXml.xml</file> to be dynamically passed on instead of hardcoded name?
  xf:file-serializer">
  <p:input name="config">
  <config>
   <directory>/home/user/xml/xml</directory>
   <file>dynamicnameXml.xml</file>
   <make-directories>true</make-directories>
   <append>false</append>
  </config>
  </p:input>
  <p:input name="data" href="#converteddataForm" />
    </p:processor>
 
Thanks,
Majeed


--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: [hidden email]
For general help: [hidden email]
OW2 mailing lists service home page:
--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws