xsl-list
[Top] [All Lists]

sorting question

2003-05-27 00:37:28

Hi All,

I have the followins XML:

<sd:Services>
        <sd:Service>
                <sd:ServiceDescription ServiceName='X'/>
                <sd:ServiceID>453</sd:ServiceID>
        </sd:Service>
        <sd:Service>
                <sd:ServiceDescription ServiceName='Y'/>
                <sd:ServiceID>451</sd:ServiceID>
        </sd:Service>

        .
        .
        .

        <sd:Service>
                <sd:ServiceDescription ServiceName='Y'/>
                <sd:ServiceID>452</sd:ServiceID>
        </sd:Service>
</sd:Services>

  I want to process all 'sd:Service' nodes that have 
sd:ServiceDescription/@ServiceName='Y', 
except the one with min 'sd:ServiceID'.

  What is the condition returning the node-set I want ?
(I have done it by " xsl:sort + xsl:if test='position() > 1'>  ",
but I would like more elegant solution -> only one xsl:for-each)

Thanks.

                best regards, margarit nickolov.


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



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