|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: xsl:variable and node list
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@xxxxxxxx> To: <xsl-list@xxxxxxxxxxxxxxxxxxxxxx> Sent: Friday, October 15, 2004 9:55 AM Subject: Re: xsl:variable and node list > Jarno.Elovirta@xxxxxxxxx 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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Cast Your Vote
We need your help – Vote for DataDirect XML Products!
Winners and finalists announced at SOA World Conference in November. Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|







