This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Retaining '&' after transforming 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 "&" (ASCII decimal 38) instead of "&" to avoid
confusion with the beginning of a character reference (entity reference
open delimiter). Authors should also use "&" in attribute values
since character references are allowed within CDATA attribute values'

> The & 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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]