Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9205585
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T23:59:01+00:00 2026-06-17T23:59:01+00:00

I am using the below shown snippet of choice element in my Mule 3.3

  • 0

I am using the below shown snippet of choice element in my Mule 3.3 flow. XSL Transformer feeds the choice element. XSL Transformer is supposed to return a String (name of an entity) and on the basis of string value, I use choice router to push it to different jms queues.

<flow name="ProcessOrder">
    .
    .  
    <xm:xslt-transformer xsl-file="xsl/getEntity.xslt" returnClass="java.lang.String"/>
    <choice>
        <when expression="payload.contains('ABC')">             
            <jms:outbound-endpoint queue="order.queue1" />
        </when>
        <when>
        </when>
        <otherwise>         
        </otherwise>
    </choice>
</flow>

XSL Transformer returns this payload
<?xml version="1.0" encoding="UTF-8"?>ABC

My question is how do I compare the String returned. I don’t think payload.contains() is the best way to do this, though it solves my purpose and also we won’t have matching entities returned which are ever like ABCxy but still this is not a full proof solution.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T23:59:02+00:00Added an answer on June 17, 2026 at 11:59 pm

    Add the omit-xml-declaration part in your xslt as shown below. This will give you the raw string without the prolog.

    <xsl:stylesheet version="2.0"
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"    >
    
    <xsl:output omit-xml-declaration="yes" indent="yes" />
    
    <xsl:template match="/">
    ...
    ...
    

    This will give

    "ABC" as output instead of     "<?xml version="1.0" encoding="UTF-8"?>ABC"
    

    Then in the expression use it like

    <when expression="#[message.payload.contains('ABC')]">
    

    This way it should work.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have created a tab-pane using HAML as shown in my code snippet below
I'm using a form containing a button type shown below: <form method=post action=> <button
I using a dataset to read an xml file as shown below DataSet ds
I'm populating my select box using the query shown below: <%=f.select :acoustic, options_for_select(User.includes(:roles).where( :roles
I was trying to pass tables using JSON as shown below. sample.json { title:
I am using asp.net when loading image it gives me error as shown below.
I have a CSV file in the format shown below, and I'm using the
Okay, so I've got the following code shown below to create a dialog using
For some time now, I've been using the design pattern of objectOne, shown below.
I have added checkbox in display table using decorator class as shown in below

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.