>From: Craig McClanahan <[EMAIL PROTECTED]> 
>
> On 1/20/06, Gary VanMatre wrote: 
> > 
> For a general purpose solution, one suggested improvement would be to have 
> the imposter ResponseWriter give you back a DOM of the emitted output, 
> rather than a String. It would be much easier to perform surgery on such a 
> DOM, then pretty print it to the real output stream, than to do all the 
> concatenation it takes to deal with the string representation. 
> Interestingly, this is exactly what tools like Creator do at design time ... 
> the page designer provides a ResponseWriter implementation that creates a 
> DOM just like a browser would, and then interprets the HTML to render what a 
> browser would render. In our case, we wouldn't have to worry about the 
> visual rendering part (phew :-). We'd just want to provide a way to hook in 
> transformations on the underlying DOM in some general purpose manner. 
> 
> Then, the workflow of the wrapping renderer would be: 
> * Temporarily replace the response writer provided by the JSF implementation 
> with one that creates a DOM 
> * Call the rendering methods on the real renderer 
> * Restore the previous response writer (so that the rest of 
> the components on the page are rendered normally) 
> * Provide API to access the resulting DOM 
> * Provide a mechanism to specify zero or more transformations to be 
> performed on the DOM 


Are you thinking common chains or more XSLT for the transformations?  
Maybe we could use the chains config instead of building yet another?


> * Provide a mechanism to "pretty print" the transformed DOM 
> to the underlying writer. 
> 
> 
> Craig 
> 

Gary

Reply via email to