This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: XSLT 1.1 comments (node equality)
David Carlisle wrote:
>
> [trying to alter the subject headings, to split the thread up a bit]
>
> > how about "==" for a "same-node" operator,
> > complete with usual node-set comparison sematics?
>
> scary!
>
> will lead to user errors re = v == confusion (people already get
> confused between "and" and "&&" even though the latter isn't mentioned
> in the spec, and would be illegal XML)
True - it's appealingly compact, but we all know what they say about
terseness and XML. And I have to admit I do sometimes make the "=" v.
"==" error in ECMAScript, so I can't deny the dangers.
> Also this would require a change
> to XPath. (I suppose XPath will change one day but harder than changing
> XSLT as there is no equivalent of the version attribute to flag changes)
>
> a prefix form would be safer: same-node(a,b) although that's probably a
> bad name since a and b would be node sets, even if they were "." .
>
I can't think of a better name off-hand - it's still testing for "same
node", even within it's node-set arguments. Would it be an XPath or XSLT
function?
Francis.
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list