Could XQuery replace the W3C DOM?

Let's assume at some future point (e.g. v2) XQuery will support XML
editing and some form of notifications [e.g. the client registers an
interest in a particular event, and later gets told about it (without
polling) when the event is raised.

Could we use XQuery as a complete replacement for the W3C Document
Object Model (DOM)?

The vast majority of the functionality in the DOM is to read and write
XML data items, and event notifications - which is pretty similar to
XQuery's role, so why bother with the DOM? 

Let me explain a little further. Imagine we have a peer network (e.g.
based on IETF BEEP [RFC 3080]), and we have a presentation peer
application (a successor to today's web browser) running on the machine
where the user sits, and we have a logic peer application (a successor
to today's web server) running on the machine containing the core
application.

The presentation peer contains a fast in-memory XQuery-aware data
engine. The equivalent of triggers within this data engine would make
changes to the graphical user interface based on the changing data it
stores. When the presentation peer shuts down, it erases all data in the
data-engine [e.g. it is not used for permanent storage].  

The logic peer would write XML documents into the present peer's data
engine (e.g. XForms, XHTML2, SVG, SMIL2, X3D, etc.) = full documents
when e.g. a form is about to be displayed, and then edits to that
document when the form needs to be changed. User (XML) events can flow
back in notifications to the logic peer. 

In such a scenario, do we need the DOM at all?

Eamon

Received on Tuesday, 27 August 2002 17:46:36 UTC