|
From: Colin S. <col...@ex...> - 2005-03-18 22:58:48
|
I agree. Personally, I think XMLC is somewhat of a dying or dead
technology... I would rather not add it to the core now, and perhaps for
1.3 when we move to more modular structure, we might revisit it as an
optional download...
Colin
Juergen Hoeller wrote:
>We could put that 5-line sample code into the web view chapter of the
>reference docs, and probably also on the Wiki... I think that this is all
>people need to get started with XMLC as view technology for Spring Web MVC.
>And we don't need to ship and compile against 1.8 MB of additional
>third-party jars then :-)
>
>Juergen
>
>
>-----Original Message-----
>From: spr...@li...
>[mailto:spr...@li...]On Behalf
>Of Rob Harrop
>Sent: Friday, March 18, 2005 11:44 PM
>To: spr...@li...
>Subject: Re: [Springframework-developer] XMLC Support
>
>
>Fine with me - I only spent a few minutes moving across Rod's original
>code. There have been a few requests for this functionality though, so
>we should probably mention this on the user list and on the forum.
>
>Rob
>
>Juergen Hoeller wrote:
>
>
>
>>Guys,
>>
>>Do we really want to ship this out-of-the-box in Spring core? This is
>>
>>
>nearly
>
>
>>1.8 MB of additional third-party jars, half of it cause by the great XMLC
>>decision to depend on a repackaged Xerces version...
>>
>>If I remember correctly, that was also the original rationale for *not*
>>including it in Spring in the first place. I think that reason is still
>>valid, in particular due to the fact that the AbstractXmlcView base class
>>
>>
>is
>
>
>>so extremely thin.
>>
>>BTW, we don't need an XmlcLoaderServlet or XmlcLoaderListener.
>>XMLCContext.getContext(servletContext) creates a new XMLCContext on first
>>access but then returns the existing instance. No need to initialize this
>>
>>
>in
>
>
>>a separate servlet or listener!
>>
>>Effectively, a custom View implementation that uses XMLC could look as
>>follows - without any XMLC-specific base class shipped in Spring:
>>
>>public abstract class MyXmlcView extends AbstractView {
>>
>> protected void renderMergedOutputModel(
>> Map model, HttpServletRequest request, HttpServletResponse response)
>>throws Exception {
>>
>> this.xmlcContext = XMLCContext.getContext(getServletContext());
>> OutputOptions oo = new OutputOptions();
>>
>> XMLObject xo = // creating the XMLObject from the model
>>
>> response.setContentType(getContentType());
>> this.xmlcContext.writeDOM(request, response, oo, xo);
>> }
>>}
>>
>>Given how concise this, it seems to me that we really don't need to ship an
>>AbstractXmlcView class for this. Showing that skeleton code in the
>>
>>
>reference
>
>
>>docs or on the Wiki should be enough...
>>
>>Juergen
>>
>>
>>
>>-----Original Message-----
>>From: spr...@li...
>>[mailto:spr...@li...]On Behalf
>>Of Rob Harrop
>>Sent: Thursday, March 17, 2005 7:34 PM
>>To: spr...@li...
>>Subject: [Springframework-developer] XMLC Support
>>
>>
>>All,
>>
>>I just committed basic XMLC support to CVS. This is based heavily on the
>>work Rod did in his original book.
>>
>>Let me have your thoughts.
>>
>>Rob
>>
>>
>>
|