ok guys that was amazing thanks a lot, hope fully one last thing
i need to do a search (as u might have realized) on the name and address and
other fields.
Im firstly storing the result on each field seperately in a variable then i
need need to combine them again into one sorted node-list and display them
i've got
<xsl:for-each select="$withname">
<xsl:if test="position() <= $recordsPerPage * number($pageNumber) and
position() >= $recordsPerPage * number(($pageNumber)-1)">
<xsl:apply-templates select="."/>
</xsl:if>
</xsl:for-each>
<xsl:for-each select="$withaddress">
<xsl:if test="position() <= $recordsPerPage * number($pageNumber) and
position() >= $recordsPerPage * number(($pageNumber)-1)">
<xsl:apply-templates select="."/>
</xsl:if>
</xsl:for-each>
...
how can i combine them into one, always keeping them sorted?
thanks
----- Original Message -----
From: "Anton Triest" <anton(_at_)cking(_dot_)be>
To: <xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com>
Sent: Friday, October 15, 2004 9:55 AM
Subject: Re: [xsl] xsl:variable and node list
Jarno(_dot_)Elovirta(_at_)nokia(_dot_)com wrote:
But, if you just want a set, then
<xsl:copy-of
select="tblMIMCompanies[contains(translate(@building,$upperCase,$lowerCase),
translate($address,$upperCase,$lowerCase))
and
contains(translate(@number,$upperCase,$lowerCase),translate($address,$upperC
ase,$lowerCase))
and
contains(translate(@street,$upperCase,$lowerCase),translate($address,$upperC
ase,$lowerCase))
and
contains(translate(@town,$upperCase,$lowerCase),translate($address,$upperCas
e,$lowerCase))
and
contains(translate(@postcode,$upperCase,$lowerCase),translate($address,$uppe
rCase,$lowerCase))
and
contains(translate(@country,$upperCase,$lowerCase),translate($address,$upper
Case,$lowerCase))
and
contains(translate(@address,$upperCase,$lowerCase),translate($address,$upper
Case,$lowerCase))]"/>
Jarno,
shouldn't that be 'or' instead of 'and'?
Also, if you can be sure there are no other attributes that might
contain $address, you can do this:
<xsl:variable name="withaddress"
select="tblMIMCompanies[contains(translate(@*,$upperCase,$lowerCase),transla
te($address,$upperCase,$lowerCase))]"/>
(that would include all elements where *any* attribute contains $address)
Anton
--+------------------------------------------------------------------
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>
--+--