Discussion:
[xquery-talk] Collections - family relationships
Ihe Onwuka
2014-01-05 16:50:54 UTC
Permalink
If x is the document element of a document in a collection, is it the
sibling of y that is the document element of another document in the same
collection?

If not why not?
Joe Wicentowski
2014-01-05 17:36:36 UTC
Permalink
Do you mean "sibling" in the sense of the XPath axes preceding-sibling
and following-sibling, or in the general sense of documents being
"children" of a "parent" collection and thus "siblings"?

On Sun, Jan 5, 2014 at 10:50 AM, Ihe Onwuka <***@gmail.com> wrote:
> If x is the document element of a document in a collection, is it the
> sibling of y that is the document element of another document in the same
> collection?
>
> If not why not?
>
> _______________________________________________
> ***@x-query.com
> http://x-query.com/mailman/listinfo/talk
Ihe Onwuka
2014-01-05 17:38:44 UTC
Permalink
Certainly in the XPath sense and why not in the general sense (whatever
that means).


On Sun, Jan 5, 2014 at 5:36 PM, Joe Wicentowski <***@gmail.com> wrote:

> Do you mean "sibling" in the sense of the XPath axes preceding-sibling
> and following-sibling, or in the general sense of documents being
> "children" of a "parent" collection and thus "siblings"?
>
> On Sun, Jan 5, 2014 at 10:50 AM, Ihe Onwuka <***@gmail.com> wrote:
> > If x is the document element of a document in a collection, is it the
> > sibling of y that is the document element of another document in the same
> > collection?
> >
> > If not why not?
> >
> > _______________________________________________
> > ***@x-query.com
> > http://x-query.com/mailman/listinfo/talk
>
Joe Wicentowski
2014-01-05 18:20:38 UTC
Permalink
XPath axes only operate within the bounds of a single document.

On Sun, Jan 5, 2014 at 11:38 AM, Ihe Onwuka <***@gmail.com> wrote:
> Certainly in the XPath sense and why not in the general sense (whatever that
> means).
>
>
> On Sun, Jan 5, 2014 at 5:36 PM, Joe Wicentowski <***@gmail.com> wrote:
>>
>> Do you mean "sibling" in the sense of the XPath axes preceding-sibling
>> and following-sibling, or in the general sense of documents being
>> "children" of a "parent" collection and thus "siblings"?
>>
>> On Sun, Jan 5, 2014 at 10:50 AM, Ihe Onwuka <***@gmail.com> wrote:
>> > If x is the document element of a document in a collection, is it the
>> > sibling of y that is the document element of another document in the
>> > same
>> > collection?
>> >
>> > If not why not?
>> >
>> > _______________________________________________
>> > ***@x-query.com
>> > http://x-query.com/mailman/listinfo/talk
>
>
G. Ken Holman
2014-01-05 18:24:31 UTC
Permalink
At 2014-01-05 16:50 +0000, Ihe Onwuka wrote:
>If x is the document element of a document in a collection, is it
>the sibling of y that is the document element of another document in
>the same collection?
>
>If not why not?

It doesn't, because the specification says it doesn't:

http://www.w3.org/TR/2007/REC-xpath-functions-20070123/#func-collection
"returns a sequence of nodes"

A sequence of nodes has no sibling inter-relationships.

For my students there is a helpful diagram regarding memory
organization on page 223 of my XSLT book that is available for free
download on a "try and buy" basis at
http://www.CraneSoftwrights.com/training/#ptux ... if you decide not
to pay for the book, please delete the copy that you download for free.

The memory organization in XQuery is the same, and I use a similar
diagram in my XQuery hands-on class that shows the different
declaration syntaxes. But the handouts for that class are not
available publicly, so I can only share with you the XSLT pages.

A tree of nodes is different than a sequence of nodes. In a tree
nodes can have a sibling relationship, but in a sequence, there is no
connection between the nodes.

I hope this helps.

. . . . . . . . . Ken


--
Public XSLT, XSL-FO, UBL & code list classes: Melbourne, AU May 2014 |
Contact us for world-wide XML consulting and instructor-led training |
Free 5-hour lecture: http://www.CraneSoftwrights.com/links/udemy.htm |
Crane Softwrights Ltd. http://www.CraneSoftwrights.com/q/ |
G. Ken Holman mailto:***@CraneSoftwrights.com |
Google+ profile: http://plus.google.com/+GKenHolman-Crane/about |
Legal business disclaimers: http://www.CraneSoftwrights.com/legal |
Michael Kay
2014-01-05 20:54:10 UTC
Permalink
On 5 Jan 2014, at 16:50, Ihe Onwuka <***@gmail.com> wrote:

> If x is the document element of a document in a collection, is it the sibling of y that is the document element of another document in the same collection?

No.
>
> If not why not?

"Why" questions are very difficult to answer. Do you want a historically accurate answer (was the question debated at a WG meeting, who argued which position, how did the vote go, and why did individual members vote as they did?) - because it's very rarely possible to give one. Or do you want a post-hoc justification (can you think of a sensible reason that anyone might have designed it this way?)

One post-hoc justification is that collections are unordered, whereas axes are always ordered.

Another is that documents may belong to more than one collection.

Michael Kay
Saxonica
David Lee
2014-01-05 20:59:58 UTC
Permalink
Given those truths ...
If you do have a sequence from fn:collection() or another function you *can* find the position of a document in that collection and its 'sibling'

Note: this may be a horribly inefficient thing to do so buyer beware ....

let $c := fn:collection(),
$doc := local:pick-a-random-doc( $c ),
$prev := $c[ fn:index-of( $c , $doc ) - 1 ] (: Might be bad to do on the first or only document :)
return $c


this will answer the question of "what is the previous document in the sequence provided by fn:collection() ...
( you can replace fn:collection() with any function that produces a sequence of documents )




----------------------------------------
David A. Lee
***@calldei.com
http://www.xmlsh.org

-----Original Message-----
From: talk-***@x-query.com [mailto:talk-***@x-query.com] On Behalf Of Michael Kay
Sent: Sunday, January 05, 2014 3:54 PM
To: ***@gmail.com
Cc: ***@x-query.com
Subject: Re: [xquery-talk] Collections - family relationships


On 5 Jan 2014, at 16:50, Ihe Onwuka <***@gmail.com> wrote:

> If x is the document element of a document in a collection, is it the sibling of y that is the document element of another document in the same collection?

No.
>
> If not why not?

"Why" questions are very difficult to answer. Do you want a historically accurate answer (was the question debated at a WG meeting, who argued which position, how did the vote go, and why did individual members vote as they did?) - because it's very rarely possible to give one. Or do you want a post-hoc justification (can you think of a sensible reason that anyone might have designed it this way?)

One post-hoc justification is that collections are unordered, whereas axes are always ordered.

Another is that documents may belong to more than one collection.

Michael Kay
Saxonica


_______________________________________________
***@x-query.com
http://x-query.com/mailman/listinfo/talk
Michael Kay
2014-01-05 21:20:46 UTC
Permalink
On 5 Jan 2014, at 20:59, David Lee <***@calldei.com> wrote:

> Given those truths ...
> If you do have a sequence from fn:collection() or another function you *can* find the position of a document in that collection and its 'sibling'
>
> Note: this may be a horribly inefficient thing to do so buyer beware ....
>
> let $c := fn:collection(),
> $doc := local:pick-a-random-doc( $c ),
> $prev := $c[ fn:index-of( $c , $doc ) - 1 ] (: Might be bad to do on the first or only document :)
> return $c
>
>

This only works if all the documents have distinct string-values.

A more efficient and reliable approach would be

min(for $c at $i in collection() where $c is $doc return $i)

Michael Kay
Saxonica
David Lee
2014-01-05 21:24:02 UTC
Permalink
Arg ... so your saying index-of causes a string atomization ?
Ug. I know it wants item* and uses "eq" as the comparison but didn't realize that would stringify documents ...


Do you know of a sequence function that uses document or node ID's ?


----------------------------------------
David A. Lee
***@calldei.com
http://www.xmlsh.org


-----Original Message-----
From: Michael Kay [mailto:***@saxonica.com]
Sent: Sunday, January 05, 2014 4:21 PM
To: David Lee
Cc: ***@gmail.com; ***@x-query.com
Subject: Re: [xquery-talk] Collections - family relationships


On 5 Jan 2014, at 20:59, David Lee <***@calldei.com> wrote:

> Given those truths ...
> If you do have a sequence from fn:collection() or another function you *can* find the position of a document in that collection and its 'sibling'
>
> Note: this may be a horribly inefficient thing to do so buyer beware ....
>
> let $c := fn:collection(),
> $doc := local:pick-a-random-doc( $c ),
> $prev := $c[ fn:index-of( $c , $doc ) - 1 ] (: Might be bad to do on the first or only document :)
> return $c
>
>

This only works if all the documents have distinct string-values.

A more efficient and reliable approach would be

min(for $c at $i in collection() where $c is $doc return $i)

Michael Kay
Saxonica
Michael Kay
2014-01-05 21:48:27 UTC
Permalink
On 5 Jan 2014, at 21:24, David Lee <***@calldei.com> wrote:

> Arg ... so your saying index-of causes a string atomization ?
> Ug. I know it wants item* and uses "eq" as the comparison but didn't realize that would stringify documents ...

Actually the function signature for index-of expects xs:anyAtomicType, which means that if you supply a node it is atomized during the function call.
>
>
> Do you know of a sequence function that uses document or node ID's ?
>

union, intersect, difference....

The function index-of-node() is given as an example of a function you can write yourself:

http://www.w3.org/TR/xpath-functions-30/#index-of-node

Generally the functions in this appendix were considered for inclusion in the spec, and rejected because they can easily be implemented as user-defined functions.

Michael Kay
Saxonica
David Lee
2014-01-05 22:17:26 UTC
Permalink
Thanks.
Not even knowing of the existence of fn:filter or fn:for-each-pair I wrote just now my version in old-fashioned-xquery

declare function common:node-index-of( $nodes as node()* , $node as node() ) as xs:integer ?
{
for $n at $pos in $nodes
return
if( $n is $node )
then $pos
else ()
};

Signature may have to change if the same node exists > 1 time in a sequence

