Re: How should a two-digit airport runway number be represented in XML?
Norm Tovey-Walsh <[email protected]> Mon, 24 Jun 2024 17:44:00 +0100
| Newsgroups | gmane.text.xml.devel |
|---|---|
| Message-ID | <[email protected]> |
--=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Dimitre Novatchev <[email protected]> writes: > Why not allow both of these? > > In this way, if a human must manually edit the XML document, they will no= t be committing any mistake writing the number in any of the two possible w= ays. When presented with a choice about how to model equivalent structures, ther= e=E2=80=99s a tendency to say =E2=80=9Cif the representation doesn=E2=80=99= t matter, accept all of the possible representations and let the user choos= e the one they like best.=E2=80=9D It makes a lot of sense. There is an alternative formulation, first introduced to me by Michael Sper= berg-McQueen in the Schema working group (as I recall). If the order doesn= =E2=80=99t matter: pick one. There=E2=80=99s a lot to be said for the simplicity of =E2=80=9Calways two = digits=E2=80=9D. And it means that a reader used to <runway>09</runway> won= =E2=80=99t have to pause and consider if <runaway>9</runway> is the same th= ing. Don=E2=80=99t confuse the human. The context in the Schema working group was content models where the order = doesn=E2=80=99t matter. If you=E2=80=99ve got ten elements A, B, C, D, E, = =E2=80=A6 J and the order doesn=E2=80=99t matter, you can make it an xs:all= group, or you can just make it a sequence: A, B, C =E2=80=A6, J. The xs:all group means that readers and all processing tools have to deal w= ith 10! possible arrangements. That=E2=80=99s a lot of work for something t= hat doesn=E2=80=99t matter! (In point of fact, I think that there are lots of cases where we say that o= rder doesn=E2=80=99t matter but leave unsaid that what that really means is= that we don=E2=80=99t have consensus on the right order. I want to put A b= efore B when I=E2=80=99m writing but Josephine wants to put C before A. But= I still like the simplicity of =E2=80=9Cpick one.=E2=80=9D And if you do, = you=E2=80=99ll quickly find out from your users if the order *does* matter = in some way!) Be seeing you, norm =2D- Norm Tovey-Walsh <[email protected]> https://norm.tovey-walsh.com/ > Substitute "damn" every time you=E2=80=99re inclined to write "very"; your > editor will delete it and the writing will be just as it should > be.--Mark Twain --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEARYKAB0WIQSEJUqRvjpp8yLt8uKDEiZHbwv9OwUCZnmiUAAKCRCDEiZHbwv9 OxpeAP9I5m9TzFcMOQcnycnoRIwH3nzG9uweHOs9SOmlzujeVQD/RN3n0t/FKBud KTXypuMc6lBIOlOF0XUz1s1rQ218ngc= =1NI6 -----END PGP SIGNATURE----- --=-=-=--