Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: encoding of script tags in html

From: Peter Flynn <peter.nosp@-.--------.-->
To: NULL
Date: 6/2/2008 9:33:00 PM

Martin Honnen wrote:
> Andy Fish wrote:
> 
>> can someone point me at part of the w3c specification that states how
>> script tags are parsed differently to other tags in HTML.
[...]
>> interestingly i have also discovered that this:
>>
>> <script>if (3<5);</script>
>>
>> IS valid html and seems even to be valid XHTML even though it is not
>> valid XML
> 
> That snippet is not well-formed so it can't be valid XML or XHTML as it
> is not even XML.

It is, however, valid HTML (SGML): the < sign is valid unescaped in
CDATA declared content (and would be valid elsewhere, as the digit
following it cannot be taken to be the beginning of an element type
name).

> wow - what a minefield this has turned out to be !!

Don't guess ("seems to be..."). Install a standalone validating parser
that handles both SGML and XML (eg onsgmls, part of SP), and copies of
the relevant DTDs; or a schema validator and copies of the schemas,
and test any files you create for validity. A good XML editor will do
this for you anyway.

///Peter
-- 
XML FAQ: http://xml.silmaril.ie/


transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent