commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rahul Akolkar (JIRA)" <j...@apache.org>
Subject [jira] Commented: (SCXML-69) JEXL built-in Data() function cannot return a reference to a whole <data> element
Date Thu, 13 Mar 2008 22:18:27 GMT

    [ https://issues.apache.org/jira/browse/SCXML-69?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12578513#action_12578513
] 

Rahul Akolkar commented on SCXML-69:
------------------------------------

I agree with some of your opinions in the (now deleted) JIRA comment. Please post any further
discussion to the appropriate mailing list, thanks.


> JEXL built-in Data() function cannot return a reference to a whole <data> element
> ---------------------------------------------------------------------------------
>
>                 Key: SCXML-69
>                 URL: https://issues.apache.org/jira/browse/SCXML-69
>             Project: Commons SCXML
>          Issue Type: Improvement
>    Affects Versions: 0.5, 0.6, 0.7
>            Reporter: Javier Arauz
>            Priority: Minor
>   Original Estimate: 72h
>  Remaining Estimate: 72h
>
> There is no way with JEXL of building a Data() expression that refers to a whole <data>
element, only to one of its children.
> Using standard W3C SCXML it is possible to refer to a whole <data> element, e.g.:
>     <data name="myFoo"><content>Hi there!</content></data>
>     <data name="foo" expr="'bar'"/>
>     <assign location="/foo" expr="/myFoo/content"/>
> In theory, after running the above SCXML the 'foo' data element changes from value 'bar'
to 'Hi there!'.
> There is no equivalent to the above SCXML using JEXL, since no Data() expression yields
the root <data> element. This has the side effect that data elements as 'foo' above
are effectively constants, since once defined there's no way of changing them.
> The solution to this problem would consist of implementing a new method in class org.apache.commons.scxml.Builtin
that takes just two arguments: the namespaces in use and the name of the <data> element,
and returns an org.w3c.Node containing whatever that <data> element contains. Then you
could write:
>     <data name="myFoo"><content>Hi there!</content></data>
>     <data name="foo" expr="'bar'"/>
>     <assign location="Data(foo)" expr="Data(myFoo, 'content'"/>

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


Mime
View raw message