[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: mixed content grouping by whitespace

Subject: Re: mixed content grouping by whitespace
From: "Imsieke, Gerrit, le-tex" <gerrit.imsieke@xxxxxxxxx>
Date: Tue, 13 Apr 2010 21:27:18 +0200
Re:  mixed content grouping by whitespace
On 13.04.2010 20:17, David Carlisle wrote:
On 13/04/2010 19:08, Wendell Piez wrote:
only a mathematician is likely to find this more straightforward than
group-starting-with="h2". At least most of the time.

Are there other people?

My maths tutor used to say: In mathematics, you learn either by insight or by habituation. It is only by habituation that I learned the distinction between patterns and expressions in grouping conditions. I never fully understood why in g-s-w/g-e-w groupings the population needs to be all nodes and not arbitrary sequences. I wonder whether it is because someone insisted that g-s-w/g-e-w conditions need to be patterns and hencefore the population need to be nodes, or whether it was the other way round. Maybe it is as it is for "historical reasons". Or maybe they thought: if we permit an arbitrary expression as g-s/e-w condition then we must check that an effective boolean value may be calculated for this expression, because it should be a yes/no decision whether a given item starts/ends a group. Maybe they found that a pattern that either matches or not is a more clear-cut and comprehensible binary criterion than arcane EBV semantics, at least for the common case of grouping nodes. I can imagine that they wanted to have patterns for all grouping conditions and very reluctantly accepted the fact that there must be more key values than true or false for group-by and group-adjacent.
I doubt that implementation considerations (such as a fictional: "a pattern match will typically be evaluated faster") have guided the decision.
To start a more general discussion: what are patterns for anyway? Couldn't the matching in template rules be performed by evaluating the EBV of an arbitrary expression in the match attribute? I think this wouldn't be XSLT (transforming nodes) any more if a template could match, for example, anything that is castable as xs:double.
But for g-s/e-w, I think an expression does make sense. If the expression's EBV (the EBV of the result of evaluating the expression, to be more precise) cannot be calculated, a type error will be raised. That's ok.

Only my 2 xs:currency.


Current Thread


Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
First Name
Last Name
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.