Jeremy Quinn wrote:
On Wednesday, Jan 8, 2003, at 08:48 Europe/London, Steven Noels wrote:
Well, I'm a bit confused: there is a src attribute on the
source:write element, but only in the status report apparently, and a
source:source element which content should list the filename
according to
http://xml.apache.org/cocoon/userdocs/transformers/sourcewriting-
transformer.html:
I think what is going on is this .... (this is completely off the top
of my head ...)
You should supply the <source:source> parameter, with your source
specification in it.
I do:
<xsl:template match="profile">
<source:write xmlns:source="http://apache.org/cocoon/source/1.0"
create="true">
<source:source>gump-profile.xml</source:source>
<source:fragment>
<profile xmlns:cinclude="http://apache.org/cocoon/include/1.0">
<xsl:apply-templates select="*"/>
</profile>
</source:fragment>
</source:write>
</xsl:template>
and
<map:match pattern="gump-store">
<map:generate src="cocoon:/gump-cincluded"/>
<map:transform type="write-source"/>
<map:serialize type="xml"/>
</map:match>
When SWT has done it's job, it reports the SystemId of the written-to
source in the <source:src> parameter.
No luck :(
<?xml version="1.0" encoding="UTF-8"?>
<source:write src="" action="none" result="failed"
xmlns:cinclude="http://apache.org/cocoon/include/1.0"
xmlns:source="http://apache.org/cocoon/source/1.0">The src attribute
could not be resolved and failed to cancel</source:write>
I think I gave them different names because when I was initially using
this stuff it was only for files, and the 'source' and 'src' would be
different strings ....
ie.
<source:source>blah/my.xml</source:source>
<source:src>file://Users/Shared/TomCat/webapps/cocoon/blah/my.xml</
source:src>
A bunch of people have reported recently that context:// does not work
as a <source:source>. TBH I do not remember testing it before that went
into the docs .... I just assumed it would work, naughty me!
context, file, no scheme: no luck.
Could this be the case because I'm using this from an auto-mounted
subsitemap? Or that I use a file generating pointing to a pipeline using
cocoon: ?
</Steven>
--
Steven Noels http://outerthought.org/
Outerthought - Open Source, Java & XML Competence Support Center
Read my weblog at http://blogs.cocoondev.org/stevenn/
stevenn at outerthought.org stevenn at apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]