xsl-list
[Top] [All Lists]

Re: trouble with preceding axis

2006-01-04 03:14:15
Duane Gran wrote:

Thank you.  Actually, using your example I was able to
make it work with the following:

   /root/orange/preceding-sibling::*[1]

  You're right.

--drkm


This works on my real data, but I worry a little if
this is syntax works for more complex cases.  I can't
thank the group enough for the kind pointers on XPath.

Duane

On Jan 3, 2006, at 6:43 PM, Xia Li wrote:

You might select the nearest preceding sibling like this,

        <xsl:for-each select="/root/orange/preceding-sibling::*">
            <xsl:if test="position() = last()">
                <xsl:value-of select="name(.)"/>
                 ...
            </xsl:if>
        </xsl:for-each>

Hope this is what you want.

Lisa




        

        
                
___________________________________________________________________________ 
Nouveau : téléphonez moins cher avec Yahoo! Messenger ! Découvez les tarifs 
exceptionnels pour appeler la France et l'international.
Téléchargez sur http://fr.messenger.yahoo.com

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