[jsr-314-open] [xmldecl-696] suppressing XML declaration for MR1

Jim Driscoll Jim.Driscoll at Sun.COM
Fri Dec 11 19:18:23 EST 2009



On 12/11/09 3:45 PM, Dan Allen wrote:
> Oh, I forgot one use case. Max was saying that they need to use CDATA in
> their templates, but the CDATA should not be sent to the browser. So
> there is the same problem with CDATA as with the XML declaration.

I commented directly on the bug, but here's my thoughts.

The CDATA case is actually considerably harder than the XML declaration.

Typically, you either want to serve the XML declaration application 
wide, or you don't.  Generally, because of IE, you don't.  I would argue 
that we should make that the default case.  If IE ever gets it's act 
together, or folks start using XML v2.0, then we can revisit the 
decision - that should last us for at least 5 years, anyway.

With CDATA, there will be times when you want to serve CDATA blocks to 
the browser (most notably, to wrap scripts).

Apparently, there will also be times when you don't (though the example 
of a custom script tag is not compelling to me - we handle that in 
Mojarra's implementation without incident, though it's a painful block 
of code to read).

There will therefore be times when you both want to serve CDATA blocks, 
and when you do not, possibly in the same page.

Yuk.

Jim




More information about the jsr-314-open-mirror mailing list