ROSSEL Olivier wrote: >>I seem to have done everything right and was testing out the >>SourceWritingTransformer and can't get it to write to a file. >> I have the >>pipeline >> >><map:match pattern="test/*.xsp"> >> <map:generate type ="serverpages" src="test/{1}.xsp"/> >> <map:transform type="sql"> >> <map:parameter name="use-connection" value="dev_database"/> >> </map:transform> >> <map:transform src="test/metadata.xsl"/> >> <map:transform type="xslt-with-parameters" >>src="test/source.xsl"> >> <map:parameter name="page-title" value="{page-title}"/> >> </map:transform> >> <map:transform type="tofile2"> >> <map:parameter name="serializer" value="xml"/> >> </map:transform> >> <map:serialize type="xml"/> >> </map:match> >> >> >>I know that everything up to the second transformation works >>(until the >>tofile2 trans which is the SWT). The input to the SWT looks >>like this: >> >><?xml version="1.0" encoding="UTF-8" ?> >> <source:write >>xmlns:source="http://apache.org/cocoon/source/1.0" src=" >> context://my.xml"> >> <KnowledgeObject xmlns:sql="http://apache.org/cocoon/SQL/2.0" >> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> >> .......stuff.......... >> </KnowledgeObject> >> </source:write> >> >> >Can you try with a src containing only the path and no "context:" at all? >I think it may be the problem. > >Gurus will confirm, but I think that Writable source are URLs that can >written >to. context:// is a pseudo protocol, that is probably not handled correctly >bu the SWT. Try with a path, I think SWT will be happier. > >Note for developpers: may be, the context:// could be considered a Writable >Source. > >
This depends on how the webapp is deployed : an unexpanded war is not writeable. Apart this theroretical consideration, the problem encountered here comes from the fact that 'context:' is actually translated to a 'file:' if the webapp is expanded, but this translation is done _after_ checking for specialized source implementations and this falls back to the default URLSource which isn't writeable. Hope you understood this... In other words, this is a bug, and you can add it to Bugzilla ;) In the meanwhile, use a 'file:' url. Sylvain -- Sylvain Wallez Anyware Technologies Apache Cocoon http://www.anyware-tech.com mailto:[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]>