Subject: RE: an Xpath question - $tag/$subtag
From: "Michael Kay" <mhk@xxxxxxxxx>
Date: Tue, 8 Jul 2003 14:26:04 +0100
|
>
> $v1/$v2 does depend on $v1 being empty (or not) doesn't it?
> Isn't it if empty($v1) then $v2 else ()
>
> (Just in case you were planning to optimise it away:-)
>
You are almost right. It also forces the nodes in $v2 to be deduplicated
and in document order (and forces them to be nodes!). And the empty()
condition is the other way around. So I think it is actually
if (empty($v1)) then () else $v2/.
Michael Kay
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|