[xquery-talk] min max and mix
ihe.onwuka at gmail.com
Mon Feb 10 04:36:46 PST 2014
On Mon, Feb 10, 2014 at 12:23 PM, David Lee <dlee at calldei.com> wrote:
> Personally I avoid mixed content models wherever possible. So it is more of an issue for those that don't.
> I was just messing about with these functions to see whether they were robust with respect to stability (that is stability as in a stable sort).
> [DAL:] ==============
> Even neglecting mixed content ( dont use that for data !)
> ... functions that expect atomics or lists of atomics generally dont do what you want when you give it *nested* XML.
> sum( <a><b>1</b><c>2</c></a> ) == 12
hmmmm I see.
> Its nice enough to try to simple content elements but not nested ("complex") elements.
> You *do* have to be careful with this. I wouldnt classify it as "stability" but its a rational argument.
> Dont be putting stuff in functions that you dont know whats in there ... and expect to get something out that you expect.
The stability thing is not a use case of mine either. Was just
interested to see what min/max would do when confronted with multiple
nodes that evaluated to the same value and to see if I could trace
which one it picked.
There you've dragged the wretched truth out of me.
More information about the talk