W3C home > Mailing lists > Public > xsl-editors@w3.org > January to March 2001

Re: HTML output method, <script> element

From: Steve Muench <smuench@us.oracle.com>
Date: Sun, 4 Feb 2001 11:23:07 -0800
Message-ID: <003601c08edf$e7729030$72164498@us.oracle.com>
To: <mhkay@iclway.co.uk>
Cc: <xsl-editors@w3.org>
Michael,

Why does (b) strike you as more useful?

Just curious. I think (a) is what you would write
if you hand-wrote a script element in an HTML page.
______________________________________________________________
Steve Muench, Lead XML Evangelist & Consulting Product Manager
BC4J & XSQL Servlet Development Teams, Oracle Rep to XSL WG
Author "Building Oracle XML Applications", O'Reilly
http://www.oreilly.com/catalog/orxmlapp/

----- Original Message ----- 
From: "Michael Kay" <mhkay@iclway.co.uk>
To: <xsl-editors@w3.org>
Sent: Friday, February 02, 2001 2:09 PM
Subject: HTML output method, <script> element


| Question arising from a user's bug report:
| 
| If you write
| 
| <xsl:output method="html"/>
| <xsl:template match="/">
| <script>
|    write("<b> if (a &lt; b) </b>");
| </script>
| </xsl:template>
| 
| should the output be (a)
| 
| <script>
|   write("<b> if (a < b) </b>")
| </script>
| 
| or (b)
| 
| <script>
|   write("<b> if (a &lt; b) </b>")
| </script>
| 
| (Saxon's output is a muddled mixture of the two and it needs to be changed
| to one or the other)
| 
| The spec says ".. should not perform escaping for the content of the script
| .. element", which I think implies (a); but (b) seems more useful.
| 
| I told the user he should really be writing it as
| 
| <xsl:template match="/">
| <script><![CDATA[
|    write("<b> if (a < b) </b>");
| ]]></script>
| </xsl:template>
| 
| but that doesn't really answer the question.
| 
| Mike Kay
| 
| 
| 
Received on Sunday, 4 February 2001 14:24:31 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 7 December 2009 10:59:52 GMT