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

Re: Retaining '&' after transforming XML to HTML via XSL

Subject: Re: Retaining '&' after transforming XML to HTML via XSL
From: Mike Brown <mike@xxxxxxxx>
Date: Mon, 26 Jun 2000 13:58:41 -0600 (MDT)
xml to html via xsl
> I would like to retain an ampersand ('&') in an HTML stream

I'd call it an almost-HTML stream, then.

http://www.w3.org/TR/1999/REC-html401-19991224/charset.html

'Authors should use "&amp;" (ASCII decimal 38) instead of "&" to avoid
confusion with the beginning of a character reference (entity reference
open delimiter). Authors should also use "&amp;" in attribute values
since character references are allowed within CDATA attribute values'

> The &amp; is unacceptable as the microbrowser interpreting the
> resultant HTML will not recognize the entity.

This microbrowser does not implement HTML very well at all, then. If it
doesn't purport to support HTML's character set (the full Unicode /
ISO/IEC 10646-1 / UCS), then I would hope it would at least recognize the
SGML entities for the U-00000000 to U-000000FF character range, so that
ISO-8859-1 encoded documents could be handled.

> MSXML parser.  The version of the
> parser in use also does not support <xsl:text> or <xsl:copy-of>.  

This means disable-output-escaping won't work either, which is what you
would need. It doesn't matter what is in the stylesheet; what matters is
what goes into the result tree. '&' will be in the result tree whether
you use &amp; or &#38; or <![CDATA[&]]>. Serialization of the result tree
via the html output method is what causes the &amp; to be output, and
there's nothing wrong with that.

Sorry to not be of much help, but it sounds like the real problem is your
microbrowser, whatever that may be.

   - 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

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.