"Daniel Dyer" <> wrote in message
news

...
>
> Now what we really need is a mark-up format for XML, so we don't have to
> write XML directly. Here's a first stab:
>
> [Element name="myElement"]
> [Attribute name="myAttribute" value="myValue" /]
> [Content]My textual content.[/Content]
> [/Element]
>
> This would could then be compiled into the native XML. This approach
> neatly decouples the document mark-up from the concrete implementation of
> the mark-up language, allowing the data to me compiled to any
> heirarchical, text-based mark-up language that you chose. Here's how the
> XML output might look:
>
> <myElement myAttribute="myValue">
> Please somebody stop this nonsense.
> </myElement>
Yes, but then someone would have to actually LEARN your meta markup
language. We should have a descriptive language which allows you to define
the syntax for your language, and it should look as much like plain English
as possible, so that anybody could read it. We'd start off with an
identification division, so that we could uniquely refer to these template
languages for maximum re-use, then describe the encoding that the file uses
so that parsers could... well... parse them.
000100 IDENTIFICATION DIVISION.
000200 TEMPLATE-ID: DanielDyerMarkupLanguage.
000300 AUTHOR: Daniel Dyer, Oliver Wong.
000400 ENVIRONMENT DIVISION.
000500 SOURCE-ENCODING: ASCII.
000600 LINE-ENDINGS: Unix.
000650 FILENAME-EXTENSION: ".ddml".
000700 MAIN-DESCRIPTION DIVISION.
000800 CASE IS: Significant.
000900 WHITESPACE IS: Insignificant.
001000 TAG-OPENING-STRING IS "[".
001100 TAG-CLOSING-STRING IS "]".
001200 TAG-END-MARKER IS "/".
001300 SHORT-CUT-TAGS ARE Allowed.
001400 ELEMENT-STRING IS "Element".
001500 ATTRIBUTE-STRING IS "Attribute".
001600 NAME-ATTRIBUTE-STRING IS "name".
001700 VALUE-ATTRIBUTE-STRING IS "value".
001800 CONTENT-STRING IS "Content".
001900 END-MARKUP-DESCRIPTION.
There, now people (and more importantly, computers) can understand how
to use your generic markup language! The line numbers are present so that
copy-and-pasting code snippets in the wrong order can be detected and
rectified. The practice is to increment them by 100s, in case you need to
later insert a line (as I have done so; can you spot where?)
I wasn't sure if you intended for your markup language to be case
sensitive or not, so I arbitrarily guessed that it was.
- Oliver