[announce] URF: a new replacement for RDF, XML, and JSON

I'd like to announce a new semantic framework named the Uniform Resource 
Framework (URF), an alternative to RDF, XML, and JSON. The complete 
specification is here:

http://www.urf.name/

If you'd like to jump right in and try out URF, you can find an online 
URF processor here:

http://www.guiseframework.com/demo/urfprocess

The online processor allows you to paste in any valid TURF (Text URF, 
the default text format of URF) and see the resulting assertions, a TURF 
representation, and an interactive URF resource tree. You can even paste 
in RDF/XML, and it will be converted to URF, allowing you to see 
directly how URF differs from RDF. I suggest copying some examples from 
the URF specification and/or from the RDF Primer to start out.

I've also provided an entire open-source source code library for parsing 
URF from TURF, parsing URF from RDF/XML, creating a Java instance tree 
from URF, generating TURF from URF, generating URF from a Java instance 
tree, and manipulating URF in-memory using a simple but comprehensive 
API. This is not a set of hacks, but robust, thread-safe, 
fully-commented production code. The source code can be retrieved from 
the Subversion repository below, with corresponding online API 
documentation. The Guise(TM) development library is distributed with the 
URF library already compiled.

Source: https://svn.globalmentor.com/java/src/com/garretwilson/urf/
API: 
http://www.guiseframework.com/api/com/garretwilson/urf/package-summary.html
Library: http://www.guiseframework.com/com.guiseframework-unlicensed.jar

A few highlights from the URF specification:

* Everything in URF is a resource---even a string, a character, an 
integer, a real, a boolean, a date, or a regular expression.
* There are all the data types you need, including binary, sets, lists, 
maps, date time, language, and even UTC offset.
* Resources can have scoped properties that are contextual, making 
complex values an easy task.
* Resource properties can be ordered (solving the vCard name problem, 
among many others).
* Say good-bye to untyped strings. URF provides classes covering 
resource with existing string-based types(such as the built-in language 
class, which uses RFC 4646 language tags, e.g. «"en-US"(urf.Language)»), 
as well as an enum facility for creating your own such classes.
* A resource can be represented in TURF the same regardless of its context.
* Symbols in TURF have the meanings you've come to expect: <> is a URI, 
"" is a string, # is a number, [] is a list, {} is a set, // is a 
regular expression, and = assigns properties. One of many TURF 
innovations: «URI» indicates the resource identified by the URI <URI>.
* There's even support for programming language initializers.

A little background: I've long been an advocate of RDF. On the Open 
eBook Forum as early as 1999-04-27, before I fully understood RDF, I was 
encouraging Microsoft to use RDF for OEBF metadata. Later I created an 
RDF-based packaging format and led a long (but unsuccessful) campaign to 
get it into the OEB Publication Structure. (This format, XPackage, does 
appear in the RDF Primer, however.) One of my last OEBF discussions was 
an OEBF member (who is now a member of semantic-web) trying to convince 
him that RDF would be better than XML Schema as a basis for OEB. I 
advocated the conversion of vCard to RDF, and even helped edit the new 
W3C vCard RDF specification. I've created several RDF ontologies, 
including MAQRO and PLOOP. I had based the configuration files of my 
Guise(TM) Internet application framework on RDF, and my latest 
unannounced Internet project was using RDF at its very core.

As I've worked with RDF over the years, numerous problems with RDF have 
come to light, however. These include:

* A huge disparity between how resources and literals are represented by 
the framework.
* Redundant semantics (e.g. string-typed literals and plain literals 
with no language tags; rdf:type and the typed literal datatype).
* An inability to represent property values that may appear multiple 
times but for which order is important without resorting to list-like 
classes.
* No way to represent values only valid in certain contexts. (The plain 
literal language tag is an exception, but is hard-coded into the 
framework for one special case.)
* A lack of rigorous definitions for namespaces and namespace URI 
formation, leading to namespace URIs with ending fragment identifiers, 
as well as some resource URIs for which the namespace URI cannot be 
determined algorithmically.
* A horribly inadequate high-profile serialization format, RDF/XML 
(although admittedly there are alternatives).

