[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

Re: [xsl] XQuery basics


Subject: Re: [xsl] XQuery basics
From: Eliot Kimber <ekimber@xxxxxxxxxxxx>
Date: Thu, 05 Jun 2008 13:55:57 -0500

On 6/4/08 1:55 PM, "Wendell Piez" <wapiez@xxxxxxxxxxxxxxxx> wrote:

> Rob,
> 
> At 01:35 PM 6/4/2008, you wrote:
>> If you use a small main Source XML with the minimum necessary
>> instructions for a transform, then you can bring in the bulk the
>> required XML through the document function (maybe with a URIResolver
>> that uses XQuery, but...)
> 
> Isn't this effectively the same thing?
> 
>> Don't the XML databases work best with many small documents rather than
>> one or a few very large documents?
> 
> I should think that depends on the database. In any case, I didn't
> intend to suggest that the classic architecture would become
> obsolete, but merely to agree that Andrew was onto something that
> could be very useful. For large-scale queries over aggregated data,
> the classic mapping of single document to single result via a single
> transform may not serve so well. This is where XQuery comes in. But
> XQuery alone is a blunt instrument for final transformations for
> rendering, which you are also likely to want.

This is exactly how we've architected the RSuite CMS: XQuery is used to find
things in the repository and XSLT is used to render the things found as
needed (e.g., HTML preview, preparation for export, whatever). I would not
want to use XQuery alone to implement a to-HTML transform but you need
XQuery to do the initial finding.

Of course, if I could load XQuery modules in an XSLT context and then use
the functions defined in those modules from XPath expressions used in my
XSLT transform that could be very handy. But it's also simple enough to
pipeline that sort of thing.

Also, note that XQuery provides no defined way to create result documents
(no equivalent of XSLT 2 xsl:result-document), so that severely limits the
types of processes you can implement with unextended XQuery.

Cheers,

Eliot

-- 
Eliot Kimber
Senior Solutions Architect
"Bringing Strategy, Content, and Technology Together"
Main: 610.631.6770
www.reallysi.com
www.rsuitecms.com


Current Thread
Keywords