Update on Son of SML

Michael Champion referred to my SML proposal as Son of SML.  SOSML sounds like a rallying cry for 'XML is in trouble' crowd.  I kind of like it.  Many people have made useful comments.  Here are some of them:

Remove assignable content – this was causing confusion between attributes and contents as well as supporting mixed content difficult.

Use '=' to distinguish attribute from content once assignable content is removed, double indentation is no longer needed.  Only loss seems to be loss of structured attribute value support.  Oh, well.

Forget """ I agree that its arcane.  Python can really mess up your brain. <g>

With above changes, here are some SOSML examples:

  # comments are '#' followed by a whitespace
  circle x='1.0' y = '1.0'
    r='0.5'
    fill color='#ff0000' # red
    "some useless text as mixed content"
    text "Hello"
    text
      a href='somewhere'
        "text with a link a quote like this \" "

Mixed-content reduces readability, but thats what mixed-content crowd deserves for giving me headaches. <g>  BTW, I am not entirely attached to the backslash escape character because I am a programmer leery of his biases.

Two new and possibly creepy features I am thinking about are.

  • Use quotes to distinguish between element and content – this is to allow one to type in a sequence of elements easily.
  • Use '/' to allow element nesting in a single line.

Here is an example using above two features and # comment

  a b c d # is same as
  a
  b
  c
  d
  a/b/c/d # is same as
  a
    b
      c
        d

I am probably at the edge of going overboard and risking the original intent: easy to read and write…