Re: HTML output method, <script> element

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 UTC