You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Claus Ibsen (JIRA)" <ji...@apache.org> on 2012/08/29 18:38:07 UTC

[jira] [Created] (CAMEL-5550) Add headerName option to xpath/xpath language

Claus Ibsen created CAMEL-5550:
----------------------------------

             Summary: Add headerName option to xpath/xpath language
                 Key: CAMEL-5550
                 URL: https://issues.apache.org/jira/browse/CAMEL-5550
             Project: Camel
          Issue Type: Improvement
          Components: camel-core
            Reporter: Claus Ibsen
            Priority: Minor
             Fix For: 2.11.0


We recently added headerName to @XPath / @XQuery to support doing xpaths on headers. We should add that as well to the xpath/xquery languages so its exposed in the DSL, so people can use that.

For example in a content based router. Today there is some functions that return a header, but its a bit cumbersome to use. Maybe people have stored a xml in a header, and just want the xpath to evaluate on that.

The Java / Scala DSL is a bit heavier to add, as it would entail new methods in various builder classes to support that. And we got a bunch already for the namespaces, and return type etc. So be selective and only add a few for the header which makes the most sense. People can always create the expression/predicate using the xpath builder itself.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (CAMEL-5550) Add headerName option to xpath/xpath language

Posted by "Willem Jiang (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CAMEL-5550?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13447098#comment-13447098 ] 

Willem Jiang commented on CAMEL-5550:
-------------------------------------

@Babak,

I'm very Sorry about it.
I didn't update my eclipse workspace to pick up the grading change of saxon, so I revert the change you made before as my eclipse suggested and will reapply your change shortly today.
                
> Add headerName option to xpath/xpath language
> ---------------------------------------------
>
>                 Key: CAMEL-5550
>                 URL: https://issues.apache.org/jira/browse/CAMEL-5550
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-core
>            Reporter: Claus Ibsen
>            Assignee: Willem Jiang
>            Priority: Minor
>             Fix For: 2.11.0
>
>         Attachments: CAMEL-5550.patch
>
>
> We recently added headerName to @XPath / @XQuery to support doing xpaths on headers. We should add that as well to the xpath/xquery languages so its exposed in the DSL, so people can use that.
> For example in a content based router. Today there is some functions that return a header, but its a bit cumbersome to use. Maybe people have stored a xml in a header, and just want the xpath to evaluate on that.
> The Java / Scala DSL is a bit heavier to add, as it would entail new methods in various builder classes to support that. And we got a bunch already for the namespaces, and return type etc. So be selective and only add a few for the header which makes the most sense. People can always create the expression/predicate using the xpath builder itself.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (CAMEL-5550) Add headerName option to xpath/xpath language

Posted by "Alan Foster (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CAMEL-5550?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13444275#comment-13444275 ] 

Alan Foster commented on CAMEL-5550:
------------------------------------

I will try to see what I can do with this one... I'm new to camel development so I may be slow, so if someone else is eager to add this functionality just say and I'll stop :)
                
> Add headerName option to xpath/xpath language
> ---------------------------------------------
>
>                 Key: CAMEL-5550
>                 URL: https://issues.apache.org/jira/browse/CAMEL-5550
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-core
>            Reporter: Claus Ibsen
>            Priority: Minor
>             Fix For: 2.11.0
>
>
> We recently added headerName to @XPath / @XQuery to support doing xpaths on headers. We should add that as well to the xpath/xquery languages so its exposed in the DSL, so people can use that.
> For example in a content based router. Today there is some functions that return a header, but its a bit cumbersome to use. Maybe people have stored a xml in a header, and just want the xpath to evaluate on that.
> The Java / Scala DSL is a bit heavier to add, as it would entail new methods in various builder classes to support that. And we got a bunch already for the namespaces, and return type etc. So be selective and only add a few for the header which makes the most sense. People can always create the expression/predicate using the xpath builder itself.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (CAMEL-5550) Add headerName option to xpath/xpath language

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CAMEL-5550?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13444180#comment-13444180 ] 

