XML.orgXML.org
FOCUS AREAS |XML-DEV |XML.org DAILY NEWSLINK |REGISTRY |RESOURCES |ABOUT
OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]
Re: [xml-dev] Make implicit structures explicit

Read the next message I send before this one, please

On 04/08/2014 04:47 PM, Amelia A Lewis wrote:
On Tue, 8 Apr 2014 20:09:21 +0000, Costello, Roger L. wrote:
The XML could be designed like this:

<aircraft-approach-procedure>
     <transition>Contact control tower</transition>
     <transition>Enter glide slope</transition>
     <transition>Correct for wind conditions</transition>
</aircraft-approach-procedure>

That design relies (implicitly) on the order of the <transition>
elements for denoting the sequence of steps to be taken.

An alternative design is to (explicitly) specify the order. Here is
one way to accomplish this:

<aircraft-approach-procedure>
     <transition step="2">Enter glide slope</transition>
     <transition step="3">Correct for wind conditions</transition>
     <transition step="1">Contact control tower</transition>
</aircraft-approach-procedure>

Note that in this design it is not necessary to list the <transition>
elements in a particular order since @step explicitly indicates the
order.

I vote for the latter as best practice. I invoke this principle as my
justification:

  	Make implicit structures explicit.

What do you think?
6. Witness this little paragraph itself, which I will send as a
listicle with order indicated.

3. Those elements are ordered.

2. This makes explicit the structure indicated by a sequence of
elements.

4. In addition, XML has a long-standing goal of readability (however
little you may think it succeeds).

5. Ordered text is much easier to read than unordered.

1. XML has already specified that element order is significant.

Amy!







[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]


News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 1993-2007 XML.org. This site is hosted by OASIS