[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: need an "&" in my text!!!Please help!

Subject: Re: need an "&" in my text!!!Please help!
From: Jeni Tennison <mail@xxxxxxxxxxxxxxxx>
Date: Tue, 3 Jul 2001 09:24:13 +0100
xslt text output ampersand
Hi Vijay,

> I need to get an ampersand symbol in my output.When I
> tried to put &amp; the xsl outputs it as is ie it is
> not replaced with "&".I tried
> disable-output-escaping="yes" option with a
> <xsl:value-of select>
> I cannot use <xsl:text> because i retrieve the value
> using a select.And when i tried to wrap the select
> with <xsl:text> it complains saying "xsl:text must not
> contain elements".
> Is there a solution.I am using XT!

If you are trying:

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

and the value of $textWithAmpersand is being output with ampersands
being escaped as '&amp;', then XT doesn't support disabling output
escaping.  XT isn't fully compliant with XSLT generally, but in this
instance it is being compliant - processors don't have to support
disabling output escaping.

As you are trying to output an ampersand without it being escaped, you
must be producing something other than XML. If you tell the processor
that you're producing text rather than XML, by setting the output
method to text, then nothing will be escaped when it's output.  Try:

<xsl:output method="text" />

If you are generally producing XML but want this particular ampersand
to be unescaped (perhaps you're producing an entity reference) then
I'm afraid that you have to move to a processor that *does* support
disable-output-escaping, like Saxon, MSXML or Xalan.

Cheeers,

Jeni

---
Jeni Tennison
http://www.jenitennison.com/


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.