W3C home > Mailing lists > Public > semantic-web@w3.org > October 2007

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

From: Garret Wilson <garret@globalmentor.com>
Date: Tue, 16 Oct 2007 10:17:34 -0200
Message-ID: <4714ABDE.80502@globalmentor.com>
To: Semantic Web <semantic-web@w3.org>

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:


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


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/
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 
* 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*
*describe a FOAF person identified by the URI 
  example.name="Jane Doe",

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


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#">]>
  <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:motto rdf:parseType="Literal">Do it. Do it 
    <example:favoriteSites rdf:parseType="Collection">
      <rdf:Description rdf:about="http://www.globalmentor.com/"/>
      <rdf:Description rdf:about="http://www.garretwilson.com/"/>

  example.motto="Do it. Do it <xhtml:em 

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


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

This archive was generated by hypermail 2.4.0 : Tuesday, 5 July 2022 08:45:03 UTC