Announcement Announcement Module
No announcement yet.
XPath router case insensitive node Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • XPath router case insensitive node

    I'll make this quick:

    I want to use the xpath-router based on a case-insensitive value of an xml node's text value (eg, <node>text</node>, "text" could be "Text", "TEXT", etc). I have set up an expression and associated mapping elements for the xpath-router, but i cannot seem to make the mappings case-insensitive. Any suggestions?

        <int-xml:xpath-router input-channel="incomingChannel" >
            <int-xml:xpath-expression expression="/Wrapper/Body/serviceRequest/action/text()" />
            <int-xml:mapping value="SEARCH" channel="searchChannel" />
            <int-xml:mapping value="SEARCH.USERID" channel="searchByUserIdChannel" />
            <int-xml:mapping value="PRINT" channel="printChannel" />
    Unfortunately, I'm using Xpath 1.0. I've tried using the translate function within the Xpath, but it doesn't work.
    Any pointers would be great....

  • #2
    Maybe you can have a transformer upstream that converts the content of your action node to lower case before sending it to the xpath router.
    In your xpath router the mapping values will be in lower case too.


    • #3
      I started doing exactly that and then got your reply to this thread! Thanks for the suggestion.... helps support my decision to try it that way.