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

Re: HTML <script> tag

Subject: Re: HTML <script> tag
From: David Carlisle <davidc@xxxxxxxxx>
Date: Wed, 28 Aug 2002 17:39:33 +0100
html inclined
> While 1) is quicker and seems like less of a hack, what bothers me about
> this is that the resulting page will no longer have <?xml version="1.0"
> encoding="UTF-8"?> on the first line.

more importantly it will no longer be XML at all.
br will be output as <br> with no closing tag, similarly
other empty elements, & will be linearised as & not &amp; in attribute
values, etc etc.

> but what if the reader is a robot that is expecting
> to parse a valid XML document?

The xml declaration is optional in XML so <?xml ... not being there
is not a problem, but the fact that the file would not be XML would
cause the robot to die.

> Therefore, I am almost inclined to do 2) above in spite of the fact that it
> is a workaround (hack?).

It is a workaround that is required as long as you are sending XML files
to a system (IE's HTML renderer) that does not parse XML.

XSLT2 draft proposes an xhtml output method that does these hacks
automatically, along with other things required to make things work in
"legacy" browsers like putting a space before the / in <br />.

David

_____________________________________________________________________
This message has been checked for all known viruses by Star Internet
delivered through the MessageLabs Virus Scanning Service. For further
information visit http://www.star.net.uk/stats.asp or alternatively call
Star Internet for details on the Virus Scanning Service.

 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.