xsl-list
[Top] [All Lists]

Re: [xsl] things about grouping

2012-11-24 09:59:09
On Sat, Nov 24, 2012 at 3:23 PM, Michael Kay <mike(_at_)saxonica(_dot_)com> 
wrote:
3. If you group-starting-with it's weird to then see things not encompassed
by the starting-with expression appear as a group because they precede the
first occurrence of the starting-with expression. While this works as
specified because for-each-group is a total function over the population it
does result in a mismatch between the grammatical semantic and the exhibited
behaviour, or to put it another way it does what it says in the spec but
doesn't do what it says on the tin.

Finding element and attribute names that enable people to guess the
semantics without reading the spec is not always easy. Som programming
languages get around this by using operators like ~:< whose semantics you
can't even attempt to guess...

The moral is, don't use any construct in any programming language without
reading the spec.


A language that mandated such (thankfully XSLT is not one)  would  not
be ergonomically friendly and  I'm sure there are a plethora of such
languages that have fallen into disuse.

Now as it happens I've read the specification of those language
constructs. I am critiquing it FWIW.

It's not really an issue of people guessing the semantics though is
it. It's more a case of the chosen syntax suggesting a semantic which
is obviously intentional and rightly so.

Personally I have far less issue with ~:< as syntax than something
whose syntax suggests a semantic which it does not then deliver on.

I'm sure issues like this were given very careful consideration in the
design of the language. It is not perfect and not expected to be so
but if a language specification was the be all and end all we wouldn't
have progressed from COBOL, PL/1 and XSLT 1.0.

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

<Prev in Thread] Current Thread [Next in Thread>