Skip to Content.
Sympa Menu

xom-interest - [XOM-interest] indentation is source code and XML

xom-interest AT lists.ibiblio.org

Subject: XOM API for Processing XML with Java

List archive

Chronological Thread  
  • From: Noam Tamim <noamtm AT gmail.com>
  • To: Elliotte Harold <elharo AT metalab.unc.edu>, xom-interest <xom-interest AT lists.ibiblio.org>
  • Subject: [XOM-interest] indentation is source code and XML
  • Date: Sun, 9 Oct 2005 22:23:00 +0200

On 10/5/05, Elliotte Harold <elharo AT metalab.unc.edu> wrote:
>
> Source code is plain text. There are no indents in plain text. Just
> characters.
>
>
This discussion is a bit off topic, but some smart developers are gathered
in this list.

I want to throw an idea, and hear what you guys think of it:

Let's define two chars - INDENT and UNINDENT. The purpose: all text between
these chars is to be one-level indented:
So, to write:

<e1>
<e2/>
</e1>

I'll create a text file with these characters:
<e1>
I<e2/>
U</e1>

Where "I" is the INDENT char and "U" is the UNINDENT char.

Of course, you can also have multi-level indents:

void f() {
Iwhile (...) {
Ig();
U}
U}

Will be rendered as:
void f() {
while (...) {
g();
}
}

In an editor, you'd use TAB to indent, and shift-tab to unindent. In the
file, tab and backspace can be used.

I know - this will make the file no longer a plain text file. So what?

Noam.



  • [XOM-interest] indentation is source code and XML, Noam Tamim, 10/09/2005

Archive powered by MHonArc 2.6.24.

Top of Page