xsl-list
[Top] [All Lists]

Re: [xsl] Keys with duplicates should be simple

2014-01-31 14:41:38
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_^

--~------------------------------------------------------------------
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>
--~--