Re: <script> for non-script content

Philip Taylor wrote:
> 
> http://quickstarts.asp.net/Futures/ajax/doc/components.aspx uses
>   <script type="text/xml-script">
> for embedding XML which gets interpreted by some other JavaScript code. 
> No UA could ever process that XML natively like a proper script, since 
> it would conflict with the JS's handling of the XML.
> 
> http://people.mozilla.com/~vladimir/canvas3d/examples/simple/simple20.html 
> uses
>   <script ... type="x-shader/x-fragment">
> for embedding OpenGL shader programs. It would never make sense for a 
> browser to execute the code directly, since it only works in the context 
> of a complete OpenGL environment.
> 
> http://lists.w3.org/Archives/Public/public-html/2007Dec/0238.html says 
> "we use the <script> tag with a Backbase MIME type" as a container for XML.
> 
> But http://www.w3.org/html/wg/html5/#script just says "The script 
> element allows authors to include dynamic script in their documents", 
> and does not acknowledge the use of <script> as a non-executable 
> container for text which has an associated MIME type and can be read by 
> other scripts.

FYI: Silverlight uses 'text/xaml'.  And the content is well-formed XML.

- Sam Ruby

Received on Saturday, 22 December 2007 00:24:56 UTC