Re: Using Form Elements for Pages only Intended for Printing

 "Jon Hanna"
> > I was considering the "replacement" portion of the result of
> > document.write, not the requirement to be valid, no parsers replace
> > <SCRIPT> with its result, they just add to the parse tree, is this
> > defined in any standard?
>
> "HTML documents are constrained to conform to the HTML DTD both
> before and after processing any SCRIPT elements." -
> http://www.w3.org/TR/html4/interact/scripts.html#h-18.2.4

You were suggesting that the correct behaviour of a conformant parser in
encountering this

<script type="text/jim">
print('<p></p>')
</script>

is to produce just a P element in the resulting parse tree, this is not
how it's been implemented in any parser I've seen, and would conflict
with the DOM, and the simple common sense idea that removing elements
from the parse tree is wrong.  Can you give me a resource for this?  (A
script element and a P element would still be valid HTML, the SCRIPT
element is not replaced.)

Jim.

Received on Friday, 11 January 2002 07:22:16 UTC