Skip to content

URI to QName Design Notes

aldonline edited this page Sep 13, 2010 · 1 revision

URI to QName (U2Q) and QName to URI (Q2U) conversions can be applied on any SPARQL or TTL-like document.

U2Q Strategy

  1. Go over the whole document searching for <{URI}> occurrences.
  2. For each URI, try to extract ns/local tuple.
  3. Collect all NSs.
  4. Present user with a form to fill. He should be able to set prefixes for each NS
  5. With this information, the script should go over every URI and execute the replacement. Inserting prefixes.

TODO:

Splitting NS+Local ( in Ruby )?

Collecting some NS suggestions.

  1. Local ( from the project, by running a regex )
  2. http://prefix.cc/

Q2U Strategy

  1. Find prefix declarations and store (prefix, ns) tuples
  2. Search for prefix = ':' occurrences. Do NOT search within strings ( single, double, triple quotes ).
Clone this wiki locally