Examples of RDDL in RDF

The following are some example files using different models:

Example files
RDF/XML RDF/XML (2) RDF/N3
Record-like model ex1.xml ex1a.xml ex1.n3
Intermediate model ex2.xml ex2.n3
Natural model ex3.xml ex3.n3

0. Transcription of the current RDDL

In the current RDDL format, the title and prose are not properties of the style sheet (schema, etc), they are propoerties of the relation bteween the namespace and t2h style sheet. That relation has a "purpose" which defines what it is there for. That, modelled in RDF, looks like this:

<rdf:RDF xmlns="file:/devel/WWW/2002/11/rddl/whatever#"
    xmlns:rddl="file:/devel/WWW/2002/11/rddl/whatever#"
    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
    xmlns:xmls="file:/devel/WWW/2002/11/rddl/whgatever2#">


    <Namespace rdf:about="">
        <resource>
            <purpose rdf:resource="whatver#purpose">
            <nature rdf:resource="whgatever2#Schema"/>
            <prose>Use this to validate this document</prose>
            <related rdf:resource="http://example.org/L.xsd"/>
            <title>Validate</title>
        </resource>
        <resource rdf:parseType="Resource">
            <purpose rdf:resource="whatever#presentation"/>
            <nature rdf:resource="whgatever2#CSSStyleSheet"/>
            <related rdf:resource="http://garish.example.com/L.css"/>
            <title>Color me pink</title>
        </resource>
    </Namespace>
</rdf:RDF>

The rdf: on the attributes is formally option but suggested. the first resource here and the second are written slightly differeently, using different RDF/XML

1. Very close to the current RDDL

When you say what sort of thing something is in RDF, instead of "pupose", you use rdf:type, for greater interoperability. When one property is rdf:type, there is a special format in which the type becomes a nested xml element, as in "validation", below. That is an option. you can can just put it in as a property, as in "presentation" below.

<rdf:RDF xmlns="file:/devel/WWW/2002/11/rddl/whatever#"
    xmlns:log="http://www.w3.org/2000/10/swap/log#"
    xmlns:rddl="file:/devel/WWW/2002/11/rddl/whatever#"
    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
    xmlns:xmls="file:/devel/WWW/2002/11/rddl/whgatever2#">


    <Namespace rdf:about="">
        <resource>
            <validation>
                <nature rdf:resource="whgatever2#Schema"/>
                <prose>Use this to validate this document</prose>
                <related rdf:resource="http://example.org/L.xsd"/>
                <title>Validate</title>
            </validation>
        </resource>
        <resource rdf:parseType="Resource">
            <rdf:type rdf:resource="whatever#presentation"/>
            <nature rdf:resource="whgatever2#CSSStyleSheet"/>
            <related rdf:resource="http://garish.example.com/L.css"/>
            <title>Color me pink</title>
        </resource>
    </Namespace>
</rdf:RDF>

The rdf: on the attributes is formally option but suggested. the first resource here and the second are written slightly differeently, using different RDF/XML styles. Here, "resource" is the connection betwen the namespace document and its supporting multiway RDDL resourtce.

An advantage with the above encoding is that it looks like a list of header fields, which people find easy to think about. A disadvantage is that the type field, while it is at least an RDF type (for exportability) in fact defines the relationship between the namespace and the resource, but that ain't how its wrote.

2. Using properties

This version pullsout the relationship between the namespace and the supporting documents as an RDF property..

You can clearly see that we have a validation and a presentation for this namespace.

<rdf:RDF xmlns="file:/devel/WWW/2002/11/rddl/whatever#"
    xmlns:log="http://www.w3.org/2000/10/swap/log#"
    xmlns:rddl="file:/devel/WWW/2002/11/rddl/whatever#"
    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
    xmlns:xmls="file:/devel/WWW/2002/11/rddl/whgatever2#">

    <Namespace rdf:about="">
        <presentation rdf:parseType="Resource">
            <nature rdf:resource="whgatever2#CSSStyleSheet"/>
            <related rdf:resource="http://garish.example.com/L.css"/>
            <title>Color me pink</title>
        </presentation>
        <validation rdf:parseType="Resource">
            <nature rdf:resource="whgatever2#Schema"/>
            <prose>Use this to validate this document</prose>
            <related rdf:resource="http://example.org/L.xsd"/>
            <title>Validate</title>
        </validation>
    </Namespace>
</rdf:RDF>

3. The more natural way to do this?

The following RDF uses a different model, and really conveys different information.

It makes the properties of the style sheet, fo example, properties of the style sheet itself, so that it is clear to everyone that that information can be reused in other contexts. However, that should only be done if that is what one means!

<rdf:RDF xmlns="file:/devel/WWW/2002/11/rddl/whatever#"
    xmlns:log="http://www.w3.org/2000/10/swap/log#"
    xmlns:rddl="file:/devel/WWW/2002/11/rddl/whatever#"
    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
    xmlns:xmls="file:/devel/WWW/2002/11/rddl/whgatever2#">

    <Namespace rdf:about="">
        <presentation rdf:resource="http://garish.example.com/L.css"/>
        <validation rdf:resource="http://example.org/L.xsd"/>
    </Namespace>

    <xmls:Schema rdf:about="http://example.org/L.xsd">
        <prose>Use this to validate this document</prose>
        <title>Validate</title>
    </xmls:Schema>

    <xmls:CSSStyleSheet rdf:about="http://garish.example.com/L.css">
        <title>Color me pink</title>
    </xmls:CSSStyleSheet>
</rdf:RDF>

timbl 2002/11/26