commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rahul Akolkar" <>
Subject Re: [SCXML] actions and undefined attributes
Date Thu, 31 Jul 2008 15:45:28 GMT
On Thu, Jul 31, 2008 at 2:27 AM, Daniel Schwager
<> wrote:
>> > I think, using undefined attributes (=without getter/setter) should
> end
>> > with an failure. What do you think  ?
>> >
>> <snip/>
>> You mean parse failure? That wouldn't be in line with the functioning
>> of the rest of the library (same thing will happen with elements in
>> the SCXML namespace) and probably non-trivial to implement (we may
>> have to extend the underlying digester functionality in this regard).
>> More importantly, IMO, SCXML documents should be able to support
>> attributes in other namespaces on various elements for compound
>> document scenarios, and this adds further complexity.
> This is not an XML parsing topic, I agree with you.
> But using your errorreporter listener
>        scxmlExecutor.setErrorReporter(new SimpleErrorReporter())
> to report such a "problem" would be nice and easy ..
>> I think the important question is why the undefined attributes are
>> getting added in the first place.
> e.g. typing errors or change of Actions without modifing the model....
>> IMO, a more appropriate take on this
>> might be to introduce better tooling on the authoring side and / or
>> introduce validation tools such as an augmented schema for SCXML +
>> your custom actions.
> Sure - but there is not such a tool and it's a lot of work to write one
> for checking consistence and semantic of stuff like
>        - states
>        - events
>        - action attributes
>        - ....

The library assumes well-formed, valid input, though we've been
steadily improving error reporting as we can. For example, the parser
will complain if you specify a transition target that does not exist,
or specify a transition target whose id clashes, it will warn when it
skips over elements it cannot recognize etc.

For issues like typos in custom actions attributes and the like, I
think creating a quick custom DTD / schema and using a decent (XML)
editor has good ROI :-) While it would be useful to have better
warnings and error reporting here as well, there are no immediate
plans to work on this.

Ofcourse, as always, if anyone else wants to make a proposal for such
improvements, and submit the appropriate well-tested patches in JIRA,
that'd be great too.


> Regards
> Danny

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message