[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: How should a two-digit airport runway number berepresented

  • From: Norm Tovey-Walsh <ndw@nwalsh.com>
  • To: Dimitre Novatchev <dnovatchev@gmail.com>
  • Date: Mon, 24 Jun 2024 17:44:00 +0100

Re:  How should a two-digit airport runway number berepresented
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]


PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.