[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

Re: [xsl] parameters in XSLT 2.0


Subject: Re: [xsl] parameters in XSLT 2.0
From: David Carlisle <davidc@xxxxxxxxx>
Date: Thu, 9 Jun 2005 09:43:50 +0100

  I didn't know about sequences when I wrote it originally, and am not  
  sure even now if I can do this:

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

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.

David

________________________________________________________________________
This e-mail has been scanned for all viruses by Star. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
________________________________________________________________________


Current Thread