>What is the purpose of element attribute? And
is there a usage
>rule-of-thumb for element attribute (attribute vs. child
element) ?
>Thanx,
>-Farid
Farid,
It really depends on what you are using the
XML for. Check out: http://xml.coverpages.org/elementsAndAttrs.html.
My own rule of thumb for business transactions, and that adopted by such groups
as the OASIS Universal Business Language Technical Committee and
UN/CEFACT, is to use elements for identifying any data that will be stored
or used. Use attributes if you want to provide additional clarification
that a human reader might require to understand the data.
Mark
Mark R.
Crawford
Senior Research
Fellow - LMI XML Lead
Vice Chair - OASIS UBL TC
Chair - UN/CEFACT XML
Syntax Working Group
Editor - UN/CEFACT Core
Components
LMI Government
Consulting
2000 Corporate Ridge
McLean, VA
22102-7805
703.917.7177 Phone
703.655.4810
Wireless
The opportunity to make a difference has never
been greater.
www.lmi.org