|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: need an "&" in my text!!!Please help!
Hi Vijay,
> I need to get an ampersand symbol in my output.When I
> tried to put & 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 '&', 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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