fn:for-each-pair looks like a really useful function ! I am often brain-stumped trying to skip over every other node in a sequence having to write div 2 and ($i div2) + 1 etc



----------------------------------------
David A. Lee
***@calldei.com
http://www.xmlsh.org


-----Original Message-----
From: Michael Kay [mailto:***@saxonica.com]
Sent: Sunday, January 05, 2014 4:48 PM
To: David Lee
Cc: ***@gmail.com; ***@x-query.com
Subject: Re: [xquery-talk] Collections - family relationships


On 5 Jan 2014, at 21:24, David Lee <***@calldei.com> wrote:

> Arg ... so your saying index-of causes a string atomization ?
> Ug. I know it wants item* and uses "eq" as the comparison but didn't realize that would stringify documents ...

Actually the function signature for index-of expects xs:anyAtomicType, which means that if you supply a node it is atomized during the function call.
>
>
> Do you know of a sequence function that uses document or node ID's ?
>

union, intersect, difference....

The function index-of-node() is given as an example of a function you can write yourself:

http://www.w3.org/TR/xpath-functions-30/#index-of-node

Generally the functions in this appendix were considered for inclusion in the spec, and rejected because they can easily be implemented as user-defined functions.

Michael Kay
Saxonica
Andrew Welch
2014-01-05 22:09:13 UTC
Permalink
On 5 January 2014 21:20, Michael Kay <***@saxonica.com> wrote:
>
> On 5 Jan 2014, at 20:59, David Lee <***@calldei.com> wrote:
>
>> Given those truths ...
>> If you do have a sequence from fn:collection() or another function you *can* find the position of a document in that collection and its 'sibling'
>>
>> Note: this may be a horribly inefficient thing to do so buyer beware ....
>>
>> let $c := fn:collection(),
>> $doc := local:pick-a-random-doc( $c ),
>> $prev := $c[ fn:index-of( $c , $doc ) - 1 ] (: Might be bad to do on the first or only document :)
>> return $c
>>
>>
>
> This only works if all the documents have distinct string-values.
>
> A more efficient and reliable approach would be
>
> min(for $c at $i in collection() where $c is $doc return $i)


Couldn't you use uri-collection() to give you an order, rather than
the collection() directly?


--
Andrew Welch
http://andrewjwelch.com
David Lee
2014-01-05 22:23:05 UTC
Permalink
Re: fn:uri-collection() !!
Another new function for me ... looks useful If/and/only/if it correlates to what you want ...
Seems there is no guarantee that
uri-collection()!doc(.) produces the same results as collection()

this is a broad field, that incidentally I think is underappreciated.
Hans-Juergen brought up similar ideas at recent Balisage conferences about the "space" beyond XQuery ...
That area where documents exist but standards fear to tread ....

This "Info Space" as he calls it (I think it's a great word ...) could really use some serious brain-power to dig into and standardize. XQuery itself leaves it mostly in the realm where dragons life - for good reasons ... but as XML matures
And we evolve into XML Databases and the web of all things, pushing the envelope of defining where documents come from,
And what rules and API's we want to standardize on them could be really useful.




----------------------------------------
David A. Lee
***@calldei.com
http://www.xmlsh.org


-----Original Message-----
From: Andrew Welch [mailto:***@gmail.com]
Sent: Sunday, January 05, 2014 5:09 PM
To: Michael Kay
Cc: David Lee; ***@x-query.com; ***@gmail.com
Subject: Re: [xquery-talk] Collections - family relationships

On 5 January 2014 21:20, Michael Kay <***@saxonica.com> wrote:
>
> On 5 Jan 2014, at 20:59, David Lee <***@calldei.com> wrote:
>
>> Given those truths ...
>> If you do have a sequence from fn:collection() or another function you *can* find the position of a document in that collection and its 'sibling'
>>
>> Note: this may be a horribly inefficient thing to do so buyer beware ....
>>
>> let $c := fn:collection(),
>> $doc := local:pick-a-random-doc( $c ),
>> $prev := $c[ fn:index-of( $c , $doc ) - 1 ] (: Might be bad to do on the first or only document :)
>> return $c
>>
>>
>
> This only works if all the documents have distinct string-values.
>
> A more efficient and reliable approach would be
>
> min(for $c at $i in collection() where $c is $doc return $i)


Couldn't you use uri-collection() to give you an order, rather than the collection() directly?


--
Andrew Welch
http://andrewjwelch.com
Liam R E Quin
2014-01-06 02:16:10 UTC
Permalink
On Sun, 2014-01-05 at 22:23 +0000, David Lee wrote:
> Seems there is no guarantee that
> uri-collection()!doc(.) produces the same results as collection()

Right - collection() really marks the border of what we (W3C) could
standardize at the time, when many implementations of XQuery do not (for
example) use a database at all, or store a representation of parsed and
data-typed XML in ISAM or in a single relational field accessible from
SQL...

Liam

--
Liam Quin - XML Activity Lead, W3C, http://www.w3.org/People/Quin/
Pictures from old books: http://fromoldbooks.org/
Ankh: irc.sorcery.net irc.gnome.org freenode/#xml
David Lee
2014-01-06 02:28:42 UTC
Permalink
Docs don't even need uri's. ... That's where the fun really starts in info space

Sent from my iPad (excuse the terseness)
David A Lee
***@calldei.com


> On Jan 5, 2014, at 9:16 PM, "Liam R E Quin" <***@w3.org> wrote:
>
>> On Sun, 2014-01-05 at 22:23 +0000, David Lee wrote:
>> Seems there is no guarantee that
>> uri-collection()!doc(.) produces the same results as collection()
>
> Right - collection() really marks the border of what we (W3C) could
> standardize at the time, when many implementations of XQuery do not (for
> example) use a database at all, or store a representation of parsed and
> data-typed XML in ISAM or in a single relational field accessible from
> SQL...
>
> Liam
>
> --
> Liam Quin - XML Activity Lead, W3C, http://www.w3.org/People/Quin/
> Pictures from old books: http://fromoldbooks.org/
> Ankh: irc.sorcery.net irc.gnome.org freenode/#xml
>
Ihe Onwuka
2014-01-06 10:58:14 UTC
Permalink
Let me give a bit of background to the use case motivating the question.

I want to find all reviews written by people that only wrote 1 review. I
wrote

collection($sp:reviewsColl)/descendant::reviews[not(review[2])]

but reviews has a @person attribute and that person may have 1 or more
reviews in another collection - so that doesn't work.

The thing that seemed most natural to fix this was to supplement the
predicate to say there should be no sibling review by the same
reviews/@person.





On Sun, Jan 5, 2014 at 8:54 PM, Michael Kay <***@saxonica.com> wrote:

>
> On 5 Jan 2014, at 16:50, Ihe Onwuka <***@gmail.com> wrote:
>
> > If x is the document element of a document in a collection, is it the
> sibling of y that is the document element of another document in the same
> collection?
>
> No.
> >
> > If not why not?
>
> "Why" questions are very difficult to answer. Do you want a historically
> accurate answer (was the question debated at a WG meeting, who argued which
> position, how did the vote go, and why did individual members vote as they
> did?) - because it's very rarely possible to give one. Or do you want a
> post-hoc justification (can you think of a sensible reason that anyone
> might have designed it this way?)
>
> One post-hoc justification is that collections are unordered, whereas axes
> are always ordered.
>
> Another is that documents may belong to more than one collection.
>
> Michael Kay
> Saxonica
>
>
Michael Kay
2014-01-06 11:38:51 UTC
Permalink
In XQuery 3.0

for $review in collection($sp:reviewsColl)//review
group by $review/@person
where count($review) = 1
return f:render($review)

Michael Kay
Saxonica




On 6 Jan 2014, at 10:58, Ihe Onwuka <***@gmail.com> wrote:

> Let me give a bit of background to the use case motivating the question.
>
> I want to find all reviews written by people that only wrote 1 review. I wrote
>
> collection($sp:reviewsColl)/descendant::reviews[not(review[2])]
>
> but reviews has a @person attribute and that person may have 1 or more reviews in another collection - so that doesn't work.
>
> The thing that seemed most natural to fix this was to supplement the predicate to say there should be no sibling review by the same reviews/@person.
>
>
>
>
>
> On Sun, Jan 5, 2014 at 8:54 PM, Michael Kay <***@saxonica.com> wrote:
>
> On 5 Jan 2014, at 16:50, Ihe Onwuka <***@gmail.com> wrote:
>
> > If x is the document element of a document in a collection, is it the sibling of y that is the document element of another document in the same collection?
>
> No.
> >
> > If not why not?
>
> "Why" questions are very difficult to answer. Do you want a historically accurate answer (was the question debated at a WG meeting, who argued which position, how did the vote go, and why did individual members vote as they did?) - because it's very rarely possible to give one. Or do you want a post-hoc justification (can you think of a sensible reason that anyone might have designed it this way?)
>
> One post-hoc justification is that collections are unordered, whereas axes are always ordered.
>
> Another is that documents may belong to more than one collection.
>
> Michael Kay
> Saxonica
>
>
Ihe Onwuka
2014-01-06 12:07:45 UTC
Permalink
Thank you. I'm not wishing to sound uncharitable or rude, but I
deliberately didn't ask for a solution because I wanted to focus on the
original question.

Consider the use case in the context of someone who did not have access to
XQuery 3.0.


On Mon, Jan 6, 2014 at 11:38 AM, Michael Kay <***@saxonica.com> wrote:

> In XQuery 3.0
>
> for $review in collection($sp:reviewsColl)//review
> group by $review/@person
> where count($review) = 1
> return f:render($review)
>
> Michael Kay
> Saxonica
>
>
>
>
> On 6 Jan 2014, at 10:58, Ihe Onwuka <***@gmail.com> wrote:
>
> Let me give a bit of background to the use case motivating the question.
>
> I want to find all reviews written by people that only wrote 1 review. I
> wrote
>
> collection($sp:reviewsColl)/descendant::reviews[not(review[2])]
>
> but reviews has a @person attribute and that person may have 1 or more
> reviews in another collection - so that doesn't work.
>
> The thing that seemed most natural to fix this was to supplement the
> predicate to say there should be no sibling review by the same
> reviews/@person.
>
>
>
>
>
> On Sun, Jan 5, 2014 at 8:54 PM, Michael Kay <***@saxonica.com> wrote:
>
>>
>> On 5 Jan 2014, at 16:50, Ihe Onwuka <***@gmail.com> wrote:
>>
>> > If x is the document element of a document in a collection, is it the
>> sibling of y that is the document element of another document in the same
>> collection?
>>
>> No.
>> >
>> > If not why not?
>>
>> "Why" questions are very difficult to answer. Do you want a historically
>> accurate answer (was the question debated at a WG meeting, who argued which
>> position, how did the vote go, and why did individual members vote as they
>> did?) - because it's very rarely possible to give one. Or do you want a
>> post-hoc justification (can you think of a sensible reason that anyone
>> might have designed it this way?)
>>
>> One post-hoc justification is that collections are unordered, whereas
>> axes are always ordered.
>>
>> Another is that documents may belong to more than one collection.
>>
>> Michael Kay
>> Saxonica
>>
>>
>
>
Andrew Welch
2014-01-06 12:21:18 UTC
Permalink
On 6 January 2014 12:07, Ihe Onwuka <***@gmail.com> wrote:
> Thank you. I'm not wishing to sound uncharitable or rude, but I deliberately
> didn't ask for a solution because I wanted to focus on the original
> question.

The non-specific general approach to this problem is grouping...

> Consider the use case in the context of someone who did not have access to
> XQuery 3.0.

You will have the fun of XQuery 1.0 grouping then : ) or of course
vendor extensions, which from my XQuery days were 90% of the code
written.
Michael Sokolov
2014-01-06 12:43:06 UTC
Permalink
On 1/6/2014 7:21 AM, Andrew Welch wrote:
> On 6 January 2014 12:07, Ihe Onwuka <***@gmail.com> wrote:
>> Thank you. I'm not wishing to sound uncharitable or rude, but I deliberately
>> didn't ask for a solution because I wanted to focus on the original
>> question.
> The non-specific general approach to this problem is grouping...
>
>> Consider the use case in the context of someone who did not have access to
>> XQuery 3.0.
> You will have the fun of XQuery 1.0 grouping then : ) or of course
> vendor extensions, which from my XQuery days were 90% of the code
> written.
>
Just because they are vendor extensions doesn't mean they aren't the
"right" solution. Any database-oriented system should offer you a
mechanism for indexing on a value such as "the author of the document"
and then an efficient means to return the keys of your index, either in
sorted order, or ordered by number of occurrences of (documents having)
the key. This is a specific kind of grouping, sometimes called
faceting. Once you have the values that occur once, the index should be
able to return the matching documents quickly, too.

