| Subject: RE: [xsl] A more complicated Muenchian Method exercise From: "Greg Johnson" <gjohnson@xxxxxxxxxxxx> Date: Mon, 21 Jul 2003 11:27:43 -0400 | 
There is a slight weakness to this approach: I am unable to do an alphabetic
sort of the entire set, because although I may be able to build the key on
the entire "Trading Partner" set, I am subsequently forced to test for
membership in that set in two steps:
<!-- Sender -->
<xsl:for-each select="DTSEnvelopes[count(. |
key('DTSEnvelopes-by-arrived-tp',concat(substring-before(arrived, 'T'), ' ',
Sender/tpid) )[1]) = 1]" >...</xsl:for-each>
and then
<!-- Recipient -->
<xsl:for-each select="DTSEnvelopes[count(. |
key('DTSEnvelopes-by-arrived-tp',concat(substring-before(arrived, 'T'), ' ',
Sender/Recipient/tpid) )[1]) = 1]" >...</xsl:for-each>
because the Method uses the concat() function to test membership as well as
building the key.  How do I combine the above into one looping block?
Any suggestions?
-----Original Message-----
From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx
[mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx]On Behalf Of David
Carlisle
Sent: Monday, July 21, 2003 10:10 AM
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: Re: [xsl] A more complicated Muenchian Method exercise
  but the conversion of the OR'd set to a string does not work.  It seems to
  ignore the rec_id, and I only get the sender set.
Yes, it is a general feature of Xpath1 string functions, that if you
give them a node set and theey want a string, they take teh firat node
of the node set and take its string value, and junk everything else.
I think you just want two xsl:key statements:
<xsl:key name="key2_name", match="header" use="concat(arrive_date, ' ',
sender/sen_id )"/>
<xsl:key name="key2_name", match="header" use="concat(arrive_date, '
',sender/recipient/rec_id )"/>
multiple xsl:key statements with the same name form a combined key.
David
________________________________________________________________________
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
 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
| Current Thread | 
|---|
| 
 | 
| <- Previous | Index | Next -> | 
|---|---|---|
| RE: [xsl] A more complicated Muench, Greg Johnson | Thread | RE: [xsl] A more complicated Muench, Américo Albuquerque | 
| [xsl] Removing empty element tags, jeff . day | Date | RE: [xsl] A more complicated Muench, Américo Albuquerque | 
| Month |