ACTION: Steven to devise an initial notation for websockets

So a web socket is just a bi-directional message system. You can send
text down it, and get an event telling you stuff has arrived.

Events that can occur are: open, close, error, message.

Fuller details: https://en.wikipedia.org/wiki/WebSocket

In essence

<socket id="m" resource="wss://example.com/messageinterface">
 <action ev:event="socket-message">
  <insert ref="instance('messages')/message" origin="event('data')"/>
 </action>
</socket>

<action ev:event="xforms-ready">
 <transmit socket="m" value="'ready'"/>
</action>

==========
However, this is very similar to <submit/>

<submission id="m" resource="wss://example.com/messageinterface">
 <action ev:event="xforms-message">
  <insert ref="instance('messages')/message" origin="event('data')"/>
 </action>
</submission>

<action ev:event="xforms-ready">
 <transmit socket="m" value="'ready'"/>
</action>
==============
Maybe even more like submission

<submission id="m" ref="outgoing" 
resource="wss://example.com/messageinterface">
 <action ev:event="xforms-message">
  <insert ref="instance('messages')/message" origin="event('data')"/>
 </action>
</submission>

<action ev:event="xforms-ready">
 <setvalue ref="outgoing" value="'ready'"/>
 <send submission="m"/>
</action>

Apparently some sockets can have a http or https scheme, so it may be
necessary to have an attribute that marks it as a socket.
==============

There may be an even more declarative approach worth considering, like this 
(just blue-skying here):

<instance id="m" resource="wss://example.com/messageinterface" 
incremental="true">
   <action ev:event="xforms-insert">
      ...deal with incoming message element...
   </action>
</instance>

Then whenever a message event occurs, an element is added to the end of the 
instance

      <message time="2026-10-16T09:50Z">Some text here</message>

=============

Steven

Received on Friday, 16 October 2026 09:53:46 UTC