[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

XML as a transition to s-expr

Quoth Bruce Lewis on , 17 December:
: I don't want to make such people stop using XML or HTML.  I merely want
: to leverage their knowledge of those syntaxes as a transition into
: s-expr syntax.

First, you need to define a convenient format for attributes.  My best
pure s-expr effort was to express tags as factories for element

((tag1 (attr1 value1)) 
 ((tag2 (attr2 value2)))

What did you come up with?

If you are willing to play syntax games,  you can be a bit more

(tag1 :attr1=value1
  (tag2 :attr2=value2)



depending on whether you'd rather complicate the eval
or the read.