Semantic Documents
Discussing data and metadata lately WRT to ODF, I got to thinking: what if we had document models where metadata was baked in from the beginning?
Florian Reuter has already noticed that from a programmatic standpoint, there’s really no significant difference between metadata and styles: they’re both collections of properties that relate to content.
So let’s forget about document-authoring as we know it, with their awkward and complex UIs and ultimately fairly dumb content. What if instead we just had a model that had containers and text, and container objects had two array attributes: metadata and content?
So forget about bold and italic and headings. Imagine instead you add a section to a document, and you can add any metadata property you want to it: title, date, status, etc. The editor automatically adds the rendered content to your document, but behind the scenes it remains accessible as separate metadata.
Now generalize this to everything: tables, paragraphs, quotes, citations etc.
Hmm … maybe where the next step in semantic wikis ought to lie?
… am thinking about something like this:
p = Paragraph.new
p.add_content("Hello world, here is ")
quote = Quote.new(content="some quote") quote.addproperty(predicate="dc:source", object="urn:isbn:23450934") quote.addproperty(predicate="b:sourcepages", object="23") quote.addproperty(predicate="dc:subject", object="http://ex.net/subjects#random_thing")
p.add_content(quote)
p.add_content(", and the end of the sentence.")
s = Container.new s.addproperty(predicate="dc:title", object="Title") s.addcontent(p)
… no need for section heads, or even citations (we’re talking true “smart quotes” here!); it could be automatically rendered for different output.
Creative Commons License