Re: passing through special characters

Subject: Re: passing through special characters
From: Mike Brown <mike@xxxxxxxx>
Date: Fri, 1 Sep 2000 12:10:41 -0600 (MDT)
Steve Morrison wrote:
> I'm trying to generate wml from xml. In the xml I have this:
> <url name="next">http://server.com/file?C=books&#38;T=boston</url>
> 
> I want the resulting wml to contain the &#38; and not expand it to &.

&#38; or &amp; in your XML means "&" and will be reported to the XSL
processor as "&" by the XML parser, as part of the character data for the
entire URL.

> It's currently outputing: http://server.com/file?C=books&T=boston

Internally it should look like that, but when it is output using the HTML
or XML output methods, it should be coming out as either

http://server.com/file?C=books&amp;T=boston
or
http://server.com/file?C=books&#38;T=boston

...unless you have specified disable-output-escaping on xsl:value-of, or
you're using SAXON and have used its equivalent for disabling output
escaping on attributes. What XSL processor are you using? How exactly are
you getting it to not escape the "&"?

This is really weird because it is exactly the *opposite* problem that
most people ask about. They usually think they need it to not be escaped,
which usually isn't ever necessary.

   - Mike
____________________________________________________________________
Mike J. Brown, software engineer at         My XML/XSL resources:
webb.net in Denver, Colorado, USA           http://www.skew.org/xml/


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


Current Thread