XSLT and XQuery: a difference of culture
22:41, 21 Nov 2001 UTC | Eric van der Vlist

Mike KayMike Kay from Software AG gave a high level comparison between XSLT and XQuery at the fourth Forum XML, where he concluded that the main differences between the two languages were differences of culture and perspective, but also that XQuery was more ambitious than XSLT and would require more complex optimizations.

After an introduction remembering some of the reasons for the success of XML and XSLT, Kay clearly highlighted that there were more similarities than differences between XSLT and XQuery:

Like SQL, XQuery and XSLT are both high-level declarative languages based on abstract data models, both standards and they are both defined in term of simple operations that can be combined (notion of closure). Unlike SQL, they deal with hierarchical data structures and the underlying data format (XML) is fully defined.

At a high level, their main differences are that while XSLT is a transformation data language with an interchange centric model, XQuery is a query language with a storage centric model. Kay sees here a cultural difference between data oriented and document oriented applications:

Two traditional worlds, one world which would traditionally have been handled by the BP department and the other world which would traditionally have been handled by the marketing department having to be brought together into a single web site, and that was as much a cultural clash as it is a technology clash.

This difference of perspectives has already led to significant differences between the two languages, such as in their relation to XPath: XSLT uses XPath as a "sublanguage" located in attributes of XML syntax, while XQuery is constructed as a superset of XPath.

Kay also predicted that because XQuery is being oriented toward large sets of XML data, complex optimizations would be required which would push XQuery implementations out of the scope of individual developers who have developed efficient open source XSLT implementations, eventually causing XSLT processors to be considered as a technology available for free. Saying that he would not feel like writing a XQuery implementation in his spare time as he has done with the XSLT Saxon processor, Kay said that there would be a better acceptance for commercial XQuery implementations optimized to run on large sets of data.

Other stories:

| See all 6 comments

Newest comments

Re: XSLT and XQuery: a difference of culture (Ignacio Vera - 11:13, 28 Nov 2001)
It is only a basic question, Why would someone want to use XQuery expressions in XSLT? Couldn't you ...
Re: XSLT and XQuery: a difference of culture (Matt MacKenzie - 05:43, 28 Nov 2001)
Wouldn't allowing XQuery inside of XSLT be a little recursive? XQuery is not just a query or tree n ...
GoXML DB 2.0 has XQuery too. (Matt MacKenzie - 05:38, 28 Nov 2001)
Re: XSLT and XQuery: a difference of culture (Eric van der Vlist - 12:38, 25 Nov 2001)
> I strongly feel that XSLT 2.0 must allow use of XQuery on equal footing with XPath.

It's a nic ...
xmlhack: developer news from the XML community

Front page | Search | Find XML jobs

Related categories