This is an Open Web Archive archive of https://www.w3.org/Bugs/Public/show_bug.cgi?id=16118.
This snapshot has been taken on 2012-02-25 16:49:16 for the website Eric van der Vlist which contains a link to this page and has saved a copy to be displayed in the page ever disappears.
Bug 16118 – Maps should be first class citizens
Bug 16118 - Maps should be first class citizens
: Maps should be first class citizens
Status: NEW
Product: XPath / XQuery / XSLT
XSLT 3.0
: Working drafts
: All All
: P2 normal
: ---
Assigned To: Michael Kay
: Mailing list for public feedback on specs from XSL and XML Query WGs
:
:
:
:
:
  Show dependency treegraph
 
Reported: 2012-02-25 16:44 UTC by Eric van der Vlist
Modified: 2012-02-25 16:44 UTC (History)
0 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Eric van der Vlist 2012-02-25 16:44:05 UTC
I think that this is important for XSLT and XQuery users to be able to traverse
maps like they traverse XML fragments (with the same level of flexibility and
syntaxes that are kept as close as possible). And yes, that means being able to
apply templates over maps and be able to update maps using XQuery update…

But I also think that this will be important to other technologies that rely on
XPath such as (to name those I know best) XForms, pipeline languages (XPL,
XPROC, …) and Schematron.

Being able to use XForms to edit JSON object is an obvious need that XForms 2.0
is trying to address through a “hack” that has been presented at XML Prague
2012.

In a longer term we can hope that XForms will abandon this hack to rely on XDM
maps XForms relies a lot on the notions of nodes and axes. XForms binds
controls to instance nodes and the semantics of such bindings would be quite
different to be applied to XDM map entries as currently proposed.

XML pipeline languages are also good candidates to support JSON objects. Both
XPL and XProc have features to loop over document fragments and choose actions
depending on the results of XPath expressions and again the semantics of these
features would be affected if they had to support XDM maps as currently
proposed.

Schematron could be a nice answer to the issue of validating JSON objects.
Schematron relies on XPath at two different levels: its rules are defined as
XPath expressions and it is often very convenient to be able to use XPath axes
such as ancestor and its processing model is defined in term of traversing a
tree. Again, an update of Schematron to support maps would be more difficult is
maps are not similar to XML nodes.

(See also
http://eric.van-der-vlist.com/blog/2012/02/25/xdm-maps-should-be-first-class-citizens/
)