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

Re: HTML output method: output a & character?

Subject: Re: HTML output method: output a & character?
From: "Nikita Ogievetsky" <nogievet@xxxxxxxxxxxx>
Date: Mon, 25 Oct 1999 09:40:24 +0100
html method
David Carlisle wrote:
> Kai Großjohann wrote
>> into HTML output of the following form:
> >     <a href="/script.cgi?action=search&term=foo">...</a>
> This is not well formed XML. You have_ to use &amp;

html method does not output valid XML.
Here are 3 case when invalidation forced no matter what you want:
<WD>
...The html output method should not perform escaping for the content of the
script and style elements...
...
...The html output method should not escape a & character occurring in an
attribute value immediately followed by a { character ...
</WD>
However
<WD>
...it is an error to disable output escaping for an xsl:value-of or xsl:text
element that is used to generate the string-value of a comment, processing
instruction or attribute node...
</WD>

> &amp; should anyway work with your html browser.
This is true but it does not apply to onEvents attributes.
I do not like when it is decided beforehand what should be escaped.
So I rather use XSLT parser (XT) to convert to a valid XML and then use
regular expressions to un-escape where I need.

The other funny thing about html method is that XSLT parser generates a semi
valid document that it can not read back.
Seems to me that if there are fancy output methods there are should
corresponding fancy input methods.
(i.e. XSLT parser should be able to read HTML document if it was produced by
another conformant XSLT parser.)


Nikita Ogievetsky
http://www.cogx.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.