Claus Ibsen commented on CAMEL-5550:
------------------------------------

See nabble
http://camel.465427.n5.nabble.com/xpath-for-header-tp5718190.html
                
> Add headerName option to xpath/xpath language
> ---------------------------------------------
>
>                 Key: CAMEL-5550
>                 URL: https://issues.apache.org/jira/browse/CAMEL-5550
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-core
>            Reporter: Claus Ibsen
>            Priority: Minor
>             Fix For: 2.11.0
>
>
> We recently added headerName to @XPath / @XQuery to support doing xpaths on headers. We should add that as well to the xpath/xquery languages so its exposed in the DSL, so people can use that.
> For example in a content based router. Today there is some functions that return a header, but its a bit cumbersome to use. Maybe people have stored a xml in a header, and just want the xpath to evaluate on that.
> The Java / Scala DSL is a bit heavier to add, as it would entail new methods in various builder classes to support that. And we got a bunch already for the namespaces, and return type etc. So be selective and only add a few for the header which makes the most sense. People can always create the expression/predicate using the xpath builder itself.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Resolved] (CAMEL-5550) Add headerName option to xpath/xpath language

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

Willem Jiang resolved CAMEL-5550.
---------------------------------

    Resolution: Fixed

Applied patch into trunk with thanks to Alan.
As there are big gap between the Scala DSL and Java DSL. I think we should create another JIRA for it.
                
> Add headerName option to xpath/xpath language
> ---------------------------------------------
>
>                 Key: CAMEL-5550
>                 URL: https://issues.apache.org/jira/browse/CAMEL-5550
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-core
>            Reporter: Claus Ibsen
>            Assignee: Willem Jiang
>            Priority: Minor
>             Fix For: 2.11.0
>
>         Attachments: CAMEL-5550.patch
>
>
> We recently added headerName to @XPath / @XQuery to support doing xpaths on headers. We should add that as well to the xpath/xquery languages so its exposed in the DSL, so people can use that.
> For example in a content based router. Today there is some functions that return a header, but its a bit cumbersome to use. Maybe people have stored a xml in a header, and just want the xpath to evaluate on that.
> The Java / Scala DSL is a bit heavier to add, as it would entail new methods in various builder classes to support that. And we got a bunch already for the namespaces, and return type etc. So be selective and only add a few for the header which makes the most sense. People can always create the expression/predicate using the xpath builder itself.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (CAMEL-5550) Add headerName option to xpath/xpath language

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

Alan Foster updated CAMEL-5550:
-------------------------------

    Attachment: CAMEL-5550.patch

I hope this patch is OK

