cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kazó Csaba <>
Subject Sending DOM from flowscript to pipeline
Date Thu, 19 Jul 2007 05:51:37 GMT

I'm trying to get a generator to work with a DOM Node that I pass it from flowscript. The
method seems to be described at - basically I
do cocoon.sendPage("page",{input:dom}) in my script and src="xmodule:flow-attr:input" in my
generator. (Well, actually I'm using PipelineUtil.processToDOM("page",{input:dom}), but I'm
pretty sure it makes no difference.)

Now, this doesn't work. The exception says "The object type: class java.lang.String could
not be serialized to XML:". To be clear, it is indeed an org.w3c.dom.Node instance and not
a String that I pass from the script. I have actually traced the execution to the point when
the toString() method of the Node is called, so I can provide some details if necessary.

My understanding of the details of the code is quite little, but I believe the reason it won't
work is that it is a Node instance that is passed (if I pass a HashMap instance, I get the
exception saying the expected "java.util.HashMap could not be serialized to XML") and the
way JXPath is used by the flow attribute module to access the attribute.

Right now my question is: how is it supposed to work? I'm not sure if it was meant to be possible
to pass Node objects this way, and there might be no bug in the current implementation. In
this case, is there a proper way to transfer a DOM object to a sitemap generator? Otherwise
I can provide some details as to what's happening in the code (though that should rather go
to the dev list, shouldn't it?).



To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message