Altova Mailing List Archives>Archive Index >comp.text.xml Archive Home >Recent entries >Thread Prev - Re: XML naming conventions and good practice [Thread Next] Re: XML naming conventions and good practiceTo: NULL Date: 5/18/2009 8:14:00 AM ram@z... (Stefan Ram) writes:
> Without the type,
>
> < &alpha < &beta >
>
> , we do /not/ know /which/ end tag is missing, just that one
> end tag is missing, but without element types in end tags. we
> also /do not need/ to know which end tag is missing.
How about
< &alpha < &beta <&gamma >>
Still only one tag missing, but does it close the first of two
arguments to alpha or the only argument? If the first ">" was
"</beta>", you can tell. (If it's "</gamma>", you can't but it at
least cuts down on the hard cases.)
> And so on. (Lisp programmers are quite happy without named
> end tags.)
I'm not sure "quite happy" is the right way to describe it. With the
appropriate tools, such as Emacs, to automatically indent your code
(provided you did the line breaks), you can *often* look at code and
say "That doesn't line up right". But tracking down misplaced closing
parens was always a pain. (It was even worse with Interlisp, where
"]" could (and was used at the end of definitions to) stand for "any
number of required close parens." Then you couldn't even tell if one
was missing in the middle.) With Lisp, it was also considered bad
style to have a top-level expression that took up more than a screen,
with meaningful line breaks (although it often happened), so that it
was more likely that things would be verifiable (and understandable)
by inspection. With XML that's typically impossible.
--
Evan Kirshenbaum +------------------------------------
HP Laboratories |Well, if you can't believe what you
1501 Page Mill Road, 1U, MS 1141 |read in a comic book, what can you
Palo Alto, CA 94304 |believe?!
| Bullwinkle J. Moose
kirshenbaum@h...
(650)857-7572
http://www.kirshenbaum.net/
| ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
