Re: Be afraid of XML
RobertMaas_at_YahooGroups.Com
Date: 03/15/04
- Next message: RobertMaas_at_YahooGroups.Com: "Re: How do I hide lisp source code?"
- Previous message: Feuer: "Re: Business Opportunities for SF Bay Lispers?"
- In reply to: Pete Kirkham: "Re: Be afraid of XML"
- Next in thread: Rob Warnock: "Re: Be afraid of XML"
- Reply: Rob Warnock: "Re: Be afraid of XML"
- Reply: Russell Wallace: "Re: Be afraid of XML"
- Reply: Cliff Crawford: "Re: Be afraid of XML"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Sun, 14 Mar 2004 21:48:55 -0800
> From: Pete Kirkham <pete-kirkham-2004@cafemosaic.co.uk>
> XML is a general tree syntax suitable for world-wide use. XML is a
> pruned scion of SGML so it has angle brackets and closing tags (if
> you are marking up text, then you don't want to escape every
> parenthesis). Is <para id="foo">Hello World</para> so much worse than
> (para :id "foo" :text "Hello World")?
I find it a pain that every < and every > and every & in text needs to
be quoted via < > and & respectively, so I don't see the
improvement compared to needing to quote parentheses instead.
Around 1975 I wrote MRPP3, a.k.a. POX, which was a text-formatting
program for the XGP (Xerox Graphics Printer). It had macros, and
various quoting notation for passing text as arguments to macros. Bill
Gosper used it extensively for his MacSyma research papers/notes,
prodding me to do some of the work on it. But the command syntax was
Algolish mostly, a brick (escape) character to switch from normal text
mode to command mode, followed by a command name, sometimes followed by
arguments, and terminated by a semicolon which returns to regular text
mode. But I got to liking LISP around that time, so in the end I
envisioned a LISP dialect which incorporated my various nesting
character system: (But there was never any funding for such work,
because XGP-PUB was promised any day now, and then TeX got invented and
became the standard, and I got a job doing something else so I switch
work to what was paying my living.)
Some quoting characters are symmetric and can be used only one level
deep, which always invokes super quote mode, for example:
"Hello World!" "This text has other (<$|/{[ nesting stuff quoted."
|Hello World!|
Other nesting characters are asymmetric and can be used multiple levels
deep. One level deep they act in semi-quoting mode, where all other
nesting characters become ordinary characters, but the same nesting
characters, and the 'brick' (a sort of command-escape) character are
still usable. Two levels deep makes super-quote mode where the brick
character is also just a regular character. For example:
<Stuff single-quoted ( and ( but $command; works <superQuote $junk>>
If you put two quoted strings one after another with no gap,
even/usually with different nesting characters, they append to make one
string. This allows you to mix *all* characters as regular text just by
using some *other* nesting character to quote troublesome text that had
nesting characters in it, even the brick character by using super-quote
mode. For example:
[Let S = {r in R | r < 0}.]{ [4]}
See how braces are regular text when quoted by brackets, but then vice
versa later?
So the idea is that the same quoting/nesting notation could be used
both for streaming text which is processed on the fly, and for text
strings which are stored as actual strings as part of LISP source code,
except that streaming text is initially outside any quoting/nesting
whereas actual strings are always inside quoting/nesting. As just a
possibility of how this might be used (in lieu of HTML syntax):
If you want to break between paragraphs, you do [<P>] in HTML, but you
do [(P)] here. Here's an actual paragraph break:(P)Now this text is in
a new paragraph, do you see it? [(]Yeah, I know that's only how it was
done using the (B)original(-B) HTML. Nowadays you bracket paragraphs
with [<P>...</P>] instead, which would be [(P)...(-P)] here.[)]
I think it's visually easier to read text where some sort of bracketing
wraps around single troublesome characters or around sections of text
with several troublesome characters, instead of requiring special <
etc. syntax every time a reserved character occurs in HTML text, or
likewise every time a " appears in a LISP string.
Note my proposed syntax is flexible with respect to two styles of
mark-up of nested textual structure, SGML-style:
(+SECTION)some random text(+SUBSECTION)more(-SUBSECTION)final(-SECTION)
or s-expr polish style:
(SECTION "some random text" (SUBSECTION "more") "final")
Anyway, just some ideas that never got tried, sigh.
> some of the postings here are bugs caused by parenthesis nesting.
I agree. (operator "Ten pages of text") is a pain, better to use
<OPERATOR>Ten pages of text<\OPERATOR>. But for short expressions
that are highly nested, regular parens such as:
(LET ((X (+ N 2))
(Y (- N 2)))
(* X Y))
is easier to use than the equivalent SGML version:
<LET><BIND>X<VAL><EXPR>+<,>N<,>2</EXPR></BIND>
<BIND>Y<VAL><EXPR>-<,>N<,>2</EXPR></BIND>
<STMT><EXPR>*<,>X<,>Y</EXPR></STMT>
</LET>
The syntax should support both modes, with the user deciding which is
best for any given task.
> Allow the same abstract tree to be encoded as s-expr, XML, ASN.1,
> RDBMS tables for coding, browser integration, data exchange and
> persistence. Let the web monkeys use XML until they know how to match
> the parentheses. Map the object system to and from UML in an explicit
> manner, and provide model-driven, pattern based and aspect oriented
> programming as language level facilities.
Yeah! Mix them all within a single source/document/mix file.
By the way, whatever happened to true HyperText (Xanadu), where not
just GIFs and other images, but any segments of text also, can be
inlined from some other URL, with the browser presenting the illusion
that all the stuff on-screen came from a single document?
- Next message: RobertMaas_at_YahooGroups.Com: "Re: How do I hide lisp source code?"
- Previous message: Feuer: "Re: Business Opportunities for SF Bay Lispers?"
- In reply to: Pete Kirkham: "Re: Be afraid of XML"
- Next in thread: Rob Warnock: "Re: Be afraid of XML"
- Reply: Rob Warnock: "Re: Be afraid of XML"
- Reply: Russell Wallace: "Re: Be afraid of XML"
- Reply: Cliff Crawford: "Re: Be afraid of XML"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|