[tocml-list] TOCML in RDF example

Curtis Duhn curtis@duhn.com
Sun Feb 10 03:52:01 2002


Well, this is the most concise representation of our TOCML example that I
could come up with in RDF.  It's a little more verbose than I'd hoped, but it's
not too bad.

In this syntax, the TOCML namespace consists of three elements: Node,
Parent, and Children.  Node represents a single node in the hierarchy.
Its rdf:about attribute identifies the URL it describes.  The Parent
element points to the document that most appropriately serves as the
parent for this document, if one exists.  The Children element either
contains or points to the children of the enclosing Node.  For the actual
metadata, this example uses the Dublin core Title and Description
elements.

<?xml version="1.0"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
 xmlns:dc="http://purl.org/dc/elements/1.1/"
 xmlns="http://www.duhn.com/tocml/schema/">

    <Node rdf:about="http://www.duhn.com/tocml/">
        <dc:Title>TOCML</dc:Title>
        <dc:Description>Table of Contents Markup Language</dc:Description>
        <Parent rdf:resource="http://www.duhn.com/sitemap.toc"/>
        <Children rdf:ID="tocml"><rdf:Seq>
            <rdf:li><Node rdf:about="http://www.duhn.com/tocml/vision/">
                <dc:Title>Vision</dc:Title>
                <dc:Description>The motivation and vision for TOCML.
                </dc:Description>
            </Node></rdf:li>

            <rdf:li>
         <Node rdf:about="http://two.pairlist.net/mailman/listinfo/tocml-list">
                <dc:Title>Mailing list</dc:Title>
                <dc:Description>tocml-list registration and archives.
                </dc:Description>
            </Node></rdf:li>

            <rdf:li>
            <Node rdf:about="http://www.duhn.com/tocml/directory/">
                <dc:Title>Directory</dc:Title>
                <dc:Description>This refers to another file as a subfolder
                </dc:Description>
                <Children rdf:ID="directory"
                 rdf:resource="http://www.duhn.com/tocml/dir/sitemap.toc"/>
            </Node></rdf:li>

        </rdf:Seq></Children>
    </Node>
</rdf:RDF>

The above example takes advantage of some of the abbreviation
transformations available in RDF.  This allowed me to use the Node element
instead of RDF's Description element.  The semantically identical
canonical version of the above document looks like this:

<?xml version="1.0"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
 xmlns:dc="http://purl.org/dc/elements/1.1/"
 xmlns="http://www.duhn.com/tocml/schema/">

    <rdf:Description rdf:about="http://www.duhn.com/tocml/">
        <rdf:type rdf:resource="http://www.duhn.com/tocml/schema/Node"/>
        <dc:Title>TOCML</dc:Title>
        <dc:Description>Table of Contents Markup Language</dc:Description>
        <Parent rdf:resource="http://www.duhn.com/sitemap.toc"/>
        <Children rdf:ID="tocml"><rdf:Seq>
            <rdf:li><rdf:Description
                     rdf:about="http://www.duhn.com/tocml/vision/">
                <rdf:type rdf:resource="http://www.duhn.com/tocml/schema/Node"/>
                <dc:Title>Vision</dc:Title>
                <dc:Description>The motivation and vision for TOCML.
                </dc:Description>
            </rdf:Description></rdf:li>

            <rdf:li><rdf:Description
             rdf:about="http://two.pairlist.net/mailman/listinfo/tocml-list">
                <rdf:type
                 rdf:resource="http://www.duhn.com/tocml/schema/Node"/>
                <dc:Title>Mailing list</dc:Title>
                <dc:Description>tocml-list registration and archives.
                </dc:Description>
            </rdf:Description></rdf:li>

            <rdf:li><rdf:Description
                     rdf:about="http://www.duhn.com/tocml/directory/">
                <rdf:type rdf:resource="http://www.duhn.com/tocml/schema/Node"/>
                <dc:Title>Directory</dc:Title>
                <dc:Description>This refers to another file as a subfolder
                </dc:Description>
                <Children rdf:ID="directory"
                 rdf:resource="http://www.duhn.com/tocml/dir/sitemap.toc"/>
            </rdf:Description></rdf:li>

        </rdf:Seq></Children>
    </rdf:Description>
</rdf:RDF>

The next step will be to see how easily this extends to RSS.

Curtis Duhn
curtis@duhn.com