Forums: Define.xml
Hi Jozef,
I think you are misunderstading the logic of this rule. This rule doesn't enfore attribute ordering, instead DD0005 looks for valid attribites that appear out of position in Define.xml. For example, if you place DataType attribute on ItemRef element instead of ItemDef this rule would trigger.
Let me know if this makes sense.
Thanks,
Max
Thank you Max!
In that case Sergiy's description "The order of attributes INSIDE each element should follow the order ..." is inappropriate.
The latter really suggests that this is about the order inside the element.
I think also the name of the rule "Attribute in wrong position within define.xml" is somewhat misleading. I would propose to name the rule "Attribute on wrong element in define.xml". That is also much clearer for the reader. After all an attribute does belong to the element, and not to the document. Also, this would trigger a Schema-error isn't it? Does the validator make a distinction between schema errors and "business rules" errors? (I could check myself, but I am bit lazy this morning...).
With best regards from sunny Graz,
Jozef
As I already mentioned in the "rules" section (http://www.opencdisc.org/projects/validator/rules/dd0005) this rule is essentially wrong as it violates the basic XML rule that the attributes may come in any order.
There is no single reason for this rule, it does not make sense, is counterproductive and thus should be removed.