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

Ken Paulsen Ken.Paulsen at Sun.COM
Fri Dec 11 18:28:52 EST 2009


I'm sure this is already known by most of you, but a work-a-round is to 
wrap the outer-most content that you want sent to the browser in a 
<ui:composition> tag.  Not the cleanest solution, but it does the trick:

<?xml junk...>

..
<ui:composition>
    Real content here
</ui:composition>
..

+1 to making this configurable option.

Ken

Dan Allen wrote:
> Max (Oracle) brought up a critical point at JSF Summit (and earlier in 
> private discussions). Facelets is passing through the XML declaration 
> in a template to the browser. This is problematic for certain 
> browsers, to the point that it can change the rendering behavior of 
> the browser. There needs to be a way to suppress this. A stopgap 
> solution is to introduce a context param. A more long term approach is 
> to add an attribute to f:view that indicates whether the XML 
> declaration should be sent to the client (you may want it for an atom 
> feed for example).
>
> I'll let Andy chime in on Max's behalf for follow up, since he has 
> some use cases he can cite and perhaps further suggestion.
>
> -Dan
>
> -- 
> Dan Allen
> Senior Software Engineer, Red Hat | Author of Seam in Action
> Registered Linux User #231597
>
> http://mojavelinux.com
> http://mojavelinux.com/seaminaction
> http://www.google.com/profiles/dan.j.allen




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