So I have provided my own solution, fixing RDF's problems and updating 
vCard all in one go. URF, together with its default representation 
format, Text URF (TURF), it is a better RDF, data-oriented XML, and JSON 
all in one package. I've already converted Guise(TM) to use URF, and 
it's refreshingly elegant and consistent. (The online URF processing 
demo above uses Guise.)

Here's just a quick example of URF encoded in TURF:

*declare and label the example and foaf namespaces*
|example|<http://example.com/example>,
|foaf|<http://xmlns.com/foaf/0.1/>,
*describe a FOAF person identified by the URI 
<http://example.com/example#janedoe>*
example.janedoe(foaf.Person):
  example.name="Jane Doe",
  example.birthday=@1980-01-01,
  example.salary=#1000000:
    example.currency~«"usd"(example.Currency)»
  ;
;

The above is semantically identical to the following long-form TURF 
without comments:

«http://example.com/example#janedoe»:
  «http://www.urf.name/urf#type»=«http://xmlns.com/foaf/0.1/Person»,
  
«http://example.com/example#name»=«info:lexical/http%3A%2F%2Furf.name%2Furf%23String#Jane%20Doe»,
  
«http://example.com/example#birthday»=«info:lexical/http%3A%2F%2Furf.name%2Furf%23Date#1980-01-01»,
  
«http://example.com/example#salary»=«info:lexical/http%3A%2F%2Furf.name%2Furf%23Integer#1000000»:
    
«http://example.com/example#currency»~«info:lexical/http%3A%2F%2Fexample.com%2Fexample%23Currency#usd»
  ;
;

And for comparison with RDF, here are two sets of identical information, 
first in RDF/XML and then in TURF. (Paste in the information at 
http://www.guiseframework.com/demo/urfprocess and see for yourself.)

<?xml version="1.0"?>
<!DOCTYPE rdf:RDF [<!ENTITY xsd "http://www.w3.org/2001/XMLSchema#">]>
<rdf:RDF
  xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
  xmlns:dc="http://purl.org/dc/elements/1.1/"
  xmlns:example="http://example.com/example#"
  xmlns:foaf="http://xmlns.com/foaf/0.1/"
  xmlns:xhtml="http://www.w3.org/1999/xhtml"
 >
  <foaf:Person rdf:about="http://example.com/example#janedoe">
    <foaf:nick xml:lang="pt-BR">Janinha</foaf:nick>
    <example:age rdf:datatype="&xsd;integer">23</example:age>
    <example:birthdate 
rdf:datatype="&xsd;date">1980-04-05</example:birthdate>
    <example:motto rdf:parseType="Literal">Do it. Do it 
<xhtml:em>right</xhtml:em>.</example:motto>
    <example:favoriteSites rdf:parseType="Collection">
      <rdf:Description rdf:about="http://www.globalmentor.com/"/>
      <rdf:Description rdf:about="http://www.garretwilson.com/"/>
    </example:favoriteSites>
    <example:possibleVacationDestinations>
      <rdf:Alt>
        <rdf:li>Paris</rdf:li>
        <rdf:li>Rome</rdf:li>
      </rdf:Alt>
    </example:possibleVacationDestinations>
  </foaf:Person>
</rdf:RDF>

|content|<http://urf.name/content>,
|dc|<http://purl.org/dc/elements/1.1/>,
|example|<http://example.com/example>,
|foaf|<http://xmlns.com/foaf/0.1/>,
|urf|<http://urf.name/urf>,
example.janedoe(foaf.Person):
  example.age=#23,
  example.birthdate=@1980-04-05,
  example.favoriteSites=
  [
    «http://www.globalmentor.com/»,
    «http://www.garretwilson.com/»
  ],
  example.motto="Do it. Do it <xhtml:em 
xmlns:xhtml=\"http://www.w3.org/1999/xhtml\">right</xhtml:em>.":
    
content.type~«"text/xml-external-parsed-entity/xml-external-parsed-entity"(urf.MediaType)»
  ;,
  example.possibleVacationDestinations=
  {
    "Paris",
    "Rome"
  },
  nick="Janinha":
    dc.language~«"pt-BR"(urf.Language)»
  ;
;

If there are any questions or comments; or if you find problems in the 
specification, code, or online processor, let me know.

Sincerely,

Garret

Received on Tuesday, 16 October 2007 12:18:28 UTC