Open mozumder opened 9 years ago
When an element references a model, how should its attributes be referenced?
Should the model include attribute definitions? Or should they be referenced explicitly?
This explicitly references the ARTICLE ID attribute in the ARTICLE element:
<MODEL class="article"> <PROPERTY class="id" type="string"> . . . <ARTICLE id="something" model="myArticleData" model_id="myArticleData.id"></ARTICLE>
But this uses the PROPERTY NAME to match the ARTICLE ID:
<MODEL class="article"> <PROPERTY class="id" type="string"> . . . <ARTICLE id="something" model="myArticleData"></ARTICLE>
The first version would be more verbose. The second requires carefully constructed models that matches attribute names.
Any preference?
When an element references a model, how should its attributes be referenced?
Should the model include attribute definitions? Or should they be referenced explicitly?
This explicitly references the ARTICLE ID attribute in the ARTICLE element:
But this uses the PROPERTY NAME to match the ARTICLE ID:
The first version would be more verbose. The second requires carefully constructed models that matches attribute names.
Any preference?