xsl-list
[Top] [All Lists]

Re: XPATH | union operator question

2003-12-21 07:22:43


On 21.12.2003, at 14:24, Andreas L. Delmelle wrote:

Hi Marc,


Perhaps Mike Kay's answer earlier on in this thread could be the solution :

<xsl:value-of select="(thing[lang($mylang)] | thing)[last()] />

I read that, but I guess that's useful for the original problem, where you have a hierarchy, i.e. you have an outermost and an innermost node to select. In that case, the last() will make sure you get the innermost node.

In my case, the elements are on the same level so that can't be used.


either that or change your input doc to :

Unfortunately I have no control over the input docs in this particular application.


The solution proposed by Dimitre Novatchev earlier today works very well for me.






_________________________________________________________________
Marc Liyanage                                     marc(_at_)entropy(_dot_)ch
                                            http://www.entropy.ch
                                          iChat: liyanage(_at_)mac(_dot_)com

                                      Yoda I am. Grammar I can't.
_________________________________________________________________


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



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