Alessandro Bologna wrote:
Thanks Rob!

Any other suggestions from the list?
Alessandro





On 9/12/07, Robert Koberg <[EMAIL PROTECTED]> wrote:
On Wed, 2007-09-12 at 13:25 -0400, Alessandro Bologna wrote:

In any case, what I am really interested is what are the best practices
using Velocity to render complex, quite unstructured,  namespace
qualified XML contents.

Velocity is simply not a capable tool in that application space. The work has never been put into it to make it a serious option for XML processing. Not only is the XML support lacking (you noticed, I guess, that DVSL has no support for XML namespaces, just one example of how half baked it is...) but the Velocity engine has a lot of limitations wrt scoping and recursion that you would likely butt up against in any XML processing task of a certain level of complexity.

My (somewhat biased) advice is to look at FreeMarker. Here is a link to the section of the FreeMarker documentation that covers using it as an XML processing tool:

http://freemarker.org/docs/xgui.html

In particular, the subsection on declarative XML processing would probably be of interest:

http://freemarker.org/docs/xgui_declarative.html

Jonathan Revusky
--
lead developer, FreeMarker project, http://freemarker.org/


Your going to run into problems with DVSL/Anakia if your content is
unstructured

What was your approach?
XSL is the tool for the job.

best,
-Rob

Thanks in advance for your responses.

Alessandro








On 9/11/07, Alessandro Bologna <[EMAIL PROTECTED]> wrote:
Hi,

my apologies in advance if this is an FAQ, but I couldn't find an
answer
in the documentation, so I decided to write to the list.

In the CMS project I am working on, we are considering using velocity
to
generate "pre-cooked" template based web pages, using XML as data
source.
In other words, the data to be published is essentially XML, with
elements
such as <article>, <headline>, <deck>, <body> etc, with some elements
containing quite unstructured XHTML (i.e variable number of <p/>,
<div/>
etc), and other containing refences to other elements via id/refid.

This data has to be processed to generate static HMTL files that are
then
pushed to Apache for serving them.

Question #1
It seems that there are two main options: using XMLEasyBean or/and
DVSL.
Are there any other alternatives?

Question #2
In both cases, it seems that XML namespaces are not supported (I am
getting an empty output if my source contains namespace qualified XML
elements), am I doing something wrong?

Question #3
Any idea of performances, compared to say, XSLT?

Thanks
Alessandro Bologna



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to