W3C home > Mailing lists > Public > www-voice@w3.org > October to December 2012

updated definition of DOM Event I/O Processor

From: Jim Barnett <Jim.Barnett@genesyslab.com>
Date: Thu, 11 Oct 2012 07:38:39 -0700
Message-ID: <E17CAD772E76C742B645BD4DC602CD8106CE0366@NAHALD.us.int.genesyslab.com>
To: <www-voice@w3.org>
Here is a proposed revision of the definition of the DOM Event I/O


E.3 DOM Event I/O Processor

The DOM Event I/O processor handles communication between SCXML markup
and markup in other namespaces in mixed-markup XML documents. An example
of this would be a document containing both SCXML and HTML markup. In
such a case, each language retains its own context and its own
independent semantics. (For example, SCXML's event processing algorithm
is not affected by the fact that there is HTML markup elsewhere in the
document.) It is however useful for the two languages to be able to
communicate by sending events back and forth, so that the HTML markup
can notify SCXML when the user clicks on a button, and the SCXML markup
can notify HTML when it is time to place a certain field in focus, etc.
The DOM Event I/O processor handles this communication by means of DOM
Events [DOMEvents]
<file:///D:\W3C\WWW\Voice\Group\2005\HST\SCXMLNotation.html#DOMEvents> ,
which are a general means for information propagation in XML documents.
Note that we do not require that the SCXML document be represented in
the other markup's DOM (though it may be). 

E.3.1 Sending Events

The SCXML author can send a DOM event to any node in the document by
selecting the DOM Event I/O processor (type="DOM") and specifying the
node as the target. Processors MUST support CSS notation for specifying
the node, and MAY support XPath or other notations. The SCXML Processor
MUST use the value of the 'event' attribute as the type of the DOM
event. The Processor MUST populate the attributes of the event with the
values of any matching keys specified via "namelist" or <param>. If the
value of 'cancelable' is not specified, the Processor MUST set it to
'false'. If the value of 'bubbles' is not specified, the Processor MUST
set it to 'true'. If the specified DOM event type has a 'details'
attribute, the Processor MUST populate it with any remaining data (i.e.,
values specified by 'namelist', <param> or <content> that are not used
to populate the event's attributes.) If the specified event is not a
legal DOM event or if the specified node cannot be reached, the SCXML
Processor MUST place the error error.communication in the internal event

E.3.2 Receiving Events

In cases where the SCXML markup is represented in the DOM of the
containing document, then when a DOM event is targeted at the <scxml>
root node, the DOM Event I/O processor MUST convert it into an SCXML
event and insert it in the external event queue. The Processor MUST use
the type of the DOM event as the name of the SCXML event. It MUST also
place a shallow copy of the DOM event in the _event.data field. The
SCXML Processor MUST ignore DOM events targeted at other nodes in the
SCXML markup. The SCXML Processor MAY support other methods for
injecting DOM events into the SCXML markup. (Note, in particular, that
this will be necessary in cases where the SCXML markup is not included
in the containing document's DOM.)

E.3.3 _ioprocessors Value

The entry for the DOM Event I/O Processor inside the _ioprocessors
system variable is platform-specific. 

Received on Thursday, 11 October 2012 14:40:03 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 23:03:59 UTC