[xquery-talk] cross implementation XQuery

Michael Kay mike at saxonica.com
Wed Sep 10 09:59:02 PDT 2008

Personally, I don't think you should try to write entire applications in
XQuery. You should use XQuery for tasks that it is good at, and then
integrate the application using some other level of technology, for example
a pipeline processor. This way I think there is far less need to do anything
platform-dependent in the XQuery logic, and you end up with XQuery code that
is much more versatile and reusable.

Perhaps the main reason for this view is the absence of any dynamic despatch
mechanism in XQuery. This makes it very hard to write XQuery code that is
capable of doing more than one job, or of doing the same job in different

I've seen it done by compile-time manipulation of "import module" in the way
you suggest, but it's no fun.

Michael Kay

> -----Original Message-----
> From: talk-bounces at x-query.com 
> [mailto:talk-bounces at x-query.com] On Behalf Of Robert Koberg
> Sent: 10 September 2008 01:59
> To: talk at x-query.com
> Subject: [xquery-talk] cross implementation XQuery
> Hi,
> How do you write XQuery in a cross processor/implementation 
> way? It seems (to me) that you need extension functions. For 
> example, you want to write a XQuery based webapp that might 
> be be used by 2 or more processors/XMLDBs.
> Do you keep webapp logic out of your XQuery?
> Is there a cross processor equivalent to XSL's function-available()?
> Do you create generic functions mapping to various impl 
> specific functions, place those in impl specific import 
> modules, and use a custom URIResolver to resolve imports 
> based on the impl? Do implementations have a standard way to 
> assign these resolvers?
> Other ways?
> best,
> -Rob
> _______________________________________________
> talk at x-query.com
> http://x-query.com/mailman/listinfo/talk

More information about the talk mailing list