[xsl] multi-valued non-unique keys with use parameter using tokens?

Subject: [xsl] multi-valued non-unique keys with use parameter using tokens?
From: Xiaocun Xu <xiaocunxu@xxxxxxxxx>
Date: Tue, 23 Sep 2003 14:51:27 -0700 (PDT)

  How to build multi-valued non-unique keys with key
built with tokens?
  My input XML looks like:
  <row row="15">
      <cell column="1">supplier</cell>
      <cell column="2">s1</cell>
      <cell column="3">item</cell>
      <cell column="4">item1|item2</cell>
      <cell column="5">s1_AM1</cell>
      <cell column="6">accepted</cell>
  <row row="16">
      <cell column="1">supplier</cell>
      <cell column="2">s2</cell>
      <cell column="3">item</cell>
      <cell column="4">item1|item3|item4</cell>
      <cell column="5">s2_AM1</cell>
      <cell column="6">accepted</cell>
  I want to group these based on items, so that when I
process each of the items later, I can retrieve the
appropriate rows to process at that time.
  For example, key("itemInvites", "item1") should
return both above rows and key("itemInvites", "item3")
should only return row 16.
  I know that if I can change the input XML, replace
pipe delimited values with sub-elements:
  	<cell column="4">
  I can use the following xsk:key to build what I
  <xsl:key name="itemInvites"
match="//row[cell[@column=3] = 'item']"
  But is there a way to build the "use" parameter to
use tokens returned by str:tokenize template such as
<xsl:variable name="InvitedSuppliers">
  <xsl:call-template name="str:tokenize">
    <xsl:with-param name="string" select="."/>
    <xsl:with-param name="delimiters" select="'|'"/>
Xiaocun Xu

Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software

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

Current Thread