Re: [xsl] Keys with duplicates should be simple

Subject: Re: [xsl] Keys with duplicates should be simple
From: Wendell Piez <wapiez@xxxxxxxxxxxxxxx>
Date: Fri, 31 Jan 2014 15:41:24 -0500
Ihe,

>> http://www.biglist.com/lists/lists.mulberrytech.com/xsl-list/archives/201211/msg00170.html

Indeed. You are not the only one to find 'except' to be contrary to
what you expect, in view of its natural-language usage in English.
(D*mned prepositions.)

When reading XPath, my brain more or less automatically assumes
everything is a relative path from the context node (that is, it
traverses the tree relatively until an absolute path is given), so I
mentally translate ($a except $b) as "my $a except my $b". So "my $a
except my 'blah' element children" ($a except blah) doesn't freak me
out.

In English, "breakfast except donuts" should indicate (as you remind
us in that thread) "breakfast except (its) donuts", while I read it as
"(my) breakfast except (my) donuts". Or XPath "$breakfast except
child::donut". (It turns out that being mentally able to translate
abbreviated XPath into long XPath is also a useful skill.)

Or, you can take "except" in its sense not as a preposition but a
transitive verb, such as "he excepted himself on the grounds that he
had already said too much".

Cheers, Wendell

-- 
Wendell Piez | http://www.wendellpiez.com
XML | XSLT | electronic publishing
Eat Your Vegetables
_____oo_________o_o___ooooo____ooooooo_^

Current Thread