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 8774357
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T18:32:48+00:00 2026-06-13T18:32:48+00:00

I am pulling a parameter from the database <xsl:param name=theMessage></xsl:param> The data that is

  • 0

I am pulling a parameter from the database

<xsl:param name="theMessage"></xsl:param>

The data that is pulled html like below:

<style type="text/css">#container {width:100%; margin-top:20px; text-align:center; font-family: Verdana, arial; font-size:100%; font-weight:normal; }</style><div id="container"><b>Text here</b></div>

The XSL:

<xsl:value-of select="$theMessage" disable-output-escaping="yes" />

And it displays as the code and not the output desired. Any ideas on where I am going wrong? Is it on the xsl side or do I need CDATA in the database etc?

Thanks in advance.

  • 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-13T18:32:49+00:00Added an answer on June 13, 2026 at 6:32 pm

    While output escaping has worked for me in the past, it did not do so on this string of data because the data contained ‘ marks which needed to be escaped.

    so the string was as such (in java).

    returnStr = returnStr.replace("'","\\'"); - this escaped those pesky tic marks, or single quotes
    

    And the returnStr was equal to:<style type="text/css">#container {width:100%; margin-top:20px; text-align:center; font-family: Verdana, arial; font-size:100%; font-weight:normal; }</style><div id="container"><b>Text here</b></div>…plus a lot more html code and text

    The xsl param was the same:

    <xsl:param name="theMessage"></xsl:param>
    

    And on the stylesheet the new code looked as such:

    <div id="bilbo"></div>
        <script type="text/javascript">
        var outputString = '<xsl:value-of select="$theMessage" />'
        document.getElementById('bilbo').innerHTML = outputString;
        </script>  
    

    That pulled the data from the database, stripped out the single quotes, set the string to an xsl parameter, set the parameter to a js variable, then put it inside a div as the html it needed to be – as output.

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

Sidebar

Related Questions

I have a form that has all the fields pulled dynamic from a database
I have a form that pulls data from a database. Code works fine if
I'm working a program that is pulling a string field from an access database,
I have a cakePHP application that is pulling data from two different databases, which
I'm pulling information from the WordPress database. It's definitely pulling all the correct information
I have a query pulling the last six months of data from a table
I am pulling a date string from an API. The returned string looks like
I am pulling out data from MySQL ordered by id, which is 1,2,3 and
I am already pulling the parameters from the stored proc sent in like this:
I have a query pulling data from three tables using LEFT OUTER JOIN for

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.