Discussion:
[xquery-talk] Fwd: New F+O 3.1 draft
Joe Wicentowski
2016-09-08 03:10:27 UTC
Permalink
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
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 <***@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-***@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
_______________________________________________
***@x-query.com
http://x-query.com/mailman/listinfo/talk
Joe Wicentowski
2016-09-13 19:27:23 UTC
Permalink
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
Post by Joe Wicentowski
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
Has the WG considered a ?? operator or some such shortcut for
map:find(), to correspond to the abbreviated syntax for the
```
[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
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 ----------
Date: Tue, Sep 6, 2016 at 6:37 PM
Subject: New F+O 3.1 draft
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
_______________________________________________
***@x-query.com
http://x-query.com/mailman/listinfo/talk
Liam R. E. Quin
2016-09-13 23:34:58 UTC
Permalink
Post by Joe Wicentowski
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.
Correct, it's read-only I'm afraid. We have to be careful because of
intellectual property and "submarine patents". The public-xsl-query
list is for people who are participants in the Working Group and who
have signed the necessary disclaimers.

You can register comments on the spec via bugzilla, as you discovered.
Posting here is fine too.

We don't want to make it difficult for people to post comments -
originally the xsl-query list was private, so it was easier for people
to find the public ways to comment before finding xsl-query.

Are you implementing?

Liam

W3C participant for XQuery and administrative contact
--
Liam R. E. Quin <***@w3.org>
The World Wide Web Consortium (W3C)
_______________________________________________
***@x-query.com
http://x-query.com/mailman/listinfo/talk
Loading...