xsl-list
[Top] [All Lists]

[xsl] multiple values for the key

2008-07-31 09:29:02
How do I use multiple key values?

Declaration:
<xsl:key name="keyname" match="subroot" use="ccc"/>

During the usage, I want to specify multiple values:

<xsl:variable name="keyname" select="key('keyname', '11' or '22')"/> ==>  Here 
I want to use multiple values 11 and 22.

For the following xml, result should be:
aaaaa bbbbb ccccc ddddd ==> note that both values of  ccc= '22' and ccc= '11' 


<?xml version="1.0" encoding="UTF-8"?>
<root>    
    <subroot id="11111">
        <ccc>11</ccc> ==> needs to be picked
        <ddd>2005-08-26</ddd>
        <eee>aaaaa</eee>
    </subroot>
    <subroot id="11111">
        <ccc>22</ccc> ==> needs to be picked
        <ddd>2005-08-26</ddd>
        <eee>bbbbb</eee>
    </subroot>
    <subroot id="11111">
        <ccc>11</ccc>
        <ddd>2005-08-26</ddd>
        <eee>ccccc</eee>
    </subroot>
    <subroot id="11111">
        <ccc>11</ccc>
        <ddd>2005-08-26</ddd>
        <eee>ddddd</eee>
    </subroot>    
    <subroot id="11111">
        <ccc>33</ccc>
        <ddd>2005-08-26</ddd>
        <eee>eeeee</eee>
    </subroot>     
</root> 

Thank you for your help.


      

--~------------------------------------------------------------------
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>
--~--

<Prev in Thread] Current Thread [Next in Thread>