Home

nicerobot edited this page May 22, 2013 · 9 revisions

xupl

xupl - ˈsəpəl - supple

Equivalent structure to XML.

Can look like sentences or programming language text.

The Goals

If you can write XML, you already know xupl.

Reduce the verbosity of XML.

Provide a more natural, readable, less verbose means of manually creating structured documents.

Similar to writing programming language text and leverage existing programming IDEs.

Facilitate creating Domain Specific Languages (DSLs).

For example

Here is a xupl document

note
  to: "Tove"
  from: "Jani"
  heading: "Reminder"
  body: "Don't forget me this weekend!"

For this XML

<note>
  <to>Tove</to>
  <from>Jani</from>
  <heading>Reminder</heading>
  <body>Don't forget me this weekend!</body>
</note>

Not only is the xupl less verbose, it's far easier to read. This becomes much more evident when namespaces are used.

xupl formatted to read like a sentence

note: to: "Tove". from: "Jani". heading: "Reminder". body: "Don't forget me this weekend!".

Alternately, {} can replace :

note {
  to {"Tove"}
  from {"Jani"}
  heading {"Reminder"}
  body {"Don't forget me this weekend!"}
}

This enables tools capable of matching braces.

Or just use indentation to indicate nesting

note
  to
    "Tove"
  from
    "Jani"
  heading
    "Reminder"
  body
    "Don't forget me this weekend!"