Can someone with a cvs checkout of 2.1 dev checked out
since 9/27 confirm that <source:write> fails with no
path 

specified?  I'm trying to confirm a problem before
submitting a bug report but have frozen my local cvs
until a launch 

later this week.

try the following to isolate the problem: 

1) create an xml file foo.xml in the same directory
with any sitemap.  The contents of foo.xml can be
simply: 

<foo>test this</foo>

2) create a second file write.xml containing:

<source:write create="true"
xmlns:source="http://apache.org/cocoon/source/1.0";>
  <source:source>foo.xml</source:source>
  <source:path></source:path>
  <source:fragment><foo>
<newFoo>We changed it</newFoo>
<othernode>well what do you know</othernode>
</foo></source:fragment>
</source:write>

2) in that or a prior mounting sitemap define the
source writing transformer (if it isn't already). 
Inside 

map:components/map:transformers add:

 <map:transformer     name="tofile"    
src="org.apache.cocoon.transformation.SourceWritingTransformer">
 <map:parameter name="serializer" value="xml"/>
 </map:transformer>

3) Add the following pipeline fragment somewhere high
enough to override 
any more generic matchers like *.xml or **.xml you may
have:

<map:match pattern="testWrite.xml">
  <map:generate src="write.xml"/>
  <map:transform type="tofile"/>
  <map:serialize type="xml"/>
</map:match>

4) Access http://localhost:8080/testWrite.xml (adjust
accordingly if you've done all this in a sub sitemap)

You should get an org.w3c.dom.DOMException related to
Hierarchy (if this is in fact a bug).

Thank you,

Geoff

__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com

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