Maybe with XQuery 3 the grouping operator will give you access to these
mechanisms in a more idiomatic (vendor-neutral) way, but it is
definitely worth verifying that your optimizer is able to do that if you
are dealing with more than a handful of documents.

-Mike
Ihe Onwuka
2014-01-06 12:48:51 UTC
Permalink
On Mon, Jan 6, 2014 at 12:21 PM, Andrew Welch <***@gmail.com>wrote:

> On 6 January 2014 12:07, Ihe Onwuka <***@gmail.com> wrote:
> > Thank you. I'm not wishing to sound uncharitable or rude, but I
> deliberately
> > didn't ask for a solution because I wanted to focus on the original
> > question.
>
> The non-specific general approach to this problem is grouping...
>
>
Thats what the coding required demands. That doesn't make it the right
general approach.



> > Consider the use case in the context of someone who did not have
> access to
> > XQuery 3.0.
>
> You will have the fun of XQuery 1.0 grouping then : ) or of course
> vendor extensions, which from my XQuery days were 90% of the code
> written.
>

I have access to 3.0 for this problem. Note I did not post asking for code
for a solution.
Andrew Welch
2014-01-06 14:30:20 UTC
Permalink
This post:

> I want to find all reviews written by people that only wrote 1 review. I
> wrote
>
> collection($sp:reviewsColl)/descendant::reviews[not(review[2])]
>
> but reviews has a @person attribute and that person may have 1 or more
> reviews in another collection - so that doesn't work.
>
> The thing that seemed most natural to fix this was to supplement the
> predicate to say there should be no sibling review by the same
> reviews/@person.

...followed by this:

> Note I did not post asking for code

...is puzzling. If you post code, don't be surprised if people post
code back. Even if you don't want it, someone in the archives might.


--
Andrew Welch
http://andrewjwelch.com
Ihe Onwuka
2014-01-06 14:45:59 UTC
Permalink
On Mon, Jan 6, 2014 at 2:30 PM, Andrew Welch <***@gmail.com>wrote:

> This post:
>
> > I want to find all reviews written by people that only wrote 1 review. I
> > wrote
> >
> > collection($sp:reviewsColl)/descendant::reviews[not(review[2])]
> >
> > but reviews has a @person attribute and that person may have 1 or more
> > reviews in another collection - so that doesn't work.
> >
> > The thing that seemed most natural to fix this was to supplement the
> > predicate to say there should be no sibling review by the same
> > reviews/@person.
>
> ...followed by this:
>
> > Note I did not post asking for code
>
> ...is puzzling. If you post code, don't be surprised if people post
> code back. Even if you don't want it, someone in the archives might


Of course it's puzzling. You lopped off the end of my sentence while
quoting it.

What I actually said was "Note I did not post asking for code for a
solution.". Still puzzled .... look at the original post of the thread.
Joe Wicentowski
2014-01-06 15:09:58 UTC
Permalink
Hi Ihe,

> Still puzzled

What are you still puzzled about? I thought your questions were all
answered, no?

Joe
Ihe Onwuka
2014-01-06 15:24:18 UTC
Permalink
Read it as "If you are still puzzled look at the original post of the
thread".


On Mon, Jan 6, 2014 at 3:09 PM, Joe Wicentowski <***@gmail.com> wrote:

> Hi Ihe,
>
> > Still puzzled
>
> What are you still puzzled about? I thought your questions were all
> answered, no?
>
> Joe
>
Michael Kay
2014-01-06 12:31:20 UTC
Permalink
On 6 Jan 2014, at 12:07, Ihe Onwuka <***@gmail.com> wrote:

> Thank you. I'm not wishing to sound uncharitable or rude, but I deliberately didn't ask for a solution because I wanted to focus on the original question.
>
> Consider the use case in the context of someone who did not have access to XQuery 3.0.
>

Then you solve the problem using the clumsy grouping facilities of XQuery 1.0, i.e. use distinct-values() to find the distinct persons, then select the reviews for each of those distinct persons.

Michael Kay
Saxonica
Ihe Onwuka
2014-01-06 12:50:28 UTC
Permalink
On Mon, Jan 6, 2014 at 12:31 PM, Michael Kay <***@saxonica.com> wrote:

>
> On 6 Jan 2014, at 12:07, Ihe Onwuka <***@gmail.com> wrote:
>
> > Thank you. I'm not wishing to sound uncharitable or rude, but I
> deliberately didn't ask for a solution because I wanted to focus on the
> original question.
> >
> > Consider the use case in the context of someone who did not have access
> to XQuery 3.0.
> >
>
> Then you solve the problem using the clumsy grouping facilities of XQuery
> 1.0, i.e. use distinct-values() to find the distinct persons, then select
> the reviews for each of those distinct persons.
>
>
There is a semantic relationship between these reviews. There are from the
same person. That relationship is being obscured by the specification
simply because they are in different collections.

The reason they are in different collections is because they are different
types of review. They might be on a different medium (tweet, vs like vs
review on the site) or they could be reviews of different types of products
(phones vs books for example). In both these examples a very good reason to
have the reviews in different collections is that they entail different
schemas.

The price the specification as is makes you pay for using the collection
arrangement is to lose the semantic relationship. Should it? Thats the real
question that motivated my posing the use case.
Michael Sokolov
2014-01-06 13:11:49 UTC
Permalink
On 1/6/2014 7:50 AM, Ihe Onwuka wrote:
>
> The price the specification as is makes you pay for using the
> collection arrangement is to lose the semantic relationship. Should
> it? Thats the real question that motivated my posing the use case.
It seems useful to me to have one set of relationships that work
within-document and another (unspecified, as yet) that work among
documents. Without this, what is the purpose of having data apportioned
into documents at all?

-Mike
Michael Kay
2014-01-06 13:28:22 UTC
Permalink
On 6 Jan 2014, at 13:11, Michael Sokolov <***@safaribooksonline.com> wrote:

> On 1/6/2014 7:50 AM, Ihe Onwuka wrote:
>>
>> The price the specification as is makes you pay for using the collection arrangement is to lose the semantic relationship. Should it? Thats the real question that motivated my posing the use case.
> It seems useful to me to have one set of relationships that work within-document and another (unspecified, as yet) that work among documents. Without this, what is the purpose of having data apportioned into documents at all?
>
> -Mike

I would say it is actually a rather unfortunate feature of the XML model that the partitioning of data into documents (and collections) is quite so visible at the query level, since this partitioning is often a "physical design" choice rather than something that flows naturally from the conceptual data model. It would be nice to have a model that hid this distinction, e.g. by making the entire database (or the entire web) appear to the query as a single document. But that's not the way life is.

Michael Kay
Saxonica
David Lee
2014-01-06 14:28:26 UTC
Permalink
>> Michael Kay

I would say it is actually a rather unfortunate feature of the XML model that the partitioning of data into documents (and collections) is quite so visible at the query level, since this partitioning is often a "physical design" choice rather than something that flows naturally from the conceptual data model. It would be nice to have a model that hid this distinction, e.g. by making the entire database (or the entire web) appear to the query as a single document. But that's not the way life is.
----------
[DAL:]
I would like to add, not only total refreshing agreement to this sentiment but take it one step sideways.
This isn't a new thought but its one us compute people often forget.
Folders and Files. The whole concept of "The Filesystem" ... having to put things into Files, and Folders of Files and Volumes etc. is archaic ...
I believe historically it was done both to try to model "the real world" of "The Office" into terms people could understand (literally files of paper bound in little file jackets put into folders, put into filing cabinets). AND as convenience to early disk based computing ... a simple way to organize data.
This metaphor Documents and Collections (or Directories or Cabinets) has persevered for decades and now is so ingrained its the only way most people think data *must* be represented or stored or packaged. Onceaponatime we thought computers would free us from the Paper World ... but it has not - why ? because we used them to model paper !!!

