The writeSource.xsl tranformer seems to be working.  If I remove the
<map:transform type="write-source"/> I can see the document on the browser
and it looks correct.  However when I include the "write-source" I get the
following message on the browser "the src attribute could not be resolved
and failed to cancel".  any idea what that message is trying to say?

I'm not sure if it's relevant, but I can run the editor examples under
mount/editor.

a little more help would be greatly appreciated.  The root of my document
after the transformation is <source:write>, do I need to wrap this in
another tag so the <map:serialize type="xml"/> has something to send back
to the browser?

Thanks,

JohnPT



                                                                                       
                                                               
                      cocoon-users-return-46489-jthaemlitz=oreillyauto.com@XML         
                                                               
                      .APACHE.ORG                                                     
To:       <[EMAIL PROTECTED]>                         
                                                                                      
cc:                                                             
                      02/11/03 01:58 PM                                               
Subject:  RE: Writing Request to File System                    
                      Please respond to cocoon-users                                   
                                                               
                                                                                       
                                                               
                                                                                       
                                                               




>Then write it to a file on my TomCat server (I NEED THIS)

http://xml.apache.org/cocoon/userdocs/transformers/sourcewriting-transformer

.html

sitemap:

...
<map:transform src="writeSource.xsl">
             <map:parameter name="filename" value="someFilename.xml"/>
</map:transform>
<map:transform type="write-source"/>
<map:serialize type="xml"/>

writeSource.xsl:

<?xml version="1.0" encoding="iso-8859-1"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
xmlns:source="http://apache.org/cocoon/source/1.0";>
             <xsl:param name="filename"/>
             <xsl:template match="/">
                         <source:write create="true">
                                     <source:source>
                                                 <xsl:value-of select
="$filename"/>
                                     </source:source>
                                     <source:fragment>
                                                 <xsl:copy>
                                                             <xsl:copy-of
select="@*"/>

<xsl:apply-templates/>
                                                 </xsl:copy>
                                     </source:fragment>
                         </source:write>
             </xsl:template>
             <xsl:template match="*">
                         <xsl:copy>
                                     <xsl:copy-of select="@*"/>
                                     <xsl:apply-templates/>
                         </xsl:copy>
             </xsl:template>
             <xsl:template match="text()">
                         <xsl:value-of select="."/>
             </xsl:template>
</xsl:stylesheet>

Mark

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: 11 February 2003 05:31PM
To: [EMAIL PROTECTED]
Subject: Writing Request to File System


I'm a newbie.  I have Cocoon running.  I have a stylesheet that can submit
and recieve values from the RequestGenerator.

What I want to do is
Get http RequestGenerator XML (I have that)
Run it though a stylesheet (I have that)
Then write it to a file on my TomCat server (I NEED THIS)
Then redirect the request to an index page (This would be nice)

Right now I can send the output I want to go to the file as a response to
the web client.

Thanks,

JohnPT



---------------------------------------------------------------------
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:     <[EMAIL PROTECTED]>
For additional commands, e-mail:   <[EMAIL PROTECTED]>










---------------------------------------------------------------------
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:     <[EMAIL PROTECTED]>
For additional commands, e-mail:   <[EMAIL PROTECTED]>

Reply via email to