W3C home > Mailing lists > Public > www-voice@w3.org > January to March 2013

RE: ISSUE-828: Unique IDs for Transitions [SCXML-LC-Comments]

From: Jim Barnett <Jim.Barnett@genesyslab.com>
Date: Fri, 1 Feb 2013 14:49:51 +0000
To: Voice Browser Working Group <w3c-voice-wg@w3.org>, "www-voice@w3.org" <www-voice@w3.org>
Message-ID: <57A15FAF9E58F841B2B1651FFE16D28101CE52@GENSJZMBX03.msg.int.genesyslab.com>
Gavin,
  As David points out, there are a number of extensions that a GUI could use to distinguish transitions.  Standardizing on one of them would be important only if we want to ensure portability across GUIs (so that a script written in GUI X could be read in and edited in GUI Y without losing layout information.)   So far, we haven't seen a demand for this, and it's much too much work for our initial release.  However, if there is interest in this, we would certainly consider it as a topic for a future version of the spec.  (It would undoubtedly involve a lot more than just identifiers for transitions.)

- Jim 

-----Original Message-----
From: Voice Browser Working Group Issue Tracker [mailto:sysbot+tracker@w3.org] 
Sent: Friday, February 01, 2013 9:43 AM
To: w3c-voice-wg@w3.org; www-voice@w3.org
Subject: ISSUE-828: Unique IDs for Transitions [SCXML-LC-Comments]

ISSUE-828: Unique IDs for Transitions [SCXML-LC-Comments]

https://www.w3.org/Voice/Group/track/issues/828


Raised by: James Barnett
On product: SCXML-LC-Comments

>From Gavin Kistner [phrogz@me.com]
Transitions currently do not specify the presence of an id="..." attribute. As any pair of states can have n transitions anchored at both ends, even with the same event(s), the only way to uniquely talk about a particular transition (to any sort of an external system) is to fully describe it. Contrast this with a state, which can be uniquely identified with a short id string.

This causes no problem for the runtime itself. However, for external tools working with an SCXML document this can be annoying. I'm thinking specifically of a visual runtime debugger for a state machine. For example, consider the scxmlgui tool[1]. It has a simple network protocol for highlighting/unhighlighting either states or transitions. The states are referred to by id. The transitions are referred to by source/target state ids, which clearly does not uniquely reference a specific transition in all cases.

It will be trivial to add a namespaced attribute to transitions to track this, but I would feel cleaner if this were in the spec itself. Any chance of having an a non-required id (ID) attribute spec'd on <transition> elements?

[Response from David Junger [tffy@free.fr]]

There are two ways to reliably reference a transition without an identifier:
- by state id and event+cond, which should be unique within a state
- by using the document structure (basically, using an XPath, CSS selector, or wrapping one of those for convenience) Using the target of a transition to identify it is insufficient without the above and unnecessary with them, as only the first transition with the same event+cond can ever be enabled.

However, it is true that these methods of reference are not identifiers and I understand that you may wish for one, especially in an editor.

I am opposed to adding the "id" attribute to anything that is not a state. In fact, it is annoying enough that <send> and <data> elements have it. A namespaced attribute (with the right namespace) is actually the clean way to do it, since it is clearly meta-data and, as you said, irrelevant to core SCXML. Besides, making that attribute part of SCXML would mean that authors of SCXML documents would feel compelled to waste time thinking of a name for all their transitions no matter the tools they use to create it. It is better that an IDE add automatically-generated, namespaced identifiers for its internal use if it does need them.

			David




Received on Friday, 1 February 2013 14:50:16 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Friday, 1 February 2013 14:50:18 GMT