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] How should a two-digit airport runway number berepresented in XML?

Dimitre Novatchev <dnovatchev@gmail.com> writes:
> Why not allow both of these?
>
> In this way, if a human must manually edit the XML document, they will not be committing any mistake writing the number in any of the two possible ways.

When presented with a choice about how to model equivalent structures, there’s a tendency to say “if the representation doesn’t matter, accept all of the possible representations and let the user choose the one they like best.” It makes a lot of sense.

There is an alternative formulation, first introduced to me by Michael Sperberg-McQueen in the Schema working group (as I recall). If the order doesn’t matter: pick one.

There’s a lot to be said for the simplicity of “always two digits”. And it means that a reader used to <runway>09</runway> won’t have to pause and consider if <runaway>9</runway> is the same thing. Don’t confuse the human.

The context in the Schema working group was content models where the order doesn’t matter. If you’ve got ten elements A, B, C, D, E, … J and the order doesn’t matter, you can make it an xs:all group, or you can just make it a sequence: A, B, C …, J.

The xs:all group means that readers and all processing tools have to deal with 10! possible arrangements. That’s a lot of work for something that doesn’t matter!

(In point of fact, I think that there are lots of cases where we say that order doesn’t matter but leave unsaid that what that really means is that we don’t have consensus on the right order. I want to put A before B when I’m writing but Josephine wants to put C before A. But I still like the simplicity of “pick one.” And if you do, you’ll quickly find out from your users if the order *does* matter in some way!)

                                        Be seeing you,
                                          norm

--
Norm Tovey-Walsh <ndw@nwalsh.com>
https://norm.tovey-walsh.com/

> Substitute "damn" every time you’re inclined to write "very"; your
> editor will delete it and the writing will be just as it should
> be.--Mark Twain

Attachment: signature.asc
Description: PGP signature



[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