Hacker News new | ask | show | jobs
by rcade 857 days ago
I wouldn't call it underrated.

OPML is useful because people use it, but it was a bad design decision to store long blocks of HTML inside XML attributes instead of XML elements. Look at the escaped HTML inside these "text" attributes:

http://scripting.com/index.opml

Because the HTML is stored in attributes, it can't be wrapped in a CDATA block. There's also no limit to how long the text can be.

OPML is also a moving target without a standard. Any time there's a desire to represent something new with the format, attributes are added without any public participation from existing implementers. The value of the "type" attribute on outline elements determines whether new arbitrary attributes can be present.

Because of this unorthodox extension process, the OPML format has become a catch-all for unrelated uses: outlines, blog posts, RSS/Atom subscription lists, programming source code, and more.

All of the uses could've been represented as XML formats. XML didn't need OPML for storing and transmitted arbitrary data. We already had XML for that.

The original thing OPML was created to do -- represent outlines -- is severely hampered by the fact there's no way to store the expansion state of collapsed nodes of an outline.

1 comments

> but it was a bad design decision to store long blocks of HTML inside XML attributes instead of XML elements.

not at all - it's that what allows the simplest structure for nesting of outline elements.

An <outline> is an XML element, possibly containing one or more attributes, and containing any number of <outline> sub-elements.

XML elements can contain both text and child elements. Character data didn't have to be stored in an attribute to allow outline nesting.

<?xml version="1.0" encoding="UTF-8"?>

<node>

    <node> 

      <![CDATA[ Hello I am text ]]>

      <node> ... </node>

      <node> ... </node>

    </node>
</node>
It's about outliners. You move just one thing.
Child elements of character data can be moved around too.