Subject: Re: [xsl] xsl:variable and node list From: "Luke Ambrogio" <luke.ambrogio@xxxxxxxxxxxx> Date: Wed, 15 Oct 2003 09:11:50 +0200 |
ok, thanks. thats good but how would i translate this now <xsl:variable name="withaddress"> <xsl:copy-of select="tblMIMCompanies[contains(translate(@building,$upperCase,$lowerCase), translate($address,$upperCase,$lowerCase))='true']"/> <xsl:copy-of select="tblMIMCompanies[contains(translate(@number,$upperCase,$lowerCase),tr anslate($address,$upperCase,$lowerCase))='true']"/> <xsl:copy-of select="tblMIMCompanies[contains(translate(@street,$upperCase,$lowerCase),tr anslate($address,$upperCase,$lowerCase))='true']"/> <xsl:copy-of select="tblMIMCompanies[contains(translate(@town,$upperCase,$lowerCase),tran slate($address,$upperCase,$lowerCase))='true']"/> <xsl:copy-of select="tblMIMCompanies[contains(translate(@postcode,$upperCase,$lowerCase), translate($address,$upperCase,$lowerCase))='true']"/> <xsl:copy-of select="tblMIMCompanies[contains(translate(@country,$upperCase,$lowerCase),t ranslate($address,$upperCase,$lowerCase))='true']"/> <xsl:copy-of select="tblMIMCompanies[contains(translate(@address,$upperCase,$lowerCase),t ranslate($address,$upperCase,$lowerCase))='true']"/> </xsl:variable> :) cheers ----- Original Message ----- From: <Jarno.Elovirta@xxxxxxxxx> To: <xsl-list@xxxxxxxxxxxxxxxxxxxxxx> Sent: Friday, October 15, 2004 9:05 AM Subject: RE: [xsl] xsl:variable and node list Hi, > i have something like this below > > <xsl:variable name="withname"> > <xsl:copy-of > select="tblMIMCompanies[contains(translate(@name,$upperCase,$l > owerCase),tran > slate($name,$upperCase,$lowerCase))'true']"/> > </xsl:variable> I.e. you're binding $withname to a Result Tree Fragment > <xsl:variable name="numnam" select="count($withname)"/> but count() expects a node-set. > but the last line is returning me an error than $withname > does not return a > nodelist, any ideas what im doing incorrect? You're trying to use a function with an argument of a wrong type. Change the definition of $withname to <xsl:variable name="withname" select="tblMIMCompanies[contains(translate(@name,$upperCase,$lowerCase),tran slate($name,$upperCase,$lowerCase))'true']"/> Cheers, Jarno - Madam Zu: August 2003 Part 1
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] xsl:variable and node lis, Jarno.Elovirta | Thread | Re: [xsl] xsl:variable and node lis, Werner, Wolfgang |
[xsl] xsl:variable and node list, Luke Ambrogio | Date | Re: [xsl] xsl:variable and node lis, Luke Ambrogio |
Month |