Anish wrote:
[email protected] wrote:
On 1/5/09, Anish <[email protected]> wrote:
Andreas Hartmann wrote:
Hi Anish,
Anish schrieb:
I want to write XML file physically on the server using xsl tags:
would you mind giving a larger context about what you're trying to
achieve? Do you want to modify files in the Lenya repository? Which Lenya
version are you using?
-- Andreas
I tried but it didn't work (as I need to apply for XSLT 1.0). Also I'm
not sure whether these tags create new files physically on the file system
or not.
I need to do this for XSLT 1.0.
Please suggest.
 Hi Andreas

 Actually I want to write a new XML file (apart from Lenya's internal
files). This XML will reside on my server's file system as an independent
file. I'm using:

 1)   Lenya 1.2.4
 2)   Cocoon 2.1.7
 On Tomcat 5.5.17

 --
 Thanks & Regards,
 Anish

To write the a portion of the current XML in a process to a file on
the hard drive, use the SourceWritingTransformer.

Lenya 1.2's "default" Publication's publication-sitemap.xmap includes
a primitive cache using <map:transform type="write-source">.  You will
need the surrounding code to add and remove tags for the
SourceWritingTransformer.  The included addSourceTags.xsl and
removeSourceTags.xsl transformations write the entire XML to a file.
Possibilities include writing portions of the XML to different files.
The official documentation is at:
http://cocoon.apache.org/2.1/userdocs/sourcewriting-transformer.html

solprovider

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Hi
I'm using the same and It's working but the problem is that it's not appending the tags. It just replaces the whole file I need to append if the tag doesn't exist. I want to achieve something like:

<xsl:variable name="vid">aaa</xsl:variable>
<source:write xmlns:source="http://apache.org/cocoon/source/1.0";> <source:insert create="true" overwrite="true">
       <source:source>trial.xml</source:source>
       <source:path>/root</source:path>
       <source:replace>row[tid=$vid]/parent::*</source:replace>
<source:fragment> <row>
               <tid><xsl:value-of select="$vid"/></tid>
               <name>HONEY</name>
</row> </source:fragment>
</source:insert>
</source:write>

I want to replace row tag with fragment (if tid corresponding to vid exists otherwise create a new row tag in root).

Please suggest.
--
Thanks & Regards,
Anish
Hi All

Thanks, The issue is resolved.
Thanks & Regards,
Anish

Reply via email to