I got a few parse errors trying the following:

<if expr= " some conditional ">
  <log> </log>
</if>
<else>
  <log> </log>
</else>

Of course, the proper structuring for this, in STAX, is to nest the 'else' 
inside of the 'if'. This is pretty counter-intuitive to what must be almost all 
programmers. Though STAX isn't a programming language, per se, when an 'if' 
condition fails, the natural place for a programmer's eyes to go is past the 
closing of the 'if' scope (in this case, to the closing of the 'if' element).

I would suggest a structure like this:

<conditional>
  <if expr=" ">   </if>
  <else>   </else>
</conditional>

That's more to type, but I imagine it's easy for an XML parser to make sense of 
the relationship between the if/else elements.  I'd prefer the first structure 
that is listed in this email, w/o the extra 'conditional' element. If and else 
are mutually exclusive in execution, so their elements should, ideally, be 
exclusive, without one being subordinate to the other.

Thoughts?
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
staf-users mailing list
staf-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/staf-users

Reply via email to