[xquery-talk] New F+O 3.1 draft

Joe Wicentowski joewiz at gmail.com
Tue Sep 13 12:27:23 PDT 2016


Hi Michael and all,

While my first question about map:find() is still one I'm interested
to discuss, I withdraw my second question - since Michael kindly
helped me understand the error in my thinking; see
https://www.w3.org/Bugs/Public/show_bug.cgi?id=29817.  (I posted this
to the bug tracker when I thought this list was dead.)

Best,
Joe

On Wed, Sep 7, 2016 at 11:10 PM, Joe Wicentowski <joewiz at gmail.com> wrote:
> 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":[]}]}
> return
>    $inventory??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
> https://www.w3.org/XML/Group/qtspecs/specifications/xpath-functions-31/html/Overview-diff.html#regex-syntax
>
>> 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."
>
> Joe
>
> ---------- 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.
>
> http://www.w3.org/XML/Group/qtspecs/specifications/xpath-functions-31/html/Overview-diff.html#func-map-find
>
> It includes a proposed spec for map:find(): please review this.
>
> I have also committed some tests for map:find().
>
> Michael Kay
> Saxonica


More information about the talk mailing list