Re: Representing the components of a string in XML -- should delimiters be represented?

Norm Tovey-Walsh <[email protected]> Sun, 26 Feb 2023 14:41:43 +0000
Newsgroups gmane.text.xml.devel
Message-ID <[email protected]>
> Which of the following XML representations is better? If you assert
> that one is better than another, please explain – in simple, concrete
> terms – why it is better?

There is rarely a single best answer in the absence of any sort of
information about use cases. Given that all printf format specifications
start with ‘%’ and ‘.’ is always the precision delimiter, I don’t think
you gain anything from having them in the markup *and* it introduces the
possibility of errors. (If you put ‘#’ in the start_of_specifier
element, what does that mean?)

One unanswered question in your examples is whether you intend to mark
multiple flags up separately or as a group:

  <flag>+</flag>
  <flag>0</flag>

or 

  <flag>+0</flag>

General guidelines: avoid ambiguity and avoid including text that can be
generated. Those are the right answers except in circumstances where
they aren’t, natch.

                                        Be seeing you,
                                          norm

--
Norman Tovey-Walsh <[email protected]>
https://nwalsh.com/

> Any sufficiently undocumented code is indistinguishable from magic.
signature.asc (application/pgp-signature, 227 B)
-----BEGIN PGP SIGNATURE-----

iHUEARYKAB0WIQSEJUqRvjpp8yLt8uKDEiZHbwv9OwUCY/txMwAKCRCDEiZHbwv9
Oyj8AQDvgwwX9jaELp6UnU4KWyZYdqum4hPClI+YJJBDOI1HVgEAivAglu/J3Ig+
m3Kw7NBWPsO0OUayOyXg2qLt1GTa2g0=
=BbpY
-----END PGP SIGNATURE-----