[
https://issues.apache.org/jira/browse/COCOON-2108?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12518811
]
Csaba Kazó commented on COCOON-2108:
------------------------------------
My evaluation in the above mentioned thread can be found here:
http://www.mail-archive.com/[EMAIL PROTECTED]/msg39242.html
To sum up, I've found that the flow attribute module obtains the string value
instead of the original domain object when calling into JXPath; this call is in
JXPathHelper.getAttribute, line 96:
Object obj = jxContext.getValue(name);
Here, a jxContext.getPointer(name).getNode() call would return the correct DOM
object. I can imagine that the solution to the bug is as simple as this,
although my understanding of JXPath is limited.
If you quickly need a workaround, you can easily create a small replacement
input module subclassing AbstractInputModule that simply gets the domain object
without any JXPath traversal.
> xmodule:flow-attr Does not accept document objects
> --------------------------------------------------
>
> Key: COCOON-2108
> URL: https://issues.apache.org/jira/browse/COCOON-2108
> Project: Cocoon
> Issue Type: Bug
> Components: * Cocoon Core
> Affects Versions: 2.1.11-dev (Current SVN)
> Reporter: Hugh Sparks
> Priority: Minor
> Attachments: xmodulePuzzle.txt
>
>
> Sending document objects from flowscript back to the pipeline using
> xmodule:flow-attr produces unexpected results. Also, the examples from
> the documentation do not work as described:
> http://cocoon.apache.org/2.1/861.daisy.html
> The most common error reported is:
> 'The object type: class java.lang.String could not be serialized to XML"
> This issue was discussed recently on the cocoon-users mailing list.
> The thread was introduced by Kazo Csaba with the subject "Sending DOM from
> flowscript to pipeline."
> (July 17, 2007)
> He has attempted to trace this behavior in the source code and believes that a
> possibly-inappropriate conversion to string occurs in some cases.
> Jason Johnston suggested moving the issue to JIRA.
> I've created a demonstration of this apparent bug and some related problems
> in this very brief example:
> http://www.csparks.com/xmodulePuzzle.txt
> I hope someone can fix or explain the correct usage of xmodule:flow-attr.
> Thanks to all,
> -Hugh Sparks, [EMAIL PROTECTED]
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.