Re: [xsl] XQuery basics

Subject: Re: [xsl] XQuery basics
From: Robert Koberg <rob@xxxxxxxxxx>
Date: Fri, 06 Jun 2008 09:47:53 -0400
On Fri, 2008-06-06 at 14:30 +0100, Andrew Welch wrote:
> 2008/6/6 Robert Koberg <rob@xxxxxxxxxx>:
> > I was kind of joking with Andrew (perhaps my smiley was not enough to
> > indicate that). Andrew wants a way to use XSL files like some folk use
> > JSP or PHP (or in the case of eXist and others, XQuery). I don't think
> > it is a good idea from a memory (as Michael Kay reaffirmed in his post
> > on this thread) and functionality standpoint.
> 
> How isn't it a good idea from a functionality point of view... what
> language is better than XSLT at creating markup?

Nothing is better at generating markup. But XSL does not have the
functionality built in to be like JSP/PHP.

> 
> Standalone schema-aware transforms, generating strict xhtml by
> transforming xml returned from various queries (where the xslt, xml,
> and xquery are all stored in the same database) could well be the most
> common use of 2.0 in the future.
> 
> I hope it is, anyway.
> 

Personally, I prefer to pregenerate the page as much as possible. In
some cases, like static XHTML, that means all the way to the final
result the user would see. In other cases, like a page that will be
dynamic at runtime, I prefer to generate out to (my current favorite)
JSP 2.0 XML syntax with JSTL. You fill in as much as possible before you
put it in a runtime environment with XML/XSL and sure, XQuery. So the
markup is already generated and you just fill in what is could not be
predetermined, which for me is usually data stored in a relational
database. It just seems like a better use of resources to me.

I don't want to stop you from doing what you want to do, just arguing :)

best,
-Rob

Current Thread