I wasn't able to do anything with the Scala side of things because I've never used it before :(

Alan
                
> Add headerName option to xpath/xpath language
> ---------------------------------------------
>
>                 Key: CAMEL-5550
>                 URL: https://issues.apache.org/jira/browse/CAMEL-5550
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-core
>            Reporter: Claus Ibsen
>            Assignee: Willem Jiang
>            Priority: Minor
>             Fix For: 2.11.0
>
>         Attachments: CAMEL-5550.patch
>
>
> We recently added headerName to @XPath / @XQuery to support doing xpaths on headers. We should add that as well to the xpath/xquery languages so its exposed in the DSL, so people can use that.
> For example in a content based router. Today there is some functions that return a header, but its a bit cumbersome to use. Maybe people have stored a xml in a header, and just want the xpath to evaluate on that.
> The Java / Scala DSL is a bit heavier to add, as it would entail new methods in various builder classes to support that. And we got a bunch already for the namespaces, and return type etc. So be selective and only add a few for the header which makes the most sense. People can always create the expression/predicate using the xpath builder itself.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (CAMEL-5550) Add headerName option to xpath/xpath language

Posted by "Babak Vahdat (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CAMEL-5550?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13445783#comment-13445783 ] 

Babak Vahdat commented on CAMEL-5550:
-------------------------------------

Willem

The patch provided by Alan doesn't include any modification for XQueryBuilder.java, however your commit has changed this source as well causing the previous commit being reverted!

http://svn.apache.org/viewvc/camel/trunk/components/camel-saxon/src/main/java/org/apache/camel/component/xquery/XQueryBuilder.java?r1=1378534&r2=1379352&pathrev=1379352

                
> Add headerName option to xpath/xpath language
> ---------------------------------------------
>
>                 Key: CAMEL-5550
>                 URL: https://issues.apache.org/jira/browse/CAMEL-5550
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-core
>            Reporter: Claus Ibsen
>            Assignee: Willem Jiang
>            Priority: Minor
>             Fix For: 2.11.0
>
>         Attachments: CAMEL-5550.patch
>
>
> We recently added headerName to @XPath / @XQuery to support doing xpaths on headers. We should add that as well to the xpath/xquery languages so its exposed in the DSL, so people can use that.
> For example in a content based router. Today there is some functions that return a header, but its a bit cumbersome to use. Maybe people have stored a xml in a header, and just want the xpath to evaluate on that.
> The Java / Scala DSL is a bit heavier to add, as it would entail new methods in various builder classes to support that. And we got a bunch already for the namespaces, and return type etc. So be selective and only add a few for the header which makes the most sense. People can always create the expression/predicate using the xpath builder itself.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Assigned] (CAMEL-5550) Add headerName option to xpath/xpath language

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

Willem Jiang reassigned CAMEL-5550:
-----------------------------------

    Assignee: Willem Jiang
    
> Add headerName option to xpath/xpath language
> ---------------------------------------------
>
>                 Key: CAMEL-5550
>                 URL: https://issues.apache.org/jira/browse/CAMEL-5550
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-core
>            Reporter: Claus Ibsen
>            Assignee: Willem Jiang
>            Priority: Minor
>             Fix For: 2.11.0
>
>
> We recently added headerName to @XPath / @XQuery to support doing xpaths on headers. We should add that as well to the xpath/xquery languages so its exposed in the DSL, so people can use that.
> For example in a content based router. Today there is some functions that return a header, but its a bit cumbersome to use. Maybe people have stored a xml in a header, and just want the xpath to evaluate on that.
> The Java / Scala DSL is a bit heavier to add, as it would entail new methods in various builder classes to support that. And we got a bunch already for the namespaces, and return type etc. So be selective and only add a few for the header which makes the most sense. People can always create the expression/predicate using the xpath builder itself.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (CAMEL-5550) Add headerName option to xpath/xpath language

Posted by "Willem Jiang (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CAMEL-5550?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13445766#comment-13445766 ] 

Willem Jiang commented on CAMEL-5550:
-------------------------------------

Applied the patch with thanks to Alan, I also added some Spring Xpath unit tests.
                
> Add headerName option to xpath/xpath language
> ---------------------------------------------
>
>                 Key: CAMEL-5550
>                 URL: https://issues.apache.org/jira/browse/CAMEL-5550
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-core
>            Reporter: Claus Ibsen
>            Assignee: Willem Jiang
>            Priority: Minor
>             Fix For: 2.11.0
>
>         Attachments: CAMEL-5550.patch
>
>
> We recently added headerName to @XPath / @XQuery to support doing xpaths on headers. We should add that as well to the xpath/xquery languages so its exposed in the DSL, so people can use that.
> For example in a content based router. Today there is some functions that return a header, but its a bit cumbersome to use. Maybe people have stored a xml in a header, and just want the xpath to evaluate on that.
> The Java / Scala DSL is a bit heavier to add, as it would entail new methods in various builder classes to support that. And we got a bunch already for the namespaces, and return type etc. So be selective and only add a few for the header which makes the most sense. People can always create the expression/predicate using the xpath builder itself.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira