You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Javier Arauz (JIRA)" <ji...@apache.org> on 2008/03/17 11:09:24 UTC

[jira] Created: (SCXML-70) Inconsistent behavior between Data(name, '.'), single-node XML tree and multiple-node XML tree within namelist

Inconsistent behavior between Data(name, '.'), single-node XML tree and multiple-node XML tree within <send> namelist
---------------------------------------------------------------------------------------------------------------------

                 Key: SCXML-70
                 URL: https://issues.apache.org/jira/browse/SCXML-70
             Project: Commons SCXML
          Issue Type: Improvement
    Affects Versions: 0.7, 0.6, 0.5
            Reporter: Javier Arauz
            Priority: Minor
             Fix For: 0.8, 1.0


When using JEXL, expression Data(name, '.') correctly returns the first node in the set of XML trees under data element 'name'. However, when executing a <send> action that includes 'name' in the namelist attribute, what is passed down to the execution environment is an XML tree rooted with a <data> element.

That semantic of <send> is not usually what an application expects. For instance, say the application wants to send back an HTML page to a requesting client:

    <data name='ContentType' expr='text/html'/>
    <data name='EntityBody'><html><body>Hi there!</body></html></data>
    <send targettype='x-http' namelist='ContentType EnttityBody'/>

The execution environment receives 'text/html' in the parameter 'ContentType', as expected. But in parameter 'EntityBody' it receives a <data> node wrapping the HTML content, which when sent to the client can't of course be properly handled. This forces the execution environment to perform specific processing for the latter case.

To align the three behaviors, the first child of the <data> element (as opposed to the <data> element itself) should be passed down to the execution environment in all cases.

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


[jira] Updated: (SCXML-70) Inconsistent behavior between Data(name, '.'), single-node XML tree and multiple-node XML tree within namelist

Posted by "Rahul Akolkar (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SCXML-70?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Rahul Akolkar updated SCXML-70:
-------------------------------

         Fix Version/s:     (was: 0.8)
    Remaining Estimate:     (was: 48h)
     Original Estimate:     (was: 48h)

Unlikely to change in v0.8 and removing time estimates (we haven't started doing that yet).

> Inconsistent behavior between Data(name, '.'), single-node XML tree and multiple-node XML tree within <send> namelist
> ---------------------------------------------------------------------------------------------------------------------
>
>                 Key: SCXML-70
>                 URL: https://issues.apache.org/jira/browse/SCXML-70
>             Project: Commons SCXML
>          Issue Type: Improvement
>    Affects Versions: 0.5, 0.6, 0.7
>            Reporter: Javier Arauz
>            Priority: Minor
>             Fix For: 1.0
>
>
> When using JEXL, expression Data(name, '.') correctly returns the first node in the set of XML trees under data element 'name'. However, when executing a <send> action that includes 'name' in the namelist attribute, what is passed down to the execution environment is an XML tree rooted with a <data> element.
> That semantic of <send> is not usually what an application expects. For instance, say the application wants to send back an HTML page to a requesting client:
>     <data name='ContentType' expr='text/html'/>
>     <data name='EntityBody'><html><body>Hi there!</body></html></data>
>     <send targettype='x-http' namelist='ContentType EnttityBody'/>
> The execution environment receives 'text/html' in the parameter 'ContentType', as expected. But in parameter 'EntityBody' it receives a <data> node wrapping the HTML content, which when sent to the client can't of course be properly handled. This forces the execution environment to perform specific processing for the latter case.
> To align the three behaviors, the first child of the <data> element (as opposed to the <data> element itself) should be passed down to the execution environment in all cases.

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


[jira] Commented: (SCXML-70) Inconsistent behavior between Data(name, '.'), single-node XML tree and multiple-node XML tree within namelist

Posted by "Rahul Akolkar (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SCXML-70?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12580002#action_12580002 ] 

Rahul Akolkar commented on SCXML-70:
------------------------------------

I seem to remember that the <data> element was returned because its contents don't necessarily have to be a tree (and for a forest, the first child selection criteria seems arbitrary).

It will be great if you could convert the snippets above into a commented JUnit test case for the (existing) Commons SCXML test suite, and attach that as a patch.

Finally, its unlikely that we will make behavioral changes here (in a point or minor release). We may just have to document it the v0.x series, rather than break existing code that may rely on this behavior.


> Inconsistent behavior between Data(name, '.'), single-node XML tree and multiple-node XML tree within <send> namelist
> ---------------------------------------------------------------------------------------------------------------------
>
>                 Key: SCXML-70
>                 URL: https://issues.apache.org/jira/browse/SCXML-70
>             Project: Commons SCXML
>          Issue Type: Improvement
>    Affects Versions: 0.5, 0.6, 0.7
>            Reporter: Javier Arauz
>            Priority: Minor
>             Fix For: 1.0
>
>   Original Estimate: 48h
>  Remaining Estimate: 48h
>
> When using JEXL, expression Data(name, '.') correctly returns the first node in the set of XML trees under data element 'name'. However, when executing a <send> action that includes 'name' in the namelist attribute, what is passed down to the execution environment is an XML tree rooted with a <data> element.
> That semantic of <send> is not usually what an application expects. For instance, say the application wants to send back an HTML page to a requesting client:
>     <data name='ContentType' expr='text/html'/>
>     <data name='EntityBody'><html><body>Hi there!</body></html></data>
>     <send targettype='x-http' namelist='ContentType EnttityBody'/>
> The execution environment receives 'text/html' in the parameter 'ContentType', as expected. But in parameter 'EntityBody' it receives a <data> node wrapping the HTML content, which when sent to the client can't of course be properly handled. This forces the execution environment to perform specific processing for the latter case.
> To align the three behaviors, the first child of the <data> element (as opposed to the <data> element itself) should be passed down to the execution environment in all cases.

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