That and paper is a particularly nice way to view text ...

-David
Ihe Onwuka
2014-01-17 18:14:37 UTC
Permalink
Continuing on the them of recreating the limitations of the physical world.

<xsl:apply-templates select="someNode"/>

where someNode does not exist in the document has no effect.

<xsl:apply-templates select="doc('somedoc'/someNode)

where somedoc doesn't exist .....error - failed to load document.

But really it's just another non-existent node.




On Mon, Jan 6, 2014 at 2:28 PM, David Lee <***@calldei.com> wrote:
>>> Michael Kay
>
> I would say it is actually a rather unfortunate feature of the XML model that the partitioning of data into documents (and collections) is quite so visible at the query level, since this partitioning is often a "physical design" choice rather than something that flows naturally from the conceptual data model. It would be nice to have a model that hid this distinction, e.g. by making the entire database (or the entire web) appear to the query as a single document. But that's not the way life is.
> ----------
> [DAL:]
> I would like to add, not only total refreshing agreement to this sentiment but take it one step sideways.
> This isn't a new thought but its one us compute people often forget.
> Folders and Files. The whole concept of "The Filesystem" ... having to put things into Files, and Folders of Files and Volumes etc. is archaic ...
> I believe historically it was done both to try to model "the real world" of "The Office" into terms people could understand (literally files of paper bound in little file jackets put into folders, put into filing cabinets). AND as convenience to early disk based computing ... a simple way to organize data.
> This metaphor Documents and Collections (or Directories or Cabinets) has persevered for decades and now is so ingrained its the only way most people think data *must* be represented or stored or packaged. Onceaponatime we thought computers would free us from the Paper World ... but it has not - why ? because we used them to model paper !!!
>
> That and paper is a particularly nice way to view text ...
>
> -David
>
Adam Retter
2014-01-17 19:31:42 UTC
Permalink
Assuming that you are using Saxon for XSLT - how about using
fn:collection instead of fn:doc, as it allows you to control how the
errors are propagated -
http://saxonica.com/documentation9.4-demo/html/sourcedocs/collections.html
There may also be something similar for fn:doc but I cannot find the
documentation

On 17 January 2014 18:14, Ihe Onwuka <***@gmail.com> wrote:
> Continuing on the them of recreating the limitations of the physical world.
>
> <xsl:apply-templates select="someNode"/>
>
> where someNode does not exist in the document has no effect.
>
> <xsl:apply-templates select="doc('somedoc'/someNode)
>
> where somedoc doesn't exist .....error - failed to load document.
>
> But really it's just another non-existent node.
>
>
>
>
> On Mon, Jan 6, 2014 at 2:28 PM, David Lee <***@calldei.com> wrote:
>>>> Michael Kay
>>
>> I would say it is actually a rather unfortunate feature of the XML model that the partitioning of data into documents (and collections) is quite so visible at the query level, since this partitioning is often a "physical design" choice rather than something that flows naturally from the conceptual data model. It would be nice to have a model that hid this distinction, e.g. by making the entire database (or the entire web) appear to the query as a single document. But that's not the way life is.
>> ----------
>> [DAL:]
>> I would like to add, not only total refreshing agreement to this sentiment but take it one step sideways.
>> This isn't a new thought but its one us compute people often forget.
>> Folders and Files. The whole concept of "The Filesystem" ... having to put things into Files, and Folders of Files and Volumes etc. is archaic ...
>> I believe historically it was done both to try to model "the real world" of "The Office" into terms people could understand (literally files of paper bound in little file jackets put into folders, put into filing cabinets). AND as convenience to early disk based computing ... a simple way to organize data.
>> This metaphor Documents and Collections (or Directories or Cabinets) has persevered for decades and now is so ingrained its the only way most people think data *must* be represented or stored or packaged. Onceaponatime we thought computers would free us from the Paper World ... but it has not - why ? because we used them to model paper !!!
>>
>> That and paper is a particularly nice way to view text ...
>>
>> -David
>>
>
> _______________________________________________
> ***@x-query.com
> http://x-query.com/mailman/listinfo/talk



--
Adam Retter

skype: adam.retter
tweet: adamretter
http://www.adamretter.org.uk
G. Ken Holman
2014-01-18 04:39:35 UTC
Permalink
At 2014-01-17 18:14 +0000, Ihe Onwuka wrote:
>Continuing on the them of recreating the limitations of the physical world.
>
><xsl:apply-templates select="someNode"/>
>
>where someNode does not exist in the document has no effect.
>
><xsl:apply-templates select="doc('somedoc'/someNode)

That expression is addressing the node as an argument to doc(), not
as an operand of the return to doc().

>where somedoc doesn't exist .....error - failed to load document.
>
>But really it's just another non-existent node.

You are jumping to a preconceived conclusion without considering that
you probably wanted to write:

<xsl:apply-templates select="doc('somedoc')/someNode"/>

I hope this helps.

. . . . . . . Ken

--
Public XSLT, XSL-FO, UBL & code list classes: Melbourne, AU May 2014 |
Contact us for world-wide XML consulting and instructor-led training |
Free 5-hour lecture: http://www.CraneSoftwrights.com/links/udemy.htm |
Crane Softwrights Ltd. http://www.CraneSoftwrights.com/q/ |
G. Ken Holman mailto:***@CraneSoftwrights.com |
Google+ profile: http://plus.google.com/+GKenHolman-Crane/about |
Legal business disclaimers: http://www.CraneSoftwrights.com/legal |
Ihe Onwuka
2014-01-18 04:58:26 UTC
Permalink
On Sat, Jan 18, 2014 at 4:39 AM, G. Ken Holman
<***@cranesoftwrights.com> wrote:
> At 2014-01-17 18:14 +0000, Ihe Onwuka wrote:
>>
>> Continuing on the them of recreating the limitations of the physical
>> world.
>>
>> <xsl:apply-templates select="someNode"/>
>>
>> where someNode does not exist in the document has no effect.
>>
>> <xsl:apply-templates select="doc('somedoc'/someNode)
>
>
> That expression is addressing the node as an argument to doc(), not as an
> operand of the return to doc().
>
>
>> where somedoc doesn't exist .....error - failed to load document.
>>
>> But really it's just another non-existent node.
>
>
> You are jumping to a preconceived conclusion without considering that you
> probably wanted to write:
>
> <xsl:apply-templates select="doc('somedoc')/someNode"/>
>

Which if the verbatim of my prior experiment (<xsl:apply-templates
select="doc('ihe.xml')/home"/>) is anything to go by will still give
you a "Failed to load document ihe.xml" error.
Michael Kay
2014-01-18 09:19:21 UTC
Permalink
On 17 Jan 2014, at 18:14, Ihe Onwuka <***@gmail.com> wrote:

> Continuing on the them of recreating the limitations of the physical world.
>
> <xsl:apply-templates select="someNode"/>
>
> where someNode does not exist in the document has no effect.
>
> <xsl:apply-templates select="doc('somedoc'/someNode)
>
> where somedoc doesn't exist .....error - failed to load document.
>
> But really it's just another non-existent node.
>

At the time the doc() function was introduced to XPath 2.0, there was several years' experience of the document() function, which had different error behaviour. The problems with this were well known and the design of the function pair doc-available() and doc() was designed to overcome these problems.

One difference between reading an external document and selecting a node is that reading an external document can fail for a great variety of reasons of which the absence of the document is only one. (It might exist but have incorrect permissions, or be ill-formed, or be schema-invalid, or the network might be down). In general if you can't read it you want to know why. Ttreating all these conditions in the same way would give no opportunity for error information. If you want to treat absence of the document as a non-error condition, doc-available enables you to do that (you can trivially write your own function that combines doc-available() and doc() to achieve the wanted effect).

So I would defend the current design.

But I would also question what you are trying to achieve by raising the question. When you use a programming language or function library, you can always find aspects of its design that could be improved, either for your particular use case or for the world at large. But 99% of the time you can achieve what you want, so what's the point of complaining? You know full well that the design isn't going to be improved in a subsequent release unless there's an issue that's a real stopper, because people expect backwards compatibility. It's like whinging about (say) the fact that XML doesn't treat form-feed as whitespace: there are bigger fish to fry, move on. If you feel you can do a better design job than this, then get involved, rather than shouting from the sidelines: there are plenty of standards activities that are short of contributors.

Michael Kay
Saxonica
Ihe Onwuka
2014-01-18 10:03:09 UTC
Permalink
On Sat, Jan 18, 2014 at 9:19 AM, Michael Kay <***@saxonica.com> wrote:
>
> On 17 Jan 2014, at 18:14, Ihe Onwuka <***@gmail.com> wrote:
>
>> Continuing on the them of recreating the limitations of the physical world.
>>
>> <xsl:apply-templates select="someNode"/>
>>
>> where someNode does not exist in the document has no effect.
>>
>> <xsl:apply-templates select="doc('somedoc'/someNode)
>>
>> where somedoc doesn't exist .....error - failed to load document.
>>
>> But really it's just another non-existent node.
>>
>
> At the time the doc() function was introduced to XPath 2.0, there was several years' experience of the document() function, which had different error behaviour. The problems with this were well known and the design of the function pair doc-available() and doc() was designed to overcome these problems.
>
> One difference between reading an external document and selecting a node is that reading an external document can fail for a great variety of reasons of which the absence of the document is only one. (It might exist but have incorrect permissions, or be ill-formed, or be schema-invalid, or the network might be down). In general if you can't read it you want to know why. Ttreating all these conditions in the same way would give no opportunity for error information. If you want to treat absence of the document as a non-error condition, doc-available enables you to do that (you can trivially write your own function that combines doc-available() and doc() to achieve the wanted effect).
>
> So I would defend the current design.
>
> But I would also question what you are trying to achieve by raising the question. When you use a programming language or >function library, you can always find aspects of its design that could be improved, either for your particular use case or for the >world at large. But 99% of the time you can achieve what you want, so what's the point of complaining?
>

http://sourceforge.net/mailarchive/message.php?msg_id=31750895

> You know full well that the design isn't going to be improved in a subsequent release unless there's an issue that's a real stopper, because people expect backwards compatibility.

http://exist.2174344.n4.nabble.com/Signature-of-fn-filter-doesn-t-look-like-it-conforms-to-the-spec-td4662991.html

