Re: Writing Request to File System

2003-02-13 Thread Jeremy Quinn

On Wednesday, February 12, 2003, at 09:01 PM, 
[EMAIL PROTECTED] wrote:


I'm not sure that this will solve my problem with write-source.  
Nothing
is getting written to my file and I get the following message on the
browser the src attribute could not be resolved and failed to cancel.

I appreciate the tip, I'll run the response though another stylesheet 
and
display that to the user.  Um, maybe the src attribute could not be
resolved and failed to cancel is my response from the
SourceWritingTransformer.

indeed it is



Does that response from SourceWritingTransformer make any sense to you?


It is saying primarily that it could not resolve the 'src'. ie. it 
could not work out from the source path you gave it, where to write. I 
cannot remember what the 'failed to cancel' bit means.

Be very careful what whitespace appears in your usage of SWT, 
particularly in the source:fragment tag.

Look at the example stylesheet 
'cocoon/samples/editor/stylesheets/editor2writer.xsl', notice how no 
whitespace is added to either source:source or source:fragment, notice 
how your stylesheet does have whitespace in these tags. This may be a 
cause of problems.

regards Jeremy


-
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]



RE: Writing Request to File System

2003-02-12 Thread jthaemlitz

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]




Re: Writing Request to File System

2003-02-12 Thread Jeremy Quinn

On Wednesday, February 12, 2003, at 02:14 PM, 
[EMAIL PROTECTED] wrote:

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?


The SourceWritingTransformer replaces the source:write tag with a 
response to say what happened. If you want to display the edited 
content back to the user again, you need to duplicate it, before the 
transformation.


regards Jeremy


-
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]



Re: Writing Request to File System

2003-02-12 Thread jthaemlitz

I'm not sure that this will solve my problem with write-source.  Nothing
is getting written to my file and I get the following message on the
browser the src attribute could not be resolved and failed to cancel.

I appreciate the tip, I'll run the response though another stylesheet and
display that to the user.  Um, maybe the src attribute could not be
resolved and failed to cancel is my response from the
SourceWritingTransformer.

Does that response from SourceWritingTransformer make any sense to you?

Thanks,

JohnPT



   
   
  cocoon-users-return-46550-jthaemlitz=oreillyauto.com@XML 
   
  .APACHE.ORG 
To:   [EMAIL PROTECTED]   
  
cc: 
  02/12/03 02:32 PM   
Subject:  Re: Writing Request to File System
  Please respond to cocoon-users   
   
   
   
   
   





On Wednesday, February 12, 2003, at 02:14 PM,
[EMAIL PROTECTED] wrote:

 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?


The SourceWritingTransformer replaces the source:write tag with a
response to say what happened. If you want to display the edited
content back to the user again, you need to duplicate it, before the
transformation.


regards Jeremy


-
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]




Writing Request to File System

2003-02-11 Thread jthaemlitz
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]