[xquery-talk] Fwd: New F+O 3.1 draft

Joe Wicentowski joewiz at gmail.com
Wed Sep 7 20:10:27 PDT 2016

Hi Michael,

I hope this is an acceptable forum to raise a question regarding your
post to public-xsl-query, since I think non-WG members can't post to
that list.

map:find() seems like a very convenient new function.  It gives us the
equivalent of the descendant-or-self axis for maps, which is really
going to simplify querying maps.  My question:

Has the WG considered a ?? operator or some such shortcut for
map:find(), to correspond to the abbreviated syntax for the
descendant-or-self axis, (//)?  For example:

let $inventory := map{"name":"car", "id":"QZ123", "parts":
[map{name":"engine", "id":"YW678", "parts":[]}]}
    (: same as map:find($inventory, 'parts') :)

Not necessary, but it seems in the spirit of other syntax
abbreviations like ?* (similar to /*).

Incidentally, searching the spec to see if this was already discussed
(it isn't) led me to a possible typo.  In

> Reluctant quantifiers are supported. They are indicated by a " ? " following a quantifier. Specifically:
> X?? matches X, once or not at all

Shouldn't the second question mark be deleted?  "X?" should suffice
for "X, once or not at all."


---------- Forwarded message ----------
From: Michael Kay <mike at saxonica.com>
Date: Tue, Sep 6, 2016 at 6:37 PM
Subject: New F+O 3.1 draft
To: Public Joint XSLT XQuery XPath <public-xsl-query at w3.org>

I have committed a new F+O draft (dated 6 September) which
incorporates most of the changes agreed today.


It includes a proposed spec for map:find(): please review this.

I have also committed some tests for map:find().

Michael Kay

More information about the talk mailing list