Re: [xsl] parameters in XSLT 2.0

Subject: Re: [xsl] parameters in XSLT 2.0
From: Bruce D'Arcus <bdarcus@xxxxxxxxx>
Date: Thu, 9 Jun 2005 09:42:30 -0400
On Jun 9, 2005, at 4:43 AM, David Carlisle wrote:

You don't want to do that as you'll get a type error as doc() doesn't
return element nodes. Also it's unnecessarily verbose as you don't need
an xsLsequence you can just use select on the xsl:variable

 <xsl:variable name="bibrecord"
  select="doc(concat(&quot;http://localhost:8080/exist/servlet/db/mods?
  &quot;,

But if you only use this variable in one place, as input to your sorting
function you don't need a variable at all, you can just inline teh
expression.

Somewhere I need to configure the query, because I basically have three different modes:


	-	flatfile, where the data is in a local xml file and I just use xpath
	-	exist-xmldb, where data is on a server, and I access it with xquery
	-	sru, as above, but with another query language

I suppose I could just use a function to build the query, so that I end up with something like ...

<xsl:variable name="bib:data" select="doc(bib:get_docs(.))" as="element()+"/>

... ??

Bruce

Current Thread