Lists Home |
Date Index |
David Megginson wrote:
> On Tue, 28 Dec 2004 15:03:32 -0800, Nathan Young <email@example.com> wrote:
>>I'm going to ask the following question: Is there a good templating
>>language that can be used to build a high demand website from a collection
>>of XML documents?
> You can try JSP (Java Server Pages). There is an alternative,
> XML-conformant syntax that works starting with version 1.1 or 1.2, and
> they allow for live content in the pages. Unfortunately, it's a
> Java-only solution. Recent versions of Tomcat support the XML JSP
> syntax, and at least some standard tagsets (like JSTL) work with it.
If using JSP, you will probably want to use version 2.0 if you can
(Tomcat 5+, Resin 3+). This allows an Expression Lanuguage (EL) where
you can do:
as opposed to:
Annoyingly, most (all?) of frameworks/taglibs encourage something like:
<input type="submit" value="<tl:i18n key="global.submit"/>"/>
Another problem with JSP and its XML syntax is that containers implement
it differently in small, but annoying ways. An example of a difference
is creating an XHTML BR element (outputting contentType=text/xml).
Tomcat will give you <br/>, but Resin will give you <br></br> which is a
problem in IE.
And hardly anyone creates well-formed JSPs. I only do it when I (our
CMS) generate them using XSL. If I am writing a JSP by hand I don't
create a well-formed JSP XML.
> All the best,