cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Hunsberger <peter.hunsber...@gmail.com>
Subject Re: xml languages
Date Thu, 20 Jan 2005 20:29:24 GMT
On Thu, 20 Jan 2005 20:58:51 +0100, Daniel Fagerstrom
<danielf@nada.kth.se> wrote:

<snip>existing generator/transformer approaches</snip>

> >
> > What many people seem to want is a template language other than XSLT.
> > Personally, I agree that that seems to be re-inventing the wheel, but
> > open source communities seem to like constant mutant evolution...
> 
> The problem with using XSLT as template language is that it is hard to
> get pull access to Java beans. You can of course serialize your Java
> object to SAX with e.g. Castor or Betwixt in a generator or a source.
> But that soon becomes expensive if you just want to access a little data
> from a large Java object.

If you're working with a legacy system I can see this.  If you're
starting from scratch I think this shouldn't be a real issue: don't
write large Java objects or make sure that they are used in their
entirety.

For us, there's a pretty close mapping between the database layer and
what we want to see as raw XML. Our approach, is basically

    EJB -> proxy -> datasource -> generator -> XSLT

where the datasource is looked up using a factory pattern against the
database for a generic generator.  The datasource handles the
conversion of the data classes handed off from the EJB layer to XML
but all of our beans are designed from the get go to map to the front
end requirements.

<snip>lazy DOM adapter approach</snip>

-- 
Peter Hunsberger

Mime
View raw message