RE: Could XQuery replace the W3C DOM?

Assuming that XQuery supports XML editing and notifications then in many
cases, it can be a replacement for the W3C Document Object Model.
However, XQuery is not a complete replacement because the two use
different data models. The DOM preserves lexical information that is not
available to XQuery.  

-----Original Message-----
From: Eamon O'Tuathail [mailto:eamon.otuathail@clipcode.com] 
Sent: Tuesday, August 27, 2002 2:46 PM
To: www-ql@w3.org
Subject: 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 Wednesday, 28 August 2002 16:43:48 UTC