On Thu, Nov 29, 2012 at 10:12 AM, Graydon <graydon(_at_)marost(_dot_)ca> wrote:
On Thu, Nov 29, 2012 at 05:58:45AM +0000, Ihe Onwuka scripsit:
Since we're talking about "except" and language definitions, has anyone
ever proposed a different form (or is there a different form for) the
construct:
div[not(* except (heading,para))]
It's really useful, but I find it frequently brain-melting, especially
as a component of more complex expressions.
A problem here is the mixture of notation from mathematical (set
theoretic in the form of except) and non-mathematical (the comma
operator).
[snip]
Now (get ready for the leap of faith and giant hand wave), substitute
the comma operator back for the | and you have div[(heading,para]
All the divs who have heading or para children, yes, but that's not
quite the same thing.
Unless I'm unusually addled this morning,
div[not(* except (heading,para))]
is a div which has _only_ heading or para children
Well the problem is with the semantic effect of div [ ] not the set
theoretical translation of the predicate.
Returning to my earlier notation take the complement of what we ended up with
(heading|para)'
Only - would be things that are not in the above expression - we are
in to double negative territory.
div[not(heading|para)'] (that should bother you - well it does me)
but you could do a mechanical DeMorgan translation to turn that into
something that keeps the computer happy
div[(not ((* except heading ) union (* except para))]
while you mentally continue to parse it as div[not(heading|para)']
--~------------------------------------------------------------------
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>
--~--