You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Aurélien DEHAY <ad...@zorel.org> on 2005/02/20 19:30:05 UTC
Bug in SourceWritingTransformer.java ??
Hello.
I've got the following XML:
<?xml version="1.0" encoding="utf-8"?>
<content xmlns:source="http://apache.org/cocoon/source/1.0">
<source:write serializer="xml">
<source:source>test-output</source:source>
<source:fragment>
<!-- anoying comment -->
<rss version="2.0">
</rss>
</source:fragment>
</source:write>
</content>
Once passed thru the source writing transformer, the test-output file is:
<?xml version="1.0" encoding="utf-8"?>
<!-- anoying comment -->
BUT, the sitemap.log (in debug mode), says the file is correctly handled:
DEBUG (2005-02-20) 19:29.03:388 [sitemap.transformer.write-source]
(/llinfo/syndication/svnllinfo-rss2-updatecache)
TP-Processor3/AbstractSAXTransformer: End recording. Fragment=<?xml
version="1.0" encoding="UTF-8"?>
<!-- anoying comment -->
<rss version="2.0">
</rss>
DEBUG (2005-02-20) 19:29.03:388 [sitemap.transformer.write-source]
(/llinfo/syndication/svnllinfo-rss2-updatecache)
TP-Processor3/SourceWritingTransformer: End transforming element.
uri=http://apache.org/cocoon/source/1.0, name=write, raw=source:write
DEBUG (2005-02-20) 19:29.03:389 [sitemap.transformer.write-source]
(/llinfo/syndication/svnllinfo-rss2-updatecache)
TP-Processor3/SourceWritingTransformer: Insert fragment.
systemID=test-output, path=/, replace=null, create=true, overwrite=true,
reinsert=null, fragment=<?xml version="1.0" encoding="UTF-8"?>
<!-- anoying comment -->
<rss version="2.0">
</rss>
When the comment is not here, the output file is correct:
<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
</rss>
It is a bug? A feature? Is someone knows about it? Should I create an
account and fill a bug in nagoya?
Rgds.
I'm using cocoon2.1.6 with a genuine xalan 2.6 (not the cocoon.war one)
--
Aurélien DEHAY
Re: Bug in SourceWritingTransformer.java ??
Posted by "Gregor J. Rothfuss" <gr...@apache.org>.
Aurélien DEHAY wrote:
> Hello.
> It is a bug? A feature? Is someone knows about it? Should I create an
> account and fill a bug in nagoya?
>
> Rgds.
we have seen this in lenya too. it is a bug that the source writing
transformer stops processing after a comment. please file a cocoon bug.
--
Gregor J. Rothfuss
COO, Wyona Content Management Solutions http://wyona.com
Apache Lenya http://lenya.apache.org
gregor.rothfuss@wyona.com gregor@apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: Bug in SourceWritingTransformer.java ??
Posted by Geert Josten <Ge...@daidalos.nl>.
> It is a bug? A feature? Is someone knows about it? Should I create an
> account and fill a bug in nagoya?
I would say it is. I noticed the 'feature' before and traced the 'bug' back to the following line:
Node importNode = resource.importNode(fragment, true);
Only the first node in the fragment is imported. It would be better to use a loop or a different
function that returns a node set. But I haven't come up with a patch yet. Anyone else has a patch?
So, yes, i think it should be reported, if it isn't already. Anyone who knows?
Cheers
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org