Hope
Hope is an alternative to markup languages. Note: Hope is superceded by Cobalt It is currently a proof of concept prototype to see where the ideas of Ted Nelson can lead us. Ted Nelson came up with the term Hypertext and famously defined 17 rules that a Hypertext system should conform to. His attempts to implement these in his Xanadu system haven't resulted in a finished system. But what if it had? Hope is an attempt to implement one small part of Ted's Xanadu dream: Annotation based markup. Instead of mixing the markup with the content, Hope keeps them rigorously apart. The content is nothing more than plaintext. The markup is in a seperate text file, only referencing the content using character ranges. The content and markup must be kept in sync. This is the main drawback I found so far: you will need a specific editing program to edit content and markup, you cannot just use a text editor. So I am working on making one, you are looking at it right now. On the left you can edit the content and below it the markup. On the right is the rendered output and below it the html source. The mouse is ignored for now, but keyboard cursor movements are followed. The only commands implemented for now are ctrl-b for bold and ctrl-i for italic. You can however add any markup you want in the markup textarea, as long as it is a valid HTML tag, whithout the < and > characters. The upside Once you accept the need for an editing tool, I have only found advantages in using this approach. There is no possibility of cross site scripting attacks, all content must be seperated into safe text-only content or unsafe markup. They cannot mingle. Parsing the markup is extremely simple, it is just a one-dimensional list. Parsing the content is even simpler, it is just plain text. You can have many different markup files for different contexts, full html or simplified for e-mail, or even a completely different markup language instead of html. Revision tracking of the content and showing the differences becomes much easier. This also makes things like collaborative editing much simpler. Creating a wysiwym html editor becomes easy, witness this thing right here. The markup list has no concept of tree structure and markup can overlap. This makes it easier to capture the intent of the human editor instead of breaking it up to fit the nested structure of a tree. If you are interested in researching this concept, grab the code from github and start experimenting.
0-44:h3 43-44:br 46-80:p 46-80:strong 74-80:a href="https://github.com/poef/cobalt/" 81-177:p 154-164:a href="http://en.wikipedia.org/wiki/Ted_Nelson" 179-406:p 243-251:a href="http://en.wikipedia.org/wiki/Project_Xanadu#Original_17_rules" 409-721:p 479-502:a href="http://blog.codinghorror.com/what-you-cant-see-you-cant-get/" 723-977:p 979-1261:p 1223-1229:em 1243-1249:em 1263-1394:p 1396-1406:h3 1408-1506:li 1408-2389:ul 1508-1660:li 1662-1736:li 1738-1797:li 1799-1963:li 1965-2110:li 2112-2388:li 2390-2491:p 2441-2466:a href="https://github.com/poef/hope"
Fork me on GitHub