> It's like whinging about (say) the fact that XML doesn't treat form-feed as whitespace: there are bigger fish to fry, move on. If you feel you can do a better design job than this, then get involved, rather than shouting from the sidelines: there are plenty of standards activities that are short of contributors.

http://www.biglist.com/cgi-bin/wilma/wilma_hiliter/xsl-***@lists.mulberrytech.com/201212/msg00024.html?line=98#hilite
I also offered privately back then - not because I think I can do a
better job but because I can offer that annoying occasionally useful
ex-software tester perspective . I do not have the time now.

A professor once observed that the real interesting results of
research activities are all the things that were tried and were
discarded or didn't work and why - but they never get published.
Whingeing and complaining helps tease out some of those explanations.

I agree with your defence of the current design.
Adam Retter
2014-01-18 13:57:55 UTC
Permalink
>> You know full well that the design isn't going to be improved in a subsequent release unless there's an issue that's a real stopper, because people expect backwards compatibility.
>
> http://exist.2174344.n4.nabble.com/Signature-of-fn-filter-doesn-t-look-like-it-conforms-to-the-spec-td4662991.html
>

I am not sure that this is making the point you think it is! We
(eXist) chose to implement a *draft* standard in it's very early days
and make that available to our users. We previously made the same
decision with a draft version of XQuery Update. That is always a risky
decision as the draft may well change, in fact we almost certainly
expect it to. The Working Group are not expected to maintain backwards
compatibility through drafts, otherwise nothing would ever be
improved!

eXist was an early implementer of the draft standard and it allowed us
to provide feedback to the Working Group about any issues with
implementation, and/or suggestions based on real-world use of where it
may be improved. We requested that the function signatures were
changed, based on our experience. As it was a draft standard that was
acceptable to do. However, when the standard hits "Recommendation"
status, it is final, and it is at this point that backward
compatibility must be preserved as it is expected by XQuery
developers; hence being unable to change the functionality of doc.

Anyway, I am sure you realise that you could write your own function
in XSLT, let's call it 'doc-or-empty' and use it in place of doc to
achieve exactly what you want.

--
Adam Retter

skype: adam.retter
tweet: adamretter
http://www.adamretter.org.uk
Ihe Onwuka
2014-01-18 16:02:48 UTC
Permalink
On Sat, Jan 18, 2014 at 1:57 PM, Adam Retter <***@googlemail.com> wrote:
>>> You know full well that the design isn't going to be improved in a subsequent release unless there's an issue that's a real stopper, because people expect backwards compatibility.
>>
>> http://exist.2174344.n4.nabble.com/Signature-of-fn-filter-doesn-t-look-like-it-conforms-to-the-spec-td4662991.html
>>
>
> I am not sure that this is making the point you think it is!

It does.

> snipped


>
> Anyway, I am sure you realise that you could write your own function
> in XSLT, let's call it 'doc-or-empty' and use it in place of doc to
> achieve exactly what you want.
>

Yes and I have no intention of doing so.

See the original post here.

http://exist.2174344.n4.nabble.com/Why-does-it-think-the-variable-is-not-set-tc4663027.html#none

I knew that parenthesising the return expression would fix the problem
but I didn't know why. Wolfgang's answer told me.
Joe Wicentowski
2014-01-18 18:01:23 UTC
Permalink
I have a major bone to pick with the XQuery working group and all users of the language, who must all be insane.

When I'm trying to write a program in XQuery and it isn't working, I need to blow off steam with a pissed off comment in the code right where the error message appears. So I write my comment:

>:( XQuery makes no sense to me!!! ):<

But this raises new errors! So I try a different comment syntax:

>:^( GRRRR! )v:<

And another error appears!

Why doesn't XQuery understand my comments? Change it now or I will never cease to complain.

Oh, and I'm not interested in code samples showing the correct syntax for comments or explanations about the origins of whatever crazy comment syntax they came up with.

One final note to anyone who tries to be helpful: Shove it!

Sent from my iPhone

> On Jan 18, 2014, at 11:02 AM, Ihe Onwuka <***@gmail.com> wrote:
>
> On Sat, Jan 18, 2014 at 1:57 PM, Adam Retter <***@googlemail.com> wrote:
>>>> You know full well that the design isn't going to be improved in a subsequent release unless there's an issue that's a real stopper, because people expect backwards compatibility.
>>>
>>> http://exist.2174344.n4.nabble.com/Signature-of-fn-filter-doesn-t-look-like-it-conforms-to-the-spec-td4662991.html
>>
>> I am not sure that this is making the point you think it is!
>
> It does.
>
>> snipped
>
>
>>
>> Anyway, I am sure you realise that you could write your own function
>> in XSLT, let's call it 'doc-or-empty' and use it in place of doc to
>> achieve exactly what you want.
>
> Yes and I have no intention of doing so.
>
> See the original post here.
>
> http://exist.2174344.n4.nabble.com/Why-does-it-think-the-variable-is-not-set-tc4663027.html#none
>
> I knew that parenthesising the return expression would fix the problem
> but I didn't know why. Wolfgang's answer told me.
> _______________________________________________
> ***@x-query.com
> http://x-query.com/mailman/listinfo/talk
Ihe Onwuka
2014-01-18 18:13:44 UTC
Permalink
If getting code, syntax, solutions and help with writing your program
is your primary and sole objective I recommend StackOverflow.com.



On Sat, Jan 18, 2014 at 6:01 PM, Joe Wicentowski <***@gmail.com> wrote:
> I have a major bone to pick with the XQuery working group and all users of the language, who must all be insane.
>
> When I'm trying to write a program in XQuery and it isn't working, I need to blow off steam with a pissed off comment in the code right where the error message appears. So I write my comment:
>
>>:( XQuery makes no sense to me!!! ):<
>
> But this raises new errors! So I try a different comment syntax:
>
>>:^( GRRRR! )v:<
>
> And another error appears!
>
> Why doesn't XQuery understand my comments? Change it now or I will never cease to complain.
>
> Oh, and I'm not interested in code samples showing the correct syntax for comments or explanations about the origins of whatever crazy comment syntax they came up with.
>
> One final note to anyone who tries to be helpful: Shove it!
>
> Sent from my iPhone
>
>> On Jan 18, 2014, at 11:02 AM, Ihe Onwuka <***@gmail.com> wrote:
>>
>> On Sat, Jan 18, 2014 at 1:57 PM, Adam Retter <***@googlemail.com> wrote:
>>>>> You know full well that the design isn't going to be improved in a subsequent release unless there's an issue that's a real stopper, because people expect backwards compatibility.
>>>>
>>>> http://exist.2174344.n4.nabble.com/Signature-of-fn-filter-doesn-t-look-like-it-conforms-to-the-spec-td4662991.html
>>>
>>> I am not sure that this is making the point you think it is!
>>
>> It does.
>>
>>> snipped
>>
>>
>>>
>>> Anyway, I am sure you realise that you could write your own function
>>> in XSLT, let's call it 'doc-or-empty' and use it in place of doc to
>>> achieve exactly what you want.
>>
>> Yes and I have no intention of doing so.
>>
>> See the original post here.
>>
>> http://exist.2174344.n4.nabble.com/Why-does-it-think-the-variable-is-not-set-tc4663027.html#none
>>
>> I knew that parenthesising the return expression would fix the problem
>> but I didn't know why. Wolfgang's answer told me.
>> _______________________________________________
>> ***@x-query.com
>> http://x-query.com/mailman/listinfo/talk
Joe Wicentowski
2014-01-18 18:26:57 UTC
Permalink
I didn't ask for constructive suggestions. Read the original post.

Sent from my iPhone

> On Jan 18, 2014, at 1:13 PM, Ihe Onwuka <***@gmail.com> wrote:
>
> If getting code, syntax, solutions and help with writing your program
> is your primary and sole objective I recommend StackOverflow.com.
>
>
>
>> On Sat, Jan 18, 2014 at 6:01 PM, Joe Wicentowski <***@gmail.com> wrote:
>> I have a major bone to pick with the XQuery working group and all users of the language, who must all be insane.
>>
>> When I'm trying to write a program in XQuery and it isn't working, I need to blow off steam with a pissed off comment in the code right where the error message appears. So I write my comment:
>>
>>> :( XQuery makes no sense to me!!! ):<
>>
>> But this raises new errors! So I try a different comment syntax:
>>
>>> :^( GRRRR! )v:<
>>
>> And another error appears!
>>
>> Why doesn't XQuery understand my comments? Change it now or I will never cease to complain.
>>
>> Oh, and I'm not interested in code samples showing the correct syntax for comments or explanations about the origins of whatever crazy comment syntax they came up with.
>>
>> One final note to anyone who tries to be helpful: Shove it!
>>
>> Sent from my iPhone
>>
>>> On Jan 18, 2014, at 11:02 AM, Ihe Onwuka <***@gmail.com> wrote:
>>>
>>> On Sat, Jan 18, 2014 at 1:57 PM, Adam Retter <***@googlemail.com> wrote:
>>>>>> You know full well that the design isn't going to be improved in a subsequent release unless there's an issue that's a real stopper, because people expect backwards compatibility.
>>>>>
>>>>> http://exist.2174344.n4.nabble.com/Signature-of-fn-filter-doesn-t-look-like-it-conforms-to-the-spec-td4662991.html
>>>>
>>>> I am not sure that this is making the point you think it is!
>>>
>>> It does.
>>>
>>>> snipped
>>>
>>>
>>>>
>>>> Anyway, I am sure you realise that you could write your own function
>>>> in XSLT, let's call it 'doc-or-empty' and use it in place of doc to
>>>> achieve exactly what you want.
>>>
>>> Yes and I have no intention of doing so.
>>>
>>> See the original post here.
>>>
>>> http://exist.2174344.n4.nabble.com/Why-does-it-think-the-variable-is-not-set-tc4663027.html#none
>>>
>>> I knew that parenthesising the return expression would fix the problem
>>> but I didn't know why. Wolfgang's answer told me.
>>> _______________________________________________
>>> ***@x-query.com
>>> http://x-query.com/mailman/listinfo/talk
Ihe Onwuka
2014-01-18 18:34:33 UTC
Permalink
You have too many R's in your GRRRRR!

