I have been using the eXist native XML database with REST interfaces to store metadata for the last two years. It is a great system and I have been encouraged by others to document the benefits. Here is an excerpt.

The Problem

I have been working with a group of Business Analysts (BAs) that were using Visio to document business requirements. Mostly things like use cases and UML diagrams. They asked the question: can you tell me if we are using all the correct approved business terms in our diagrams? Can you create an easy-to-use process to check these against our glossary of approved business terms?

The Solution

Visio has a way to save their documents in XML format. Specifically you can use the “Save As…” function and select the “XML Drawing” file type. Since we use eXist as our metadata store and eXist has a WEBDAV interface it was easy to give them a folder on their desktop they could save their Visio drawings into. Once they did this they just clicked on a URL that ran a simple XQuery on their Visio files. This XQuery (about 15 lines) looked for each text element in the Visio document. The query line looks like this:

for $term in doc($mydoc)//v:Text (: here v is the namespace for Visio :)

The query then uses a standard function supplied with my glossary manager that displays a link to the term if it exists in the registry and red text if it does not exist in the registry. I believe that because I selected eXist and WEBDAV/REST interfaces that the solution was simple and elegant.

So how about your metadata registry? How would you approach this problem? Can you do it in under 15 lines of code and provide a drag-and-drop interface?