cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bert Van Kets <b...@vankets.com>
Subject creating new file with SWT
Date Wed, 31 Jul 2002 10:02:05 GMT
Hi all,
I am trying to get the SourceWritingTransformer to create a new XML 
file.  Is this possible at all?  All the samples I find write to existing 
files.  The portal is the only sample that writes new files, but it's using 
session:target to create the new files.

Anyway, here's my code snip

      <page>
        <source:write>
          <source:source>docs/<xsl:value-of 
select="$dir"/>/my.xml</source:source>
          <source:fragment><page>
            <title>new page</title>
            <description>description of new page</description>
            <content>Enter your content here</content>
          </page></source:fragment>
        </source:write>
      </page>

And the pipeline that manages it

<map:generate type="request"/>
<map:transform src="admin/styles/new-page.xsl">
<map:parameter name="use-request-parameters" value="true"/>
   <map:parameter name="dir" value="{1}"/>
</map:transform>
<map:transform type="write-source"/>
<map:serialize type="xml"/>


I'm using CVS HEAD from May 15th.  Should I update?

Any help is welcome!

Bert

---------------------------------------------------------------------------------------------
Please notify me if you did not receive this mail.


---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <cocoon-users-unsubscribe@xml.apache.org>
For additional commands, e-mail:   <cocoon-users-help@xml.apache.org>


Mime
View raw message