> Here is a proposed XML:
>
> <job class="org.my.synapse.job">
> <property name="stringProp" value="String"/>
> <property name="xmlProp">
> <somexml>config</somexml>
> </property>
> <simpletrigger count="-1" interval="1000"/>
> <crontrigger expression="0 * 1 * * ?"/>
> </job>
I did some research on XML design guidelines for
a presentation last year. While the element vs.
attribute decisions are somehow tricky, there
is one rule for which I found no contradiction:
> Don't put structured content into an attribute.
Based on that rule, the <crontrigger expression="..."/>
looks pretty bad. So if you prefer the attribute
approach to keep handcrafting of the XML files
simple, I would suggest to split the expression
into separate attributes:
<crontrigger minute="0" hour="*" dayofweek="1"
dayofmonth="*" month="?" />
This would also allow users to specify only
the relevant attributes, like:
<crontrigger hour="*" dayofweek="1" />
For what it's worth, the best rule on element vs.
attribute I found was:
> Put data into elements, metadata into attributes.
But if the rest of your XML schema favors attributes
over elements, it's better to keep it consistent.
cheers,
Roland
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]