Archive for December, 2008

Designing a complex ontology and reusing others

Wednesday, December 3rd, 2008

This description of the Music Ontology provides an excellent and easy to understand example of how existing ontologies were reused, and other small ontologies designed, to contribute to the development of a larger, integrated ontology.  A similar case as in our current development of a versioning ontology for OMDoc, which we are specifying at the moment and which will be made up of a versioning ontology, a change ontology, an event ontology (the one that is part of the music ontology), and an ontology for people.

XML Pattern Matching and Functional Programming

Tuesday, December 2nd, 2008

I’m currently reconsidering whether it was a good idea to implement my XML→RDF extraction library Krextor in XSLT. Writing down my actual requirements, I realized that I need a language that supports

  • pattern matching on XML elements and attributes, using a syntax that is close to literal XML or to XPath (for easily writing extraction rules, which should also be done by other developers in future)
  • functional programming (in some way), as the whole idea of mapping XML to RDF (and thus XML nodes to URIs) can be modeled most elegantly using a functional approach. (This is rather a requirement for me implementing the generic core of Krextor, but also for extraction module developers once the XML input language is a bit more complex.)

Having looked a bit into XQuery, Scala, and JavaScript (and a little bit into Haskell), I decided to stick to XSLT for now. Functional programming is awkward but possible, and XML pattern matching is awkward or non-intuitive in most other languages.