commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rahul Akolkar <rahul.akol...@gmail.com>
Subject Re: [SCXML] Help with SCXML Send usage
Date Sat, 10 Dec 2005 21:36:48 GMT
Hi Mike -

The Reply-To header for your emails gets set to your email address
(rather than the mailing list) so my last email went to you rather
than the list. Do you have control over that?

On 12/10/05, Mike Sparr - www.goomzee.com <mike@goomzee.com> wrote:
> Rahul,
>
> I haven't compiled/tested, but it looks like this (below) is what is
> needed in the SCXMLDigester.java?  Is there any way for you to verify
> and perhaps rebuild the binary - I don't want to stray too far from your
> codebase.  :-)
>
<snip/>

Yup, something similar :-) I'm going to take a stab at that today.
I'll ping this thread when I make some progress.

If you're interested, here is what you'll need to build your own
Commons SCXML nightlies (any Commons component in general):

 * A subversion (SVN) client (to grab the latest code)
 * Ant (1.6.x is good) or Maven (1.0.2)

-Rahul


>
>    /**
>     * Add Digester rules for all actions (&quot;executable&quot;
> elements).
>     *
>     * @param xp The Digester style XPath expression of the parent
>     *           XML element
>     * @param scxmlRules The rule set to be used for digestion
>     */
>    private static void addActionRules(final String xp,
>            final ExtendedBaseRules scxmlRules) {
>        addActionRulesTuple(xp + XP_ASN, scxmlRules, Assign.class);
>        addActionRulesTuple(xp + XP_VAR, scxmlRules, Var.class);
>        addActionRulesTuple(xp + XP_LOG, scxmlRules, Log.class);
>        addActionRulesTuple(xp + XP_SND, scxmlRules, Send.class);
>
>        // add digestion of send element contents (these components
> needed I think)
>        scxmlDigester.setNamespaceAware(true);
>        scxmlDigester.setRuleNamespaceURI(null);
>        scxmlRules.add(xp + XP_SND, new
> NodeCreateRule(Node.DOCUMENT_FRAGMENT_NODE));
>        scxmlDigester.addSetNext(xp + XP_SND, "setExternalNodes",
> ArrayList.class);
>        // end add nested digestion rules
>
>        addActionRulesTuple(xp + XP_CAN, scxmlRules, Cancel.class);
>        addActionRulesTuple(xp + XP_EXT, scxmlRules, Exit.class);
>    }
>
>
> Your Send class has an ArrayList externalNodes which I assume you meant
> for that purpose (storing nexted elements).  If I'm mistaken, please let
> me know.  Anyhow, with this code above, perhaps you want to "clean up"
> using your ...Tuple(...) method???
>
> If you have time, the middle section code is what I think we need to add
> to "digest" the contents within the <send>...</send> tags.  Please let
> me know if you update the SCXMLDigester and what binary to download to
> test (assuming you have time to add this).
>
> Finally, the W3C spec for <send> states that either the tag attributes
> OR the nested elements are mutually exclusive.  I like your
> implementation and think we're better served by allowing both attributes
> within the <send target="" namelist="" ...>and nested content</send>.
> Your thoughts?
>
>
> Resources:
>  -
> http://rzm-hamy-wsx.rz.uni-karlsruhe.de/External/Documents-Mirrored/Java
> /mirror/jakarta-commons-digester-1.4.1-src/src/test/org/apache/commons/d
> igester/NodeCreateRuleTestCase.java  (see testNested() and
> testNamespaces() methods
>
>  - http://www-128.ibm.com/developerworks/java/library/j-lucene/
> (example Digester with addSetNext to call method after closing tag???)
>
>  -
> http://jakarta.apache.org/commons/digester/xref/org/apache/commons/diges
> ter/Digester.html#2360  (addSetNext source)
>
>
>
> Mike
>
<snap/>

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Mime
View raw message