Try GRRRI instead and use ? instead of ! at the end of your R's thats
the normal way to solve these kind of problems in 3.0

On Sat, Jan 18, 2014 at 6:26 PM, Joe Wicentowski <***@gmail.com> wrote:
> I didn't ask for constructive suggestions. Read the original post.
>
> Sent from my iPhone
>
>> On Jan 18, 2014, at 1:13 PM, Ihe Onwuka <***@gmail.com> wrote:
>>
>> If getting code, syntax, solutions and help with writing your program
>> is your primary and sole objective I recommend StackOverflow.com.
>>
>>
>>
>>> On Sat, Jan 18, 2014 at 6:01 PM, Joe Wicentowski <***@gmail.com> wrote:
>>> I have a major bone to pick with the XQuery working group and all users of the language, who must all be insane.
>>>
>>> When I'm trying to write a program in XQuery and it isn't working, I need to blow off steam with a pissed off comment in the code right where the error message appears. So I write my comment:
>>>
>>>> :( XQuery makes no sense to me!!! ):<
>>>
>>> But this raises new errors! So I try a different comment syntax:
>>>
>>>> :^( GRRRR! )v:<
>>>
>>> And another error appears!
>>>
>>> Why doesn't XQuery understand my comments? Change it now or I will never cease to complain.
>>>
>>> Oh, and I'm not interested in code samples showing the correct syntax for comments or explanations about the origins of whatever crazy comment syntax they came up with.
>>>
>>> One final note to anyone who tries to be helpful: Shove it!
>>>
>>> Sent from my iPhone
>>>
>>>> On Jan 18, 2014, at 11:02 AM, Ihe Onwuka <***@gmail.com> wrote:
>>>>
>>>> On Sat, Jan 18, 2014 at 1:57 PM, Adam Retter <***@googlemail.com> wrote:
>>>>>>> You know full well that the design isn't going to be improved in a subsequent release unless there's an issue that's a real stopper, because people expect backwards compatibility.
>>>>>>
>>>>>> http://exist.2174344.n4.nabble.com/Signature-of-fn-filter-doesn-t-look-like-it-conforms-to-the-spec-td4662991.html
>>>>>
>>>>> I am not sure that this is making the point you think it is!
>>>>
>>>> It does.
>>>>
>>>>> snipped
>>>>
>>>>
>>>>>
>>>>> Anyway, I am sure you realise that you could write your own function
>>>>> in XSLT, let's call it 'doc-or-empty' and use it in place of doc to
>>>>> achieve exactly what you want.
>>>>
>>>> Yes and I have no intention of doing so.
>>>>
>>>> See the original post here.
>>>>
>>>> http://exist.2174344.n4.nabble.com/Why-does-it-think-the-variable-is-not-set-tc4663027.html#none
>>>>
>>>> I knew that parenthesising the return expression would fix the problem
>>>> but I didn't know why. Wolfgang's answer told me.
>>>> _______________________________________________
>>>> ***@x-query.com
>>>> http://x-query.com/mailman/listinfo/talk
Joe Wicentowski
2014-01-18 18:35:00 UTC
Permalink
In fact, while I (of course) was expecting you to read my mind, I don't even think I know what I wanted in the first place. On second thought, maybe I did. How about if you read it again, and remind me what I said. I can't be bothered to re-read old messages. In the meantime I'll just keep adding more nonsense to each new email I write and make sure I get the last word.

