xsl-list
[Top] [All Lists]

Re: sorting information from multiple files

2004-01-19 07:00:04
This solution doesnt appear to work with xalan? (namespace xmlns:xx="http://exslt.org/common";) however, it does work with xmlns:xx="urn:schemas-microsoft-com:xslt" are there any small tweaks that i have to do in order to make it work?
cheers
james

From: David Carlisle <davidc(_at_)nag(_dot_)co(_dot_)uk>
Reply-To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: Re: [xsl] sorting information from multiple files
Date: Thu, 15 Jan 2004 16:23:03 GMT

document() will accept a node set rather than a string so if it wasn't
for the " " "-" translation you could replace

<xsl:for-each select="child::category">
<xsl:variable name="catnamemod" select="translate(name,' ','_')" />
<xsl:for-each
select="document($nsindex/*[name()=$catnamemod])/root/child::*">
<xsl:if test="@topfive=true()">

by



<xsl:for-each
select="document($nsindex/*[name()=current()/category/name])/root/child::*[(_at_)topfive]">


Is it not possible to arrange that your nsindex variable has the right names
(by doing the translation at the point you construct that variable?

it's inconvenient to do the translation later as that is a string based
function which stops you using the implicit existential quantification
over a node set that you get with =.

--
http://www.dcarlisle.demon.co.uk/matthew

________________________________________________________________________
This e-mail has been scanned for all viruses by Star Internet. 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
________________________________________________________________________

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


_________________________________________________________________
Sign-up for a FREE BT Broadband connection today! http://www.msn.co.uk/specials/btbroadband


XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list