..//image-size[1]
expands to
parent::node()/descendant-or-self::node()/child::image-size[position() = 1]
…which might result in a sequence of more than one element.
But it might be good to learn
normalize-space(../descendant::image-size[1])
in case you're ever running under XSLT 2.0 ...
... at least as long as you agree that a little paranoia never hurt ...
Wendell,
I don’t see this as paranoia, because such stuff happens! Do you agree that
another option to force the resulting sequence to have only one element would be
normalize-space((..//image-size)[1])
But I agree that the use of descendant:: is much clearer, especially to people
who (have to) read this bit of code later.
- Michael
--
DOCUFY GmbH
Michael Müller-Hillebrand | Senior Consultant
www.docufy.de
--~------------------------------------------------------------------
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>
--~--