P-( ARRGH! This doesn't work either! )-d

Sent from my iPhone

> On Jan 18, 2014, at 1:26 PM, Joe Wicentowski <***@gmail.com> wrote:
>
> I didn't ask for constructive suggestions. Read the original post.
>
> Sent from my iPhone
>
>> On Jan 18, 2014, at 1:13 PM, Ihe Onwuka <***@gmail.com> wrote:
>>
>> If getting code, syntax, solutions and help with writing your program
>> is your primary and sole objective I recommend StackOverflow.com.
>>
>>
>>
>>> On Sat, Jan 18, 2014 at 6:01 PM, Joe Wicentowski <***@gmail.com> wrote:
>>> I have a major bone to pick with the XQuery working group and all users of the language, who must all be insane.
>>>
>>> When I'm trying to write a program in XQuery and it isn't working, I need to blow off steam with a pissed off comment in the code right where the error message appears. So I write my comment:
>>>
>>>> :( XQuery makes no sense to me!!! ):<
>>>
>>> But this raises new errors! So I try a different comment syntax:
>>>
>>>> :^( GRRRR! )v:<
>>>
>>> And another error appears!
>>>
>>> Why doesn't XQuery understand my comments? Change it now or I will never cease to complain.
>>>
>>> Oh, and I'm not interested in code samples showing the correct syntax for comments or explanations about the origins of whatever crazy comment syntax they came up with.
>>>
>>> One final note to anyone who tries to be helpful: Shove it!
>>>
>>> Sent from my iPhone
>>>
>>>> On Jan 18, 2014, at 11:02 AM, Ihe Onwuka <***@gmail.com> wrote:
>>>>
>>>> On Sat, Jan 18, 2014 at 1:57 PM, Adam Retter <***@googlemail.com> wrote:
>>>>>>> You know full well that the design isn't going to be improved in a subsequent release unless there's an issue that's a real stopper, because people expect backwards compatibility.
>>>>>>
>>>>>> http://exist.2174344.n4.nabble.com/Signature-of-fn-filter-doesn-t-look-like-it-conforms-to-the-spec-td4662991.html
>>>>>
>>>>> I am not sure that this is making the point you think it is!
>>>>
>>>> It does.
>>>>
>>>>> snipped
>>>>
>>>>
>>>>>
>>>>> Anyway, I am sure you realise that you could write your own function
>>>>> in XSLT, let's call it 'doc-or-empty' and use it in place of doc to
>>>>> achieve exactly what you want.
>>>>
>>>> Yes and I have no intention of doing so.
>>>>
>>>> See the original post here.
>>>>
>>>> http://exist.2174344.n4.nabble.com/Why-does-it-think-the-variable-is-not-set-tc4663027.html#none
>>>>
>>>> I knew that parenthesising the return expression would fix the problem
>>>> but I didn't know why. Wolfgang's answer told me.
>>>> _______________________________________________
>>>> ***@x-query.com
>>>> http://x-query.com/mailman/listinfo/talk
Christian Grün
2014-01-18 18:39:20 UTC
Permalink
> P-( ARRGH! This doesn't work either! )-d

<x>{ ((: This ௐ ㋛ ௵ ㋛ ௐ works! :)) }</x>
________________________________

On Sat, Jan 18, 2014 at 7:35 PM, Joe Wicentowski <***@gmail.com> wrote:
> In fact, while I (of course) was expecting you to read my mind, I don't even think I know what I wanted in the first place. On second thought, maybe I did. How about if you read it again, and remind me what I said. I can't be bothered to re-read old messages. In the meantime I'll just keep adding more nonsense to each new email I write and make sure I get the last word.
>
>
> Sent from my iPhone
>
>> On Jan 18, 2014, at 1:26 PM, Joe Wicentowski <***@gmail.com> wrote:
>>
>> I didn't ask for constructive suggestions. Read the original post.
>>
>> Sent from my iPhone
>>
>>> On Jan 18, 2014, at 1:13 PM, Ihe Onwuka <***@gmail.com> wrote:
>>>
>>> If getting code, syntax, solutions and help with writing your program
>>> is your primary and sole objective I recommend StackOverflow.com.
>>>
>>>
>>>
>>>> On Sat, Jan 18, 2014 at 6:01 PM, Joe Wicentowski <***@gmail.com> wrote:
>>>> I have a major bone to pick with the XQuery working group and all users of the language, who must all be insane.
>>>>
>>>> When I'm trying to write a program in XQuery and it isn't working, I need to blow off steam with a pissed off comment in the code right where the error message appears. So I write my comment:
>>>>
>>>>> :( XQuery makes no sense to me!!! ):<
>>>>
>>>> But this raises new errors! So I try a different comment syntax:
>>>>
>>>>> :^( GRRRR! )v:<
>>>>
>>>> And another error appears!
>>>>
>>>> Why doesn't XQuery understand my comments? Change it now or I will never cease to complain.
>>>>
>>>> Oh, and I'm not interested in code samples showing the correct syntax for comments or explanations about the origins of whatever crazy comment syntax they came up with.
>>>>
>>>> One final note to anyone who tries to be helpful: Shove it!
>>>>
>>>> Sent from my iPhone
>>>>
>>>>> On Jan 18, 2014, at 11:02 AM, Ihe Onwuka <***@gmail.com> wrote:
>>>>>
>>>>> On Sat, Jan 18, 2014 at 1:57 PM, Adam Retter <***@googlemail.com> wrote:
>>>>>>>> You know full well that the design isn't going to be improved in a subsequent release unless there's an issue that's a real stopper, because people expect backwards compatibility.
>>>>>>>
>>>>>>> http://exist.2174344.n4.nabble.com/Signature-of-fn-filter-doesn-t-look-like-it-conforms-to-the-spec-td4662991.html
>>>>>>
>>>>>> I am not sure that this is making the point you think it is!
>>>>>
>>>>> It does.
>>>>>
>>>>>> snipped
>>>>>
>>>>>
>>>>>>
>>>>>> Anyway, I am sure you realise that you could write your own function
>>>>>> in XSLT, let's call it 'doc-or-empty' and use it in place of doc to
>>>>>> achieve exactly what you want.
>>>>>
>>>>> Yes and I have no intention of doing so.
>>>>>
>>>>> See the original post here.
>>>>>
>>>>> http://exist.2174344.n4.nabble.com/Why-does-it-think-the-variable-is-not-set-tc4663027.html#none
>>>>>
>>>>> I knew that parenthesising the return expression would fix the problem
>>>>> but I didn't know why. Wolfgang's answer told me.
>>>>> _______________________________________________
>>>>> ***@x-query.com
>>>>> http://x-query.com/mailman/listinfo/talk
>
> _______________________________________________
> ***@x-query.com
> http://x-query.com/mailman/listinfo/talk
Joe Wicentowski
2014-01-18 19:17:03 UTC
Permalink
Finally, someone understands my pure, noble intentions! I aim to advance the state of the field through the following tactics: lob questions phrased so vaguely and researched so lightly that rational, compassionate people feel no choice but to respond lest they let me wallow in my very evident frustration and cluelessness. Then, when they provide their best answer, I reply even more belligerently. This pulls all the others into the discussion to sort out the mess. Rinse, lather, repeat. Eventually, through the mass of frustration, people start to piece together some vague sense of my original issue and acknowledge that there was some kernel of a point there. By that time I have moved on and don't care anymore, and tell everyone so. But look at what was accomplished. Field, advanced, suckers!

Other people might have stepped back from their initial sense of frustration, researched the issue, and made a polite request for assistance or comment. But that's no fun. And it's not my style. And if you don't like it, go ahead, call me on it. You'll be sorry.

Sent from my iPhone

On Jan 18, 2014, at 1:39 PM, Christian Grün <***@gmail.com> wrote:

>> P-( ARRGH! This doesn't work either! )-d
>
> <x>{ ((: This ௐ ㋛ ௵ ㋛ ௐ works! :)) }</x>
> ________________________________
>
>> On Sat, Jan 18, 2014 at 7:35 PM, Joe Wicentowski <***@gmail.com> wrote:
>> In fact, while I (of course) was expecting you to read my mind, I don't even think I know what I wanted in the first place. On second thought, maybe I did. How about if you read it again, and remind me what I said. I can't be bothered to re-read old messages. In the meantime I'll just keep adding more nonsense to each new email I write and make sure I get the last word.
>>
>>
>> Sent from my iPhone
>>
>>> On Jan 18, 2014, at 1:26 PM, Joe Wicentowski <***@gmail.com> wrote:
>>>
>>> I didn't ask for constructive suggestions. Read the original post.
>>>
>>> Sent from my iPhone
>>>
>>>> On Jan 18, 2014, at 1:13 PM, Ihe Onwuka <***@gmail.com> wrote:
>>>>
>>>> If getting code, syntax, solutions and help with writing your program
>>>> is your primary and sole objective I recommend StackOverflow.com.
>>>>
>>>>
>>>>
>>>>> On Sat, Jan 18, 2014 at 6:01 PM, Joe Wicentowski <***@gmail.com> wrote:
>>>>> I have a major bone to pick with the XQuery working group and all users of the language, who must all be insane.
>>>>>
>>>>> When I'm trying to write a program in XQuery and it isn't working, I need to blow off steam with a pissed off comment in the code right where the error message appears. So I write my comment:
>>>>>
>>>>>> :( XQuery makes no sense to me!!! ):<
>>>>>
>>>>> But this raises new errors! So I try a different comment syntax:
>>>>>
>>>>>> :^( GRRRR! )v:<
>>>>>
>>>>> And another error appears!
>>>>>
>>>>> Why doesn't XQuery understand my comments? Change it now or I will never cease to complain.
>>>>>
>>>>> Oh, and I'm not interested in code samples showing the correct syntax for comments or explanations about the origins of whatever crazy comment syntax they came up with.
>>>>>
>>>>> One final note to anyone who tries to be helpful: Shove it!
>>>>>
>>>>> Sent from my iPhone
>>>>>
>>>>>> On Jan 18, 2014, at 11:02 AM, Ihe Onwuka <***@gmail.com> wrote:
>>>>>>
>>>>>> On Sat, Jan 18, 2014 at 1:57 PM, Adam Retter <***@googlemail.com> wrote:
>>>>>>>>> You know full well that the design isn't going to be improved in a subsequent release unless there's an issue that's a real stopper, because people expect backwards compatibility.
>>>>>>>>
>>>>>>>> http://exist.2174344.n4.nabble.com/Signature-of-fn-filter-doesn-t-look-like-it-conforms-to-the-spec-td4662991.html
>>>>>>>
>>>>>>> I am not sure that this is making the point you think it is!
>>>>>>
>>>>>> It does.
>>>>>>
>>>>>>> snipped
>>>>>>
>>>>>>
>>>>>>>
>>>>>>> Anyway, I am sure you realise that you could write your own function
>>>>>>> in XSLT, let's call it 'doc-or-empty' and use it in place of doc to
>>>>>>> achieve exactly what you want.
>>>>>>
>>>>>> Yes and I have no intention of doing so.
>>>>>>
>>>>>> See the original post here.
>>>>>>
>>>>>> http://exist.2174344.n4.nabble.com/Why-does-it-think-the-variable-is-not-set-tc4663027.html#none
>>>>>>
>>>>>> I knew that parenthesising the return expression would fix the problem
>>>>>> but I didn't know why. Wolfgang's answer told me.
>>>>>> _______________________________________________
>>>>>> ***@x-query.com
>>>>>> http://x-query.com/mailman/listinfo/talk
>>
>> _______________________________________________
>> ***@x-query.com
>> http://x-query.com/mailman/listinfo/talk
Ihe Onwuka
2014-01-18 19:54:58 UTC
Permalink
On Sat, Jan 18, 2014 at 7:17 PM, Joe Wicentowski <***@gmail.com> wrote:
> Finally, someone understands my pure, noble intentions! I aim to advance the state of the field through the following tactics: lob questions phrased so vaguely and researched so lightly that rational, compassionate people feel no choice but to respond lest they let me wallow in my very evident frustration and cluelessness. Then, when they provide their best answer, I reply even more belligerently. This pulls all the others into the discussion to sort out the mess. Rinse, lather, repeat. Eventually, through the mass of frustration, people start to piece together some vague sense of my original issue and acknowledge that there was some kernel of a point there. By that time I have moved on and don't care anymore, and tell everyone so. But look at what was accomplished. Field, advanced, suckers!
>
> Other people might have stepped back from their initial sense of frustration, researched the issue, and made a polite request for assistance or comment. But that's no fun. And it's not my style. And if you don't like it, go ahead, call me on it. You'll be sorry.
>

If you have already solved your problem you have no reason to be frustrated.

The minute you give any sort of detail...... the fatal words in this
thread were.......

"Let me give a bit of background to the use case motivating the question."

someone immediately launches in with code and then expects you to be grateful.

So you feel obligated out of politeness and respect to respond and
they continue feeding you code and examples and you just want to get
back to your work because you already knew that an aggregated group by
would get the result but you really want to know why putting things in
different collections because they come from different places or have
different schemas should mandate the destruction of other
relationships that exist in the real world you are modelling. Because
in the real world you wouldn't aggregate and group these things - you
would simply say they came from the same person.

And of course there isn't code to answer that so you either have to
ignore the fellow feeding it to you or find some way of saying thats
not what I am asking and the longer this situation persists it keeps
you from getting on with what you are supposed to be doing and keeps
the discussion from getting round to what you actually wanted to talk
about. THATS THE POINT where frustration is liable to kick in because
without fail on every thread that this happens there are people who
get what is being asked straight away.
Ihe Onwuka
2014-01-18 20:12:10 UTC
Permalink
On Sat, Jan 18, 2014 at 7:17 PM, Joe Wicentowski <***@gmail.com> wrote:
> Finally, someone understands my pure, noble intentions! I aim to advance the state of the field through the following tactics: lob questions phrased so vaguely and researched so lightly that rational, compassionate people feel no choice but to respond lest they let me wallow in my very evident frustration and cluelessness. Then, when they provide their best answer, I reply even more belligerently. This pulls all the others into the discussion to sort out the mess. Rinse, lather, repeat. Eventually, through the mass of frustration, people start to piece together some vague sense of my original issue and acknowledge that there was some kernel of a point there. By that time I have moved on and don't care anymore, and tell everyone so. But look at what was accomplished. Field, advanced, suckers!
>
> Other people might have stepped back from their initial sense of frustration, researched the issue, and made a polite request for assistance or comment. But that's no fun. And it's not my style. And if you don't like it, go ahead, call me on it. You'll be sorry.
>

Oh and lest I forget.

Mock people who actually make an effort to read the specification, try
to figure things out for themselves and don't just post demanding
answers, simply because their needs do not meet the level of
understanding required of a language implementer.

Way to achieve critical mass.
Adam Retter
2014-01-18 20:23:02 UTC
Permalink
I do not think anyone has mocked you... until just a second ago. I think
the XQuery community and this mailing list are friendly and helpful. I have
been a part of it for 9 years now.

Given the way that you phrase your enquiries, I also think they are
incredibly patient and tolerant.

I'm going to be honest. Your pushing the limits of what the majority find
acceptable, and you are rubbing people up the wrong way, not just here but
on other mailing lists too. May I suggest, that if you want to seek help
from the community by posting to these mailing lists, then you will get a
better response by being polite and considered.

I know JoeW to be a very calm, knowledgeable, helpful and above all, nice
person, but I fear you may have broken him.
On 18 Jan 2014 20:12, "Ihe Onwuka" <***@gmail.com> wrote:

> On Sat, Jan 18, 2014 at 7:17 PM, Joe Wicentowski <***@gmail.com> wrote:
> > Finally, someone understands my pure, noble intentions! I aim to
> advance the state of the field through the following tactics: lob questions
> phrased so vaguely and researched so lightly that rational, compassionate
> people feel no choice but to respond lest they let me wallow in my very
> evident frustration and cluelessness. Then, when they provide their best
> answer, I reply even more belligerently. This pulls all the others into
> the discussion to sort out the mess. Rinse, lather, repeat. Eventually,
> through the mass of frustration, people start to piece together some vague
> sense of my original issue and acknowledge that there was some kernel of a
> point there. By that time I have moved on and don't care anymore, and tell
> everyone so. But look at what was accomplished. Field, advanced, suckers!
> >
> > Other people might have stepped back from their initial sense of
> frustration, researched the issue, and made a polite request for assistance
> or comment. But that's no fun. And it's not my style. And if you don't
> like it, go ahead, call me on it. You'll be sorry.
> >
>
> Oh and lest I forget.
>
> Mock people who actually make an effort to read the specification, try
> to figure things out for themselves and don't just post demanding
> answers, simply because their needs do not meet the level of
> understanding required of a language implementer.
>
> Way to achieve critical mass.
>
Ihe Onwuka
2014-01-18 21:40:55 UTC
Permalink
On Sat, Jan 18, 2014 at 8:23 PM, Adam Retter <***@googlemail.com> wrote:
> I do not think anyone has mocked you... until just a second ago.

If I hadn't seen it happen to others I wouldn't have mentioned it.

> I think the
> XQuery community and this mailing list are friendly and helpful. I have been
> a part of it for 9 years now.
>

Exactly. But hang on I never said the list wasn't friendly and
helpful. I get offered code and solutions that I don't want or need
and I've said why that gets frustrating. So why are you saying this?
Because someone just mocked me and thats not friendly and helpful.
Look I'm not bothered. It's like being told I have a shallow grasp of
the fundamentals of Scrabble when the only reason I am playing it is
because I have an eye for a member of the opposite sex who enjoys it.

> Given the way that you phrase your enquiries, I also think they are
> incredibly patient and tolerant.
>
> I'm going to be honest. Your pushing the limits of what the majority find
> acceptable, and you are rubbing people up the wrong way, not just here but
> on other mailing lists too.

I'm going to be honest too. It's because of who I'm saying it to isn't
it. Because if I said to a johnny come lately don't mock people who
are making an effort to read the language specification and solve
their own problems there would be a chorus of agreement.

> May I suggest, that if you want to seek help
> from the community by posting to these mailing lists, then you will get a
> better response by being polite and considered.
>

Thank you but I always end up getting fantastic, helpful and
knowledgeable responses to my questions. Always.

>
> I know JoeW to be a very calm, knowledgeable, helpful and above all, nice
> person, but I fear you may have broken him.
>

Yeah I know and he's part of what you are part of and I'm not. I know
how it works.

I have seen this dynamic at play before on sibling lists and I am
neither the first nor the only one to have made that observation.

I am a regular visitor to DC Metro. Since my self-esteem is not
aligned with the perception of my proficiency in XQuery nothing he has
said here would act as a barrier to my desire to willingness to quaff
a beer with the man.

On the other hand Uche Ogbuji despite being a tribesman is a
completely different matter. He is a Gooner.
Joe Wicentowski
2014-01-19 02:06:54 UTC
Permalink
In all seriousness now, my satire was meant to help us reflect on and
acknowledge a pattern of abrasive interactions that has dominated this list
as of late, to raise it for discussion if needed, and hopefully to bring it
to a close by letting everyone see its absurdity.

Discussion can be civil but productive, direct and even heated but
respectful.

When you start a topic, you bear a special responsibility to be
comprehensive up front, to respect the time and effort everyone takes to
respond in good faith, and to guide your thread to a productive, respectful
close. Acknowledge failures in this responsibility readily. Neglect it at
your own peril.

Productive discussions, started and guided by responsible participants, has
always been the norm on xquery-talk in the time I have been a member. I
look forward to its return to that state.
Ihe Onwuka
2014-01-19 03:28:42 UTC
Permalink
On Sun, Jan 19, 2014 at 2:06 AM, Joe Wicentowski <***@gmail.com> wrote:
> In all seriousness now, my satire was meant to help us reflect on and
> acknowledge a pattern of abrasive interactions that has dominated this list
> as of late, to raise it for discussion if needed, and hopefully to bring it
> to a close by letting everyone see its absurdity.
>
> Discussion can be civil but productive, direct and even heated but
> respectful.
>
> When you start a topic, you bear a special responsibility to be
> comprehensive up front, to respect the time and effort everyone takes to
> respond in good faith, and to guide your thread to a productive, respectful
> close. Acknowledge failures in this responsibility readily. Neglect it at
> your own peril.
>
> Productive discussions, started and guided by responsible participants, has
> always been the norm on xquery-talk in the time I have been a member. I
> look forward to its return to that state.
>

Sometimes people have a sense of humour that may not necessarily
translate like .... of course I say nothing of the sort when raising
it on eXist.............

yeah I was thinking that but y'know how it is when you go in all guns
blazing and claiming you've found a bug...... but now that you have
emboldened my keyboard I'm thinking of a subject heading like t will
be Bug. Fix it you b******ds.

On Thu, Jan 2, 2014 at 9:18 AM, Joe Wicentowski <***@gmail.com> wrote:
I think you may have found a bug in eXist-db. Your code can be
reduced to the following tests:

-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Sometimes you need a sense of humour when your morning is dissipating
in the face of a simple query that turns into a runaway task

When the scheduler says terminating does that me............... or
rather is it meant to stop saying terminating.


On Tue, Jan 14, 2014 at 11:49 AM, Ihe Onwuka <***@gmail.com> wrote:
> So I killed it..... and the bastard is now taking an age to die.
>
> On Tue, Jan 14, 2014 at 11:31 AM, Ihe Onwuka <***@gmail.com> wrote:
>> Killing it would leave me with a half-updated database would it
>> not,...... as long as it finishes.
>

-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

I found alot of things just in the course of doing stuff.

That eXist doesn't let you do let after group by.
That it doesn't support the count clause in 3.0,
That there is something wrong with it's implementation of the
position() function because it sometimes gives 0.
That the order of it's arguments to HOF's are not spec-compliant

and you think - yeah this stuff is not a problem for me because I've
solved it, or you think I'm not going to use this thing ...say for
example if position() doesn't give me the nth out of m then it doesn't
do what it says on the tin and you don't want to use it

Of course you could avoid being cast as a villain, by just doing your
thing and keeping quiet. Sometimes my attitude is look there is
something wrong here - I have moved on but I'm doing my bit for the
community by reporting it.

________________________________________________________________________________________________________

It doesn't seem that you can pose a question here without somebody
trying to force feed it into something that can be answered with code
or reference to the spec. This thread is a prime but not sole example.
The thread divides into 2 strands. Those that do the former and those
that see the issue. You give the thing a title - Collections - Family
relationships. Your original post says you are asking whether and why
document elements are or are not siblings and somehow that gets parsed
into - I don't know how to group these things and count them.

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

and wobetide you if you ask why something is the way it is - because
the spec says so, you don't know anything about the language, if you
don't like it go off and write your own.
Ihe Onwuka
2014-01-18 18:42:00 UTC
Permalink
On Sat, Jan 18, 2014 at 6:35 PM, Joe Wicentowski <***@gmail.com> wrote:
> In fact, while I (of course) was expecting you to read
>

....before you started answering a question that was never asked.
Andrew Welch
2014-01-18 18:47:35 UTC
Permalink
He's being satirical.

It's hard not to agree with his observations.

On 18 Jan 2014 18:43, "Ihe Onwuka" <***@gmail.com> wrote:
>
> On Sat, Jan 18, 2014 at 6:35 PM, Joe Wicentowski <***@gmail.com> wrote:
> > In fact, while I (of course) was expecting you to read
> >
>
> ....before you started answering a question that was never asked.
> _______________________________________________
> ***@x-query.com
> http://x-query.com/mailman/listinfo/talk
Ihe Onwuka
2014-01-18 19:14:23 UTC
Permalink
Thou shalt take our solutions and be grateful for them. Whether you
asked for or needed them or not because that is our default setting
and we cannot parse anything posted here in any other way.

Anything you say contrary to the specification may be taken as
evidence of your hatred of the members of the XQuery Working Group and
may be used against you on a or the mailing list.



On Sat, Jan 18, 2014 at 6:47 PM, Andrew Welch <***@gmail.com> wrote:
>
> He's being satirical.
>
> It's hard not to agree with his observations.
>
> On 18 Jan 2014 18:43, "Ihe Onwuka" <***@gmail.com> wrote:
>>
>> On Sat, Jan 18, 2014 at 6:35 PM, Joe Wicentowski <***@gmail.com> wrote:
>> > In fact, while I (of course) was expecting you to read
>> >
>>
>> ....before you started answering a question that was never asked.
>> _______________________________________________
>> ***@x-query.com
>> http://x-query.com/mailman/listinfo/talk
David Carlisle
2014-01-20 09:43:37 UTC
Permalink
On 18/01/2014 10:03, Ihe Onwuka wrote:
> http://www.biglist.com/cgi-bin/wilma/wilma_hiliter/xsl-***@lists.mulberrytech.com/201212/msg00024.html?line=98#hilite
> I also offered privately back then

By "back then" do you mean 2012?? doc() is XPath 2 and the first draft
of XPath 2 was 2001 and it was a Recommendation in 2007.

David


________________________________________________________________________
The Numerical Algorithms Group Ltd is a company registered in England
and Wales with company number 1249803. The registered office is:
Wilkinson House, Jordan Hill Road, Oxford OX2 8DR, United Kingdom.

This e-mail has been scanned for all viruses by Star. The service is
powered by MessageLabs.
________________________________________________________________________
Ihe Onwuka
2014-01-20 09:51:18 UTC
Permalink
Yes David 2012.

I think the suggestion was to get involved in some ongoing standards
effort so I offered.

With respect to the subject matter of the thread, I currently data
have relating to one person split across 7 collections - some of it is
metadata, some of it relates to different types of products. The
prospect of a 2nd data source with a different schema looms - so
replicating the current design would mean splitting across 14
collections - so it's a concern - obviously one that can be overcome
but a concern.



On Mon, Jan 20, 2014 at 9:43 AM, David Carlisle <***@nag.co.uk> wrote:
> On 18/01/2014 10:03, Ihe Onwuka wrote:
>>
>>
>> http://www.biglist.com/cgi-bin/wilma/wilma_hiliter/xsl-***@lists.mulberrytech.com/201212/msg00024.html?line=98#hilite
>> I also offered privately back then
>
>
> By "back then" do you mean 2012?? doc() is XPath 2 and the first draft of
> XPath 2 was 2001 and it was a Recommendation in 2007.
>
> David
>
>
> ________________________________________________________________________
> The Numerical Algorithms Group Ltd is a company registered in England
> and Wales with company number 1249803. The registered office is:
> Wilkinson House, Jordan Hill Road, Oxford OX2 8DR, United Kingdom.
>
> This e-mail has been scanned for all viruses by Star. The service is
> powered by MessageLabs.
> ________________________________________________________________________
Andrew Welch
2014-01-06 11:39:48 UTC
Permalink
> collection($sp:reviewsColl)/descendant::reviews[not(review[2])]
>
> but reviews has a @person attribute and that person may have 1 or more
> reviews in another collection - so that doesn't work.

In your collection of collections, group on @person then count the
size of the group.

--
Andrew Welch
http://andrewjwelch.com
Loading...