Some more food for thought...
Looking through the Java code, I can see that there is no runtime
validation being performed. Granted, a decent XML editor will warn you
about required attributes and elements and such, but not everyone uses
that type of XML editor. Worse yet, there is no way to know you've done
something wrong - because mini-lang hides the errors in verbose log
statements. So, I would like to add runtime validation. If the script is
coded improperly, then it should throw an exception.
Another change I would like to make is to remove default attribute
values in the schema. From my perspective, defaults should be in the
mini-language code. The wiki page has demonstrated to me how difficult
it is to understand what's going on when you have to look through Java
code, and then also look through the schema to see what values it is
supplying. Plus, it makes me wonder how mini-language will behave when
the server doesn't have access to the schema.
Which brings up another point: Once the grammar has been cleaned up, we
will need a new schema. I think we need to start giving our schemas
version numbers so that XML editors and runtime XML validation will work
properly.
-Adrian
On 3/8/2012 6:19 PM, Jacopo Cappellato wrote:
On Mar 8, 2012, at 7:03 PM, Adrian Crum wrote:
B) instead of:
<fail-property resource="ErrorMessages" property="FooError" />
we could have
<fail-property property="ErrorMessages.FooError" />
Keep in mind that UEL would interpret FooError as an element of a Map called
ErrorMessages.
What you suggested can be done, but it will require more modifications to the
UEL integration - something I try to avoid because it causes more problems than
it solves. I recommend we keep the resource attribute.
Np then, I was not even sure it was a good idea and if requires customizations
to uel then I agree it is not worth the effort.
Thank you,
Jacopo