Re: XPath's role (Was: Re: [xsl] Re: . in for)

Subject: Re: XPath's role (Was: Re: [xsl] Re: . in for)
From: Jeni Tennison <jeni@xxxxxxxxxxxxxxxx>
Date: Sun, 6 Jan 2002 16:49:46 +0000
Kevin Jones wrote:
> I tend to agree that the justification for the flow control
> additions, 'for' and to a lesser extent 'if', is somewhat suspect in
> an expression languages. Perhaps there is an issue here about the
> pre-concieved expectations of each languages role. XQuery appears to
> me to be just a superset of XPath in which case you could replace
> XSLT+XPath with XSLT+XQuery, i.e.
>
>         XSLT uses XQuery implements XPath
>         XPointer uses XPath
>         XForms uses XPath
>
> Although I doubt if this is at all practical today it would resolve
> the issue of the positioning of the three languages. XSLT is
> particularly strong in output generation but weak in non-hierarcical
> queries. Using XQuery within XSLT could change this and avoid the
> need for duplication of facilities between XSLT and XQuery, e.g. is
> xsl:for-each usefull when you can use XQuery FLWR instead? The
> alternative, as you point out, is query functionality creep in
> XPath/XSLT so that it can perform better on complex data sets.

As I understand it, XQuery is designed to be used on its own, not
embedded in any other language, and is meant to handle all types of
queries and construct new nodes and so on. If XQuery were embedded in
XSLT, I think that the only contribution XSLT would have would be a
wrapper xsl:stylesheet element (and even that will be discarded, since
(as discussed on XML-Dev) XQuery is really not designed for being
embedded in an XML document)!

But I think I'm missing a few things here:

  1. An example that demonstrates XSLT+XPaths's inability to cope
     with non-hierarchical queries.

  2. An argument that demonstrates that XSLT+XPath is the appropriate
     tool for this non-hierarchical query example, rather than XQuery.

  3. An argument that demonstrates that it is XSLT+XPath that should
     be altered to be able to manage this query example, rather than
     XQuery being improved to make it the appropriate tool for the
     job.

Anyone who'd provide me with these would be doing me a huge favour.
     
Cheers,

Jeni

---
Jeni Tennison
http://www.jenitennison.com/


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread