xsl-list
[Top] [All Lists]

Re: parameters in XSLT 2.0

2005-06-09 06:42:30

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


--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--



<Prev in Thread] Current Thread [Next in Thread>