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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T14:56:50+00:00 2026-05-19T14:56:50+00:00

This issue is similar to the one mentioned here how to unescape xml with

  • 0

This issue is similar to the one mentioned here how to unescape xml with xslt but slightly different as my text is coming from a processing instruction.

I have an instruction like this:

<?xm-mark data="&lt;p>Here is the text&lt;/p>" ?>

And I would like to output the data part with the &lt; unencoded. My attempt so far is:

<xsl:template match="processing-instruction('xm-mark')">
  <mymark>
  <xsl:value-of select="substring-before(substring-after(., 'data=&quot;'), '&quot;')"
  disable-output-escaping="yes" />
  </mymark>
</xsl:template>

However, this gives me back the text as &lt;p>. If I remove the disable-output-escaping=”yes”, i get back &amplt; (double encoded as i would expect). Since I can’t put a value-of around the value-of in my template, any idea how i unescape the data?

  • 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-05-19T14:56:50+00:00Added an answer on May 19, 2026 at 2:56 pm

    This is what you get when you destroy markup by converting it to text.

    Remember never to “architect” such horrible things.

    Also, resorting to DOE is a sign of desperation and is not guaranteed to work at all (DOE is not a mandatory feature and some major XSLT 1.0 processors, such as the one used by FF don’t implement it).

    So, what other alternative is there?

    One possible solution is to write an extension function (there is no such standard function in XSLT/XPath version 1.0 and 2.0) that takes a string, parses it as XML and returns the resulting XML document. It will be used like that:

      <xsl:copy-of select=
          "xx:parse(substring-before(substring-after(., 'data=&quot;'), '&quot;'))/*"/>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

my issue lokks similar to this one: (link) but i have one-to-many association: <set
I can't resolve this issue, I found a similar question here but: setting the
I have been through numerous similar questions on this forum but my issue still
I have seen another post similar to this one on the website but the
I have an issue similar to this one: SQL Server 2008: ODBC connection problems
I've been researching this one and found references to similar problems here and there,
I've got an issue similar to this one: iPad/iPhone browser crashing when loading images
So I've done some research into this issue, but I haven't found anything similar
I read similar questions and responses on this issue, and tried a number of
I am having a similar issue to this person . The primary difference being

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.