[XML-SIG] Literate XML?
Sun, 18 Apr 1999 10:17:15 -0400
A similar issue could be made for RTF (or any other text-based,
"human readable" encoding including, I guess, assembly language
mnemonics for computer programming). Nobody (except me maybe) writes
with RTF tags. (I needed to learn it in order to write a parser for it).
I wrote a pretty-printer for the RTF so I could read it better, but RTF is
sensitive to inserted newlines etc and the output was ruined except
I think most people who use XML (like the millions of people who use RTF)
will never see the XML tags in their raw format. Some nice
friendly, bi-directional authoring tool (word processor) will allow
us to "see what we got" and make changes to it. Tags will become little
icons that you drag out of various DTD objects which we have OPENed or
we can do a NEW DTD and set various properties. It all get converted
to more or less usable (note I didn't say flawless) XML or whatever.
The underlying semantics will be preserved and made understandable.
It will all boil down to how much trust we can place in such tools. Most
of us didn't trust compilers a decade or so ago and wrote all of our
'critical' code in assembler. How many of us still code in assembler?
We have learned to trust the compilers. Though they probably are not
absolutely flawless, on average they're better than most of us.
But to answer your question, write XML just like you would write your
favorite HLL code: balanced indents, lots of white space and breaks to catch
the eye. You might want to write a pretty printer, so you can read anybody's
code without having to rewrite it yourself. (Maybe someone has already written
a Python pretty printer).
At 11:00 PM 4/18/99 +1000, you wrote:
>Even though (as I keep repeating to myself) "a markup
>language is not a programming language", I believe there
>are issues that affect XML content creators as much as
>Over time, a large body of folklore, rules, heuristics has
>been developed for making programs "readable". This
>covers issues like choice of names, layout, indenting,
>comment styles and content etc. etc.
>Can anyone tell me if there is a similar body of experience
>for markup languages--particularly XML?
>I understand that a lot of XML may be automatically
>generated and processed, but for the rest of the time,
>does anyone have any experiences on making XML
><!-- I could do comments and indenting like this -->
> There is no spoon...
> Or like this (I realize white space is significant here)
><world-view>It's the smell...</world-view>
> To say nothing of attributes, entities and laying out a DTD
> Any advice?
>XML-SIG maillist - XML-SIG@python.org