cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hugh Sparks (JIRA)" <>
Subject [jira] Commented: (COCOON-2108) xmodule:flow-attr Does not accept document objects
Date Fri, 10 Aug 2007 22:43:43 GMT


Hugh Sparks commented on COCOON-2108:

I tried the fix suggested by Csaba Kazó and it made all the test cases in
xmodulePuzzles.txt work as expected.

Now the question becomes, "what else is broken if this fix is left in place"?
(I tried to find some jxpath usage in the Samples, but without success.)

One possible motive for using getValue() in the original code was to make it possible
to get the actual string values of an jxpath expression. Recall the xmodule allows
a path to be appended:

For the xml:

    <test>This is <inside>a test</inside>of xmodule</test>

The expression:


Gives this result if we use Csaba Kazó's fix:

    <inside>a test</inside>

Because the text() function is missing from Cocoon's jxpath,
there is no way to recover the text inside using an xmodule
expression in the sitemap.

It seems to me that a possible solution would be to use Kazó's 
suggested change, but add the text() function to jxpath so this
expression would return the contents of the element:


= "a test"

Is jxpath supposed to have a text() function?


> xmodule:flow-attr Does not accept document objects
> --------------------------------------------------
>                 Key: COCOON-2108
>                 URL:
>             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:
> 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:
> I hope someone can fix or explain the correct usage of xmodule:flow-attr.
> Thanks to all,
> -Hugh Sparks,

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message