Re: [xsl] Where is 'intersect' Operator Defined in XPath 3?

Subject: Re: [xsl] Where is 'intersect' Operator Defined in XPath 3?
From: "Dimitre Novatchev dnovatchev@xxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Tue, 9 Aug 2022 01:12:24 -0000
>  Then we should at least strive at cross-linking both specs ...

Or just rename "Functions and Operators" to "Functions and (some) operators"

At least this will not be confusing and misleading.

If some feature is difficult to find, chances grow significantly that a
more representative portion of the dev audience may not be aware of this
feature at all.

On Mon, Aug 8, 2022 at 4:35 PM Imsieke, Gerrit, le-tex
gerrit.imsieke@xxxxxxxxx <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote:

> Then we should at least strive at cross-linking both specs so that
> people looking for a specific operator in F&O 4.0 will find a link to
> the source of syntax truth in the XPath 4.0 spec, and people looking for
> a function that backs a specific operator will find more links to F&O
> than what is said about Operator Mappings in Appendix B.2,
> https://www.w3.org/TR/xpath-31/#mapping
>
> The Saxon documentation has such a nice precedence table
> (
>
https://www.saxonica.com/documentation11/index.html#!expressions/parentheses)
.
>
> As you once pointed out somewhere, this list is mostly taken from
> https://www.w3.org/TR/xpath-31/#id-precedence-order
>
> It turns out that the original list has links to the respective sources
> of truth (all in the XPath spec, not in F&O), which is an (albeit
> probably underappreciated, because rarely consulted) improvement over
> the Saxon documentation.
>
> I suggest that
>
> - the Saxonica documentation link to XPath Appendix A.4 (Saxonica's own
> amendments, if there are any, either flagged as such or merged into the
> spec)
>
> - Appendix A.4 of the XPath spec also link to the backing functions for
> all types that have such functions for operations on specific XDM types
> (for example,
> https://www.w3.org/TR/xpath-functions-31/#func-dateTime-equal)
>
> - Each backing function in F&O link to its respective operator in the
> XPath 4.0 spec, maybe only to the precedence table in Appendix A.4, from
> which people can continue their journey.
>
> Gerrit
>
> On 09.08.2022 00:53, Michael Kay mike@xxxxxxxxxxxx wrote:
> >>
> >> Union, intersection, and set difference on node sequences are not
> >> covered in the F&O spec; unless I have overlooked them, neither are "to"
> >> (as in "1 to 100"), "and", "or", "not", "if" ... "then" ... "else",
> >> "instance of", "treat as", "castable as", "cast as".
> >
> > Similarly "/", "!", "?", "[".."]", "=>", "is", "<<", ">>", ",", "||".
> And the general comparison operators are defined in the XPath spec by
> reference to primitives defined in F&O.
> >
> > In fact at 3.1 the only operators defined in F&O are the arithmetic and
> value comparison operators, and I think the reason for this was indeed
> division of editorial labour rather than convenience for the reader. The
> WGs always recognized that this was less than satisfactory, but failed the
> find the energy to perform the major refactoring needed to improve matters.
> >
> > There was some tidying up between 3,0 and 3.1. In 2.0 and 3.0 some
> operators such as union, intersect, except, "<<", ">>" were defined in both
> specifications, and there was nothing to say which was normative. It was
> felt that the simplest solution to the duplication was to remove the
> operators from F&O, which had the effect that the syntax and semantic rules
> could be found in the same place.
> >
> > Michael Kay
> > Saxonica
> >>
> >> These are all keywords in XPath and must be (and are) defined in the
> >> XPath spec.
> >>
> >> Perhaps some illogicality arose in the division of labor made when the
> >> detailed documentation of the function library was split off from the
> >> XPath spec into a separate document.  Or perhaps there is a definition
> >> of "operator" somewhere that explains all.
> >>
> >> In either case, it doesn't seem quite as accidental as Mike Kay's
> >> self-depreciating account might suggest.
> >>
> >> Michael Sperberg-McQueen
> >>
> >>
> >>
> >>
> >>> On Mon, Aug 8, 2022 at 10:14 AM Michael Kay mike@xxxxxxxxxxxx <
> xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote:
> >>>
> >>> I'm afraid the distribution of text between the various specs often
> owes more to the question of who stepped up to do the editorial work than
> to any top-down design of the document suite.
> >>>
> >>> Michael Kay
> >>> Saxonica
> >>>
> >>>> On 8 Aug 2022, at 16:54, Norm Tovey-Walsh ndw@xxxxxxxxxx <
> xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote:
> >>>>
> >>>> "Eliot Kimber eliot.kimber@xxxxxxxxxxxxxx" <
> xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> writes:
> >>>>> I was looking in the XPath 3.1 functions and operators docbso I
think
> >>>>> my question still standsbwhy do I not find a definition of the
> >>>>> intersect operator in the Functions and Operators spec?
> >>>>
> >>>> I donbt know if therebs a good editorial reason, or if itbs
simply a
> >>>> matter of oversight. I donbt think it would have been unreasonable
to
> >>>> expect an bop:intersectb function described in F&O with a pointer
from
> >>>> the bintersectb operator in XPath to that function. But thatbs
not the
> >>>> way the XPath spec got written. B/\_(c)_/B/
> >>>>
> >>>>> And also why does a google search not find the entry in the XPath
> >>>>> spec?
> >>>>
> >>>> According to a bit of spam that drifted past me today, Google/Alphabet
> >>>> are engaged in a broad program of mind control over the entire human
> >>>> race. Perhaps theybre distracted a bit from the search engine
> business.
> >>>>
> >>>>                                        Be seeing you,
> >>>>                                          norm
> >>>>
>
>
>

--
Cheers,
Dimitre Novatchev
---------------------------------------
Truly great madness cannot be achieved without significant intelligence.
---------------------------------------
To invent, you need a good imagination and a pile of junk
-------------------------------------
Never fight an inanimate object
-------------------------------------
To avoid situations in which you might make mistakes may be the
biggest mistake of all
------------------------------------
Quality means doing it right when no one is looking.
-------------------------------------
You've achieved success in your field when you don't know whether what
you're doing is work or play
-------------------------------------
To achieve the impossible dream, try going to sleep.
-------------------------------------
Facts do not cease to exist because they are ignored.
-------------------------------------
Typing monkeys will write all Shakespeare's works in 200yrs.Will they write
all patents, too? :)
-------------------------------------
Sanity is madness put to good use.
-------------------------------------
I finally figured out the only reason to be alive is to enjoy it.

Current Thread