You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Jaroslav Pullmann (JIRA)" <ji...@apache.org> on 2009/03/23 11:07:50 UTC
[jira] Created: (SCXML-106) Support for XPath as further EL
Support for XPath as further EL
-------------------------------
Key: SCXML-106
URL: https://issues.apache.org/jira/browse/SCXML-106
Project: Commons SCXML
Issue Type: Improvement
Affects Versions: 0.9
Reporter: Jaroslav Pullmann
Priority: Minor
Adding support for XPath (2.0?) as further expression language was already suggested earlier [1].
Not aware, whether there is any ongoing development I'd ask for this important enhancement.
Use cases:
- access to a wide range of built-in functions (count, matches)
- navigation with predicates involving string value tests:
Since XPathes are passed as arguments to the Data function
and JEXL does not provide for escaping quotes (see [2])
there is currently no way to express pathes like:
<assign location="Data(mydata,'list/item[@id=\'foo\']')" expr...
Top-level XPath expressions would enable such (more natural) navigation:
<assign location="/data[@id='mydata']/list/item[@id='foo']" expr...
[1] http://www.nabble.com/-scxml--%3Cassign%3E-tag-td4093525.html#a4103653
[2] http://mail-archives.apache.org/mod_mbox/commons-user/200605.mbox/%3Cb22dff980605260809m2092423dqc469cb5b15f81047@mail.gmail.com%3E
Many thanks
Jaro
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (SCXML-106) Support for XPath as further EL
Posted by "Rahul Akolkar (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SCXML-106?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12688925#action_12688925 ]
Rahul Akolkar commented on SCXML-106:
-------------------------------------
Payload is obtained like so:
$_eventdata
For example, if payload is the String "world", then:
<log expr="concat('Hello ', $_eventdata)"/>
Ofcourse, if the payload is a DOM node, then things can become even more interesting since you can XPath into the payload itself.
Please move any further discussion to the mailing list.
> Support for XPath as further EL
> -------------------------------
>
> Key: SCXML-106
> URL: https://issues.apache.org/jira/browse/SCXML-106
> Project: Commons SCXML
> Issue Type: Improvement
> Affects Versions: 0.9
> Reporter: Jaroslav Pullmann
> Priority: Minor
> Fix For: 1.0
>
>
> Adding support for XPath (2.0?) as further expression language was already suggested earlier [1].
> Not aware, whether there is any ongoing development I'd ask for this important enhancement.
> Use cases:
> - access to a wide range of built-in functions (count, matches)
> - navigation with predicates involving string value tests:
> Since XPathes are passed as arguments to the Data function
> and JEXL does not provide for escaping quotes (see [2])
> there is currently no way to express pathes like:
>
> <assign location="Data(mydata,'list/item[@id=\'foo\']')" expr...
> Top-level XPath expressions would enable such (more natural) navigation:
> <assign location="/data[@id='mydata']/list/item[@id='foo']" expr...
> [1] http://www.nabble.com/-scxml--%3Cassign%3E-tag-td4093525.html#a4103653
> [2] http://mail-archives.apache.org/mod_mbox/commons-user/200605.mbox/%3Cb22dff980605260809m2092423dqc469cb5b15f81047@mail.gmail.com%3E
> Many thanks
> Jaro
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Resolved: (SCXML-106) Support for XPath as further EL
Posted by "Rahul Akolkar (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SCXML-106?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Rahul Akolkar resolved SCXML-106.
---------------------------------
Resolution: Fixed
Fix Version/s: 1.0
This has been fixed in the J6 branch (see new org.apache.commons.scxml.env.xpath package), and will be part of the 1.0 release (no schedule for that yet). Note that the J6 branch requires JDK 1.6 or above.
http://svn.apache.org/repos/asf/commons/proper/scxml/branches/J6/
XPath provides the advantages you note above. The actual syntax is even simpler than what you wrote, for example, the <assign> above can be rewritten as:
<assign location="$mydata/list/item[@id='foo']" expr...
Setting resolution to fixed.
> Support for XPath as further EL
> -------------------------------
>
> Key: SCXML-106
> URL: https://issues.apache.org/jira/browse/SCXML-106
> Project: Commons SCXML
> Issue Type: Improvement
> Affects Versions: 0.9
> Reporter: Jaroslav Pullmann
> Priority: Minor
> Fix For: 1.0
>
>
> Adding support for XPath (2.0?) as further expression language was already suggested earlier [1].
> Not aware, whether there is any ongoing development I'd ask for this important enhancement.
> Use cases:
> - access to a wide range of built-in functions (count, matches)
> - navigation with predicates involving string value tests:
> Since XPathes are passed as arguments to the Data function
> and JEXL does not provide for escaping quotes (see [2])
> there is currently no way to express pathes like:
>
> <assign location="Data(mydata,'list/item[@id=\'foo\']')" expr...
> Top-level XPath expressions would enable such (more natural) navigation:
> <assign location="/data[@id='mydata']/list/item[@id='foo']" expr...
> [1] http://www.nabble.com/-scxml--%3Cassign%3E-tag-td4093525.html#a4103653
> [2] http://mail-archives.apache.org/mod_mbox/commons-user/200605.mbox/%3Cb22dff980605260809m2092423dqc469cb5b15f81047@mail.gmail.com%3E
> Many thanks
> Jaro
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (SCXML-106) Support for XPath as further EL
Posted by "Jaroslav Pullmann (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SCXML-106?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12688689#action_12688689 ]
Jaroslav Pullmann commented on SCXML-106:
-----------------------------------------
Rahul,
does the XPath EL in current state allow for accessing the event payload ?
None of "_event.", "_event/" or "_eventdata/" combinations worked.
Thank you
Jaro
> Support for XPath as further EL
> -------------------------------
>
> Key: SCXML-106
> URL: https://issues.apache.org/jira/browse/SCXML-106
> Project: Commons SCXML
> Issue Type: Improvement
> Affects Versions: 0.9
> Reporter: Jaroslav Pullmann
> Priority: Minor
> Fix For: 1.0
>
>
> Adding support for XPath (2.0?) as further expression language was already suggested earlier [1].
> Not aware, whether there is any ongoing development I'd ask for this important enhancement.
> Use cases:
> - access to a wide range of built-in functions (count, matches)
> - navigation with predicates involving string value tests:
> Since XPathes are passed as arguments to the Data function
> and JEXL does not provide for escaping quotes (see [2])
> there is currently no way to express pathes like:
>
> <assign location="Data(mydata,'list/item[@id=\'foo\']')" expr...
> Top-level XPath expressions would enable such (more natural) navigation:
> <assign location="/data[@id='mydata']/list/item[@id='foo']" expr...
> [1] http://www.nabble.com/-scxml--%3Cassign%3E-tag-td4093525.html#a4103653
> [2] http://mail-archives.apache.org/mod_mbox/commons-user/200605.mbox/%3Cb22dff980605260809m2092423dqc469cb5b15f81047@mail.gmail.com%3E
> Many thanks
> Jaro
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.