<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:cf="http://www.microsoft.com/schemas/rss/core/2005" xmlns:dct="http://purl.org/dc/terms" xmlns:sbe="tag:djpowell.net,2005:sbe-ns" xml:lang="en-GB">
  <id>tag:djpowell.net,2005:sbe/eq7tp5lv</id>
  <link rel="alternate" type="text/html" href="index.html" />
  <link rel="self" type="text/html" href="http://djpowell.net/blog/feed.xml" />
  <generator uri="http://djpowell.net/simpleblogedit" version="0.1">Simple Blog Edit</generator>
  <title>djpowell.net</title>
  <author>
    <name>David Powell</name>
  </author>
  <dct:created>2006-07-29T10:09:43Z</dct:created>
  <sbe:revision>1</sbe:revision>
  <updated>2008-03-09T18:31:57Z</updated>
  <it_should_have_been_part_of_atom:modified xmlns:it_should_have_been_part_of_atom="http://purl.org/dc/terms">2008-03-09T18:32:00Z</it_should_have_been_part_of_atom:modified>
  <subtitle>The Web, RDF, and other stuff</subtitle>
  <cf:listinfo>
    <cf:sort ns="http://www.w3.org/2005/Atom" element="updated" label="Updated Date" data-type="text" />
    <cf:sort ns="http://purl.org/dc/terms" element="modified" label="Modification Date" data-type="text" />
    <cf:sort element="title" label="Title" data-type="text" />
    <cf:group element="category" label="Category" data-type="text" />
  </cf:listinfo>
  <entry xml:lang="en-GB">
    <id>tag:djpowell.net,2005:sbe/eq7tp5lv/Namespace-Splitter-for-GRDDL</id>
    <link rel="alternate" type="text/html" href="entries/Namespace-Splitter-for-GRDDL.html" />
    <title>Namespace Splitter for GRDDL</title>
    <dct:title>Namespace-Splitter-for-GRDDL</dct:title>
    <category term="RDF" />
    <category term="GRDDL" />
    <category term="XSLT" />
    <sbe:revision>3</sbe:revision>
    <updated>2007-03-05T18:48:35Z</updated>
    <dct:modified>2008-03-09T18:31:58Z</dct:modified>
    <summary>An XSLT transform for splitting RDF URIs into valid namespaces and
    element names, with full support for IRIs.  This should be useful
    for GRDDL transforms where arbitary predicates need to be
    converted to RDF/XML property elements.</summary>
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p>
          <i>UPDATED 2007-03-05</i>
          - changed URLs
        </p>
        <p>
          <i>UPDATED 2007-02-24</i>
          - fixed extenders and combiners
        </p>
        <p>RDF/XML requires predicates to be represented as a namespaced
	XML element or attribute.  This requires the predicate IRI to
	be split at an arbitary place into a namespace URI and an XML
	NCName.  The problem is that the predicate can actually be an
	IRI; and the namespace IRI and local-name must both be valid.
	This requires the position to be chosen carefully.</p>
        <p>
          This transform implements the algorithm to split an IRI in pure
	XSLT 1.0:
          <a href="http://djpowell.net/schemas/treetriples/1/xslt/splitns.xsl">http://djpowell.net/schemas/treetriples/1/xslt/splitns.xsl</a>
          .
	WARNING - this transform contains a large table of Unicode
	characters which may take a long time to render in your
	browser or editor.  Also note that the transform is encoded in
	UTF-16.
        </p>
        <p>
          Also provided are some test cases which will run in your
	browser.  (Don't worry, the transform loads quickly when called
	by a client, it is just rendering it that is slow).  The
          <a href="http://djpowell.net/schemas/treetriples/1/xslt/splitns-test.xml">test
	cases are here</a>
          , and are implemented using this
          <a href="http://djpowell.net/schemas/treetriples/1/xslt/splitns-test.xsl">test
	stylesheet</a>
          .
        </p>
        <p>
          This transform should be very useful for
          <a href="http://www.w3.org/TR/grddl/">GRDDL</a>
          transforms.
        </p>
      </div>
    </content>
  </entry>
  <entry xml:lang="en-GB">
    <id>tag:djpowell.net,2005:sbe/eq7tp5lv/New-RDF-syntax-abbreviations</id>
    <link rel="alternate" type="text/html" href="entries/New-RDF-syntax-abbreviations.html" />
    <title>New RDF syntax: abbreviations</title>
    <dct:title>New-RDF-syntax-abbreviations</dct:title>
    <sbe:revision>1</sbe:revision>
    <category term="RDF" />
    <category term="TreeTriples" />
    <updated>2006-11-29T19:55:41Z</updated>
    <dct:modified>2008-03-09T18:31:58Z</dct:modified>
    <summary>RDF/XML uses Namespaces to abbreviate URIs.  We need an alternative.</summary>
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <h3>Triple abbreviations</h3>
        <p>
          Turtle has the ability to abbreviate triples by omitting
        duplicate subjects and subject/predicate pairs.  This has the
        advantages of:
          <ul>
            <li>Saving space</li>
            <li>Reducing the number of URIs that humans have to read</li>
            <li>Encouraging related properties to be grouped together</li>
          </ul>
        </p>
        <h3>URI abbreviations</h3>
        <p>Long, duplicated, URIs are so common in RDF that a
        human-readable RDF syntax needs some capability to abbreviate
        URI prefixes.</p>
        <p>I’m ruling out the use of QNames in content, so one option is
        to invent an application-level syntax for declaring prefixes.</p>
        <p>But, why add complexity when XML already natively supports
        ENTITY declarations via an internal DTD subset...  So, the
        proposal is to encourage the use of entities where
        abbreviation is required.</p>
      </div>
    </content>
  </entry>
  <entry xml:lang="en-GB">
    <id>tag:djpowell.net,2005:sbe/eq7tp5lv/New-RDF-syntax-newsyntax2rdf-XSLT-and-updated-schema</id>
    <link rel="alternate" type="text/html" href="entries/New-RDF-syntax-newsyntax2rdf-XSLT-and-updated-schema.html" />
    <title>New RDF syntax: newsyntax2rdf XSLT, and updated schema</title>
    <dct:title>New-RDF-syntax-newsyntax2rdf-XSLT-and-updated-schema</dct:title>
    <sbe:revision>1</sbe:revision>
    <category term="RDF" />
    <category term="TreeTriples" />
    <updated>2006-12-10T23:01:48Z</updated>
    <dct:modified>2008-03-09T18:31:58Z</dct:modified>
    <summary>I’ve been doing some more work on my proposed alternative RDF
    syntax.  I’ve made quite a few changes to the schema, and finally
    implmented an XSLT that converts from the new format to
    RDF/XML.</summary>
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p>I’ve been doing some more work on my proposed alternative RDF
        syntax.  I’ve made quite a few changes to the schema, and
        finally implmented an XSLT that converts from the new format
        to RDF/XML.</p>
        <p>I’m also working on a process for converting from an RDF graph
        to the new syntax.  Obviously, I can’t do this in XSLT (If
        RDF/XML was XSLT processable, I wouldn’t be doing this
        project!), so I’m implementing this process in Java using Jena
        at the moment.</p>
        <p>
          The changes to the schema aren’t all that interesting, but
        there is a reason behind most of them:
          <ul>
            <li>The regexps have been improved so that URIs are restricted
            to absolute RDF URI-Refs; nodeIds are restricted to "_:"
            followed by an NCName, restricted to the ASCII
            character-set.</li>
            <li>The container syntax has changed to use a fixed enum of
            container types.  This is to provide a more uniform
            representation for containers that have multiple
            rdf:types.  This still needs some work.</li>
            <li>The syntax for unasserted reified statements was broken
            before (it allowed multiple predicates and objects be
            nested beneath the single subject, which caused all of
            those statements to have the same stmtId).  It has now
            been improved by moving stmtId to the &lt;o&gt; tag, so that
            multiple statements can now be nested and still all have
            unique stmtIds.</li>
            <li>Indexes have been removed from container items.  I decided
            that this was too much of an edge case.  So, now, sparse
            lists and other funky lists, have to be written out
            long-hand.  I don’t think that this is too much of a
            disadvantage, because these funky lists would be hard to
            process using XSLT anyway.</li>
            <li>The id for collections has moved from the declaration
            itself, to a seperate listId attribute on each item.  I
            was going to add a listId anyway, so that the list nodes
            could be referenced, and if I’m doing this, it makes the
            id on the &lt;d&gt; element redundant because it serves the
            same purpose as the listId on the first element in the
            list.</li>
          </ul>
        </p>
        <p>
          All of the links are
          <a href="http://djpowell.net/schemas/treetriples/1/">here</a>
          .
        </p>
      </div>
    </content>
  </entry>
  <entry xml:lang="en-GB">
    <id>tag:djpowell.net,2005:sbe/eq7tp5lv/CVS-0-Vista-1</id>
    <link rel="alternate" type="text/html" href="entries/CVS-0-Vista-1.html" />
    <title>CVS 0 : Vista 1</title>
    <dct:title>CVS-0-Vista-1</dct:title>
    <category term="Vista" />
    <sbe:revision>1</sbe:revision>
    <updated>2007-02-24T09:32:51Z</updated>
    <dct:modified>2008-03-09T18:31:58Z</dct:modified>
    <summary>Vista’s “Previous versions” rocks!</summary>
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p>
          My
          <a href="http://djpowell.net/blog/entries/Namespace-Splitter-for-GRDDL.html">XSLT
	namespace splitter</a>
          originally didn’t support IRIs.  It was
	just a standard stylesheet encoded in UTF-8.  When I added IRI
	support, I changed the encoding to UTF-16 which reduced the
	file size significantly due to the large tables of far-eastern
	characters in the file.
        </p>
        <p>It was all working fine, I was ready to upload it to the web,
	I checked it into CVS first.  Oops.  Do you see the
	mistake?...</p>
        <p>I’d forgot to change the filetype to Text/Unicode.  CVS
	completely mangled both the version in the repository and my
	working copy.  It didn’t just screw up the encoding - it
	deleted random chunks of the file too.</p>
        <p>
          Luckily Vista’s “Previous Versions”, based on Volume Shadow
	Copy Service, takes a snapshot of your harddrive on a regular
	basis, and I was able to just right-click the file, and choose
	an earlier version of the file to recover.  Interestingly,
	these snapshots appear to have their own browsable UNC paths,
	eg:
          <code>\\localhost\C$\@GMT-2007.02.24-08.58.34\projects\newrdfsyntax</code>
          .  Cool.
        </p>
      </div>
    </content>
  </entry>
  <entry xml:lang="en-GB">
    <id>tag:djpowell.net,2005:sbe/eq7tp5lv/First-Post</id>
    <link rel="alternate" type="text/html" href="entries/First-Post.html" />
    <title>First Post!</title>
    <dct:title>First-Post</dct:title>
    <sbe:revision>1</sbe:revision>
    <updated>2006-07-30T17:26:57Z</updated>
    <dct:modified>2008-03-09T18:31:58Z</dct:modified>
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p>It’s about time I got a blog for tech stuff.  There’s been a
        bit of a delay in setting this up, cause being a programmer in
        a fit of not-invented-here syndrome, I had to write my own
        blog publishing software first.</p>
        <p>The technologies I’m interested in at the moment are: The Web,
        RDF, XML, Java, and synchronization, so that’s what I’ll be
        mostly writing about.</p>
      </div>
    </content>
  </entry>
  <entry xml:lang="en-GB">
    <id>tag:djpowell.net,2005:sbe/eq7tp5lv/New-RDF-syntax-xml-lang-and-xml-base</id>
    <link rel="alternate" type="text/html" href="entries/New-RDF-syntax-xml-lang-and-xml-base.html" />
    <title>New RDF syntax: xml:lang and xml:base</title>
    <dct:title>New-RDF-syntax-xml-lang-and-xml-base</dct:title>
    <sbe:revision>1</sbe:revision>
    <category term="RDF" />
    <category term="TreeTriples" />
    <updated>2006-11-29T22:14:05Z</updated>
    <dct:modified>2008-03-09T18:31:58Z</dct:modified>
    <summary>Unresolved issue: What to do about xml:base and xml:lang</summary>
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p>Currently the schema only supports xml:lang on the the
        &lt;o&gt; element.  The alternative is to support xml:lang
        everywhere, to allow it to be inherited, but to simplify
        processing, I’m avoiding this at the moment.</p>
        <p>
          xml:base is not supported anywhere in the schema.  I think
        that this might be the right decision.  xml:base is tricky to
        support in XSLT 1.0 (although I have
          <a href="http://djpowell.net/atomrdf/0.1/files/baselangutils.xsl">implemented
        support</a>
          for it as part of my
          <a href="http://djpowell.net/atomrdf/0.1/">Atom/RDF</a>
          project).
        </p>
      </div>
    </content>
  </entry>
  <entry xml:lang="en-GB">
    <id>tag:djpowell.net,2005:sbe/eq7tp5lv/A-new-RDF-syntax</id>
    <link rel="alternate" type="text/html" href="entries/A-new-RDF-syntax.html" />
    <title>A new RDF syntax</title>
    <dct:title>A-new-RDF-syntax</dct:title>
    <sbe:revision>2</sbe:revision>
    <category term="RDF" />
    <category term="TreeTriples" />
    <updated>2006-11-29T19:55:44Z</updated>
    <dct:modified>2008-03-09T18:31:58Z</dct:modified>
    <summary>I’ve started working on a new XML-based syntax for RDF, and
    I’ll be making a few posts here to chart its progress.</summary>
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <h2>What’s wrong with RDF/XML?</h2>
        <p>RDF is a very unusual XML vocabulary.  It starts from the
        premise that graphs are a superset of trees, and then tries to
        get as much of the graph model into XML’s hierarchical
        structure as possible, then uses hyperlinks (via rdf:ID,
        rdf:resource, etc), to handle the rest.  Whilst this seems a
        reasonable approach for humans, it doesn’t work so well for
        machines.  It leads to a syntax so variable that it’s
        superficial resemblance to XML is more of a hazard than a
        benefit to human-authorability.  Admittedly human-authored
        RDF/XML is one of most concise, and human-readable XML
        syntaxes possible for RDF, but the same can’t be said about
        machine-readability.  Whilst an XML syntax such as Atom is
        simple to process using an off-the-shelf XML parser, and a
        small amount of code; an RDF/XML parser is an unbelieveably
        complicated piece of software.</p>
        <p>Rather than use a single tag to represent a resource, with an
        attribute to represent the URL or id; RDF/XML embeds the URI
        or id in the tag name itself by (ab?)using XML Namespaces.
        This might be concise, but it is not particularly compatible
        with general purpose tools such as XML validators.  Namespaces
        weren’t designed as a generic URI compression technology, and
        it shows.  Due to the limitations in the character-model used
        by localNames, there exist many URIs that can’t be decomposed
        into an nsUri/localName pair, and there is no way to write
        predicates in RDF/XML other than as nsUri/localName pairs.
        This makes it impossible to serialise graphs containing
        predicates that end in ‘/’ or ‘#’ to RDF/XML, even though they
        are valid in the RDF model, and can be serialised to other
        syntaxes.</p>
        <p>For me though, the biggest frustration with RDF/XML stems from
        the fact that despite being an XML syntax, it is impossible to
        use XML tools such as XSLT to process it.  I want an XML
        syntax that is processable by humans, dedicated RDF tools, and
        generic XML technologies such as XSLT.</p>
        <h2>Do we need to base the syntax on XML?</h2>
        <p>
          <a href="http://www.dajobe.org/2004/01/turtle/">Turtle</a>
          is
        a great RDF syntax that isn’t XML-based.  It is probably more
        human-readable than the syntax that I am currently working on,
        but I still think that that there is a need for a decent,
        human-readable XML-based syntax.
        </p>
        <p>
          XML isn’t without issues:
          <dl>
            <dt>Verbosity</dt>
            <dd>The Turtle syntax is designed for humans to read, XML is
            designed for machines to read.  No XML syntax is ever
            going to approach the aesthetics of Turtle.</dd>
            <dt>Poor support for inline binary content</dt>
            <dd>However, this isn’t such a big deal for RDF, as the RDF
            model also has poor support for binary content.</dd>
            <dt>Problematic MIME-types</dt>
            <dd>The interactions between XML, RFC3023, the MIME RFCs, and
            HTTPs almost-but-not-quite-MIME encapsulation are well-known.</dd>
          </dl>
        </p>
        <p>
          Despite these issues however, XML has such a massively
        deployed infrastructure, and there are lots of good reasons
        for prefering an XML based syntax for RDF:
          <dl>
            <dt>Widely deployed XML parsers: SAX, DOM, StaX, etc...</dt>
            <dd>An XML base makes it easy to write parsers for simple
            XML-based RDF syntaxes.  A variety of parser models are
            available.</dd>
            <dt>XSLT, XPath, XQuery, XInclude and XProc</dt>
            <dd>Technologies such as XSLT allow not only the data to be
            easily portable across platforms, but the code as well.
            And the performance of XSLT is good enough for Microsoft
            to use it for the RSS/Atom normalization in Windows/IE7’s
            Feed Platform.</dd>
            <dt>Validation</dt>
            <dd>DTDs may be pretty feeble, and XSD may be a monster, but
            RelaxNG is great.  Validation is important, and validation
            technologies for XML are prevalent.</dd>
          </dl>
        </p>
        <h2>Is it worth making a new syntax?</h2>
        <p>
          When the subject of Binary XML gets raised, it usually gets
        some push-back.  This is probably because, all that XML
        standardizes is a syntax; once you diverge from the XML 1.0
        serialisation, there isn’t much left
          <i>(OK, there is the the
        Infoset, but it’s not a very usable application model)</i>
          .
        With RDF however, because all interoperability is at the RDF
        model layer, and because the model is so simple, it is
        feasable to use different syntaxes.  Although RDF/XML is the
        only syntax blessed by the W3C Recommendations; other syntaxes
        such as
          <a href="http://www.w3.org/TR/rdf-testcases/#ntriples">N-Triples</a>
          ,
          <a href="http://www.w3.org/DesignIssues/Notation3">N3</a>
          ,
          <a href="http://www.dajobe.org/2004/01/turtle/">Turtle</a>
          ,
          <a href="http://swdev.nokia.com/trix/trix.html">TriX</a>
          ,
          <a href="http://www.dajobe.org/talks/xmleurope2004/slide12-0.html">RXR</a>
          ,
        and
          <a href="http://www.schemaweb.info/schemas/TriplesML.xsd">TriplesML</a>
          exist without seriously fragmenting interoperability.  Of
        course part of the reason why these other syntaxes exist is
        because of the serious problems with RDF/XML.
        </p>
        <hr />
        <p>
          Anyway, I’ve got a RelaxNG schema, some XSLTs, and
        documentation of the design decisions, which I will post here
        later, but in the meantime, here is a quick teaser — the feed
        from the
          <a href="http://web.resource.org/rss/1.0/spec">RSS
        1.0</a>
          <a href="http://web.resource.org/rss/1.0/spec#s7_1.0">examples</a>
          ,
        converted to my proposed syntax:
        </p>
        <div style="padding: 1ex; background: silver; color: black">
          <pre>&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;!DOCTYPE rdf [
&lt;!ENTITY rdf "http://www.w3.org/1999/02/22-rdf-syntax-ns#"&gt;
&lt;!ENTITY rss "http://purl.org/rss/1.0/"&gt;
]&gt;

&lt;rdf xmlns="http://djpowell.net/schemas/treetriples/1/"&gt;

  &lt;s id="http://www.xml.com/xml/news.rss"&gt;
    &lt;p id="&amp;rss;link"&gt;
      &lt;o&gt;http://xml.com/pub&lt;/o&gt;
    &lt;/p&gt;
    &lt;p id="&amp;rss;title"&gt;
      &lt;o&gt;XML.com&lt;/o&gt;
    &lt;/p&gt;
    &lt;p id="&amp;rss;items"&gt;
      &lt;o id="_:b0" /&gt;
    &lt;/p&gt;
    &lt;p id="&amp;rss;description"&gt;
      &lt;o&gt;XML.com features a rich mix of information and services 
      for the XML community.&lt;/o&gt;
    &lt;/p&gt;
    &lt;p id="&amp;rss;textinput"&gt;
      &lt;o id="http://search.xml.com" /&gt;
    &lt;/p&gt;
    &lt;p id="&amp;rdf;type"&gt;
      &lt;o id="&amp;rss;channel" /&gt;
    &lt;/p&gt;
    &lt;p id="&amp;rss;image"&gt;
      &lt;o id="http://xml.com/universal/images/xml_tiny.gif" /&gt;
    &lt;/p&gt;
  &lt;/s&gt;

  &lt;s id="http://xml.com/pub/2000/08/09/xslt/xslt.html"&gt;
    &lt;p id="&amp;rss;link"&gt;
      &lt;o&gt;http://xml.com/pub/2000/08/09/xslt/xslt.html&lt;/o&gt;
    &lt;/p&gt;
    &lt;p id="&amp;rss;title"&gt;
      &lt;o&gt;Processing Inclusions with XSLT&lt;/o&gt;
    &lt;/p&gt;
    &lt;p id="&amp;rss;description"&gt;
      &lt;o&gt;Processing document inclusions with general XML tools can be 
     problematic. This article proposes a way of preserving inclusion 
     information through SAX-based processing.&lt;/o&gt;
    &lt;/p&gt;
    &lt;p id="&amp;rdf;type"&gt;
      &lt;o id="&amp;rss;item" /&gt;
    &lt;/p&gt;
  &lt;/s&gt;

  &lt;s id="http://xml.com/pub/2000/08/09/rdfdb/index.html"&gt;
    &lt;p id="&amp;rss;link"&gt;
      &lt;o&gt;http://xml.com/pub/2000/08/09/rdfdb/index.html&lt;/o&gt;
    &lt;/p&gt;
    &lt;p id="&amp;rss;title"&gt;
      &lt;o&gt;Putting RDF to Work&lt;/o&gt;
    &lt;/p&gt;
    &lt;p id="&amp;rss;description"&gt;
      &lt;o&gt;Tool and API support for the Resource Description Framework 
     is slowly coming of age. Edd Dumbill takes a look at RDFDB, 
     one of the most exciting new RDF toolkits.&lt;/o&gt;
    &lt;/p&gt;
    &lt;p id="&amp;rdf;type"&gt;
      &lt;o id="&amp;rss;item" /&gt;
    &lt;/p&gt;
  &lt;/s&gt;

  &lt;s id="http://xml.com/universal/images/xml_tiny.gif"&gt;
    &lt;p id="&amp;rss;link"&gt;
      &lt;o&gt;http://www.xml.com&lt;/o&gt;
    &lt;/p&gt;
    &lt;p id="&amp;rss;title"&gt;
      &lt;o&gt;XML.com&lt;/o&gt;
    &lt;/p&gt;
    &lt;p id="&amp;rss;url"&gt;
      &lt;o&gt;http://xml.com/universal/images/xml_tiny.gif&lt;/o&gt;
    &lt;/p&gt;
    &lt;p id="&amp;rdf;type"&gt;
      &lt;o id="&amp;rss;image" /&gt;
    &lt;/p&gt;
  &lt;/s&gt;

  &lt;s id="http://search.xml.com"&gt;
    &lt;p id="&amp;rss;link"&gt;
      &lt;o&gt;http://search.xml.com&lt;/o&gt;
    &lt;/p&gt;
    &lt;p id="&amp;rss;title"&gt;
      &lt;o&gt;Search XML.com&lt;/o&gt;
    &lt;/p&gt;
    &lt;p id="&amp;rss;description"&gt;
      &lt;o&gt;Search XML.com's XML collection&lt;/o&gt;
    &lt;/p&gt;
    &lt;p id="&amp;rdf;type"&gt;
      &lt;o id="&amp;rss;textinput" /&gt;
    &lt;/p&gt;
    &lt;p id="&amp;rss;name"&gt;
      &lt;o&gt;s&lt;/o&gt;
    &lt;/p&gt;
  &lt;/s&gt;

  &lt;d parse="seq" id="_:b0"&gt;
    &lt;o id="http://xml.com/pub/2000/08/09/rdfdb/index.html" /&gt;
    &lt;o id="http://xml.com/pub/2000/08/09/xslt/xslt.html" /&gt;
  &lt;/d&gt;

&lt;/rdf&gt;</pre>
        </div>
        <a href="http://djpowell.net/schemas/treetriples/1/examples/feed-t2.xml">[Download Example]</a>
      </div>
    </content>
  </entry>
  <entry xml:lang="en-GB">
    <id>tag:djpowell.net,2005:sbe/eq7tp5lv/New-RDF-syntax-The-Schema</id>
    <link rel="alternate" type="text/html" href="entries/New-RDF-syntax-The-Schema.html" />
    <title>New RDF syntax: The Schema</title>
    <dct:title>New-RDF-syntax-The-Schema</dct:title>
    <sbe:revision>2</sbe:revision>
    <category term="RDF" />
    <category term="TreeTriples" />
    <updated>2007-03-05T19:07:09Z</updated>
    <dct:modified>2008-03-09T18:31:58Z</dct:modified>
    <summary>More details about my proposed RDF syntax</summary>
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p>
          I’ve put some links to related content at the Namespace URI:
          <a href="http://djpowell.net/schemas/treetriples/1/">http://djpowell.net/schemas/treetriples/1/</a>
        </p>
        <div style="padding: 1ex; background: silver; color: black">
          <pre># RELAX NG Compact Syntax Grammar for proposed RDF/TreeTriples syntax
# EXPERIMENTAL!
#
# David Powell - 2006-11-24

default namespace = "http://djpowell.net/schemas/treetriples/1/"

# Common attributes

start = rdf
## Root rdf element contains a list of triples and declarations.
rdf =
   element rdf {
      s* &amp; d* &amp; dstmt?
   }


## A triple is declared by creating an 's' element for the triple's
## subject, and nesting 'p' and 'o' elements inside for the predicate
## and object of the triple.  Multiple 'p' and 'o' elements can be
## nested, effectively abbreviating the common case of many statements
## with duplicate subjects, or subject/predicate pairs.
## Triples sharing the same subject MUST be represented with a single
## 's' element.
s =
   element s {
      attribute id { id },
      p+
   }

## A predicate for the parent node's subject.  Triples sharing the same
## subject and predicate MUST be represented by a single nested 's' and
## 'p' element.
p =
   element p {
       attribute id { uri },
       o+
   }

## An object which forms a triple with the grandparent node's subject, and
## the parent node's predicate.
o =
    element o {
      ## A statement id can be used to create an rdf:Statement structure
      ## corresponding to an asserted statement.
      attribute stmtId { id }?,
      (
          (attribute id { id }, nocontent) |
          literal |
          parseXml
       )
    }


## Literals can be typed, or have a language.  For XML literals, the special 
## special 'parseXml' form MUST be used.
literal = 
    (
        attribute xml:lang { lang }? |
        attribute datatype { uri }?
    ),
    text

lang =
    xsd:language

## ids may represent nodeIds for bnodes, or URIs for resources.
id =
    nodeId | uri

## A nodeId is a document-scoped label for a bNode.  nodeIds must
## start with the characters "_:", followed by an NCName, restricted to 
## ASCII characters
nodeId =
    xsd:Name { pattern = "_:[a-zA-Z_][a-zA-Z0-9.\-_]*" }

## An absolute RDF URI.  URIs will never start with the string "_:", which
## is reserved for bNodes.
## MUST be an absolute IRI..
## Leading and trailing spaces MUST NOT be present.
uri =
    xsd:anyURI
	
## Represents an XML literal.  The 'o' element and its attributes are not
## part of the content.  The contained elements are expected to follow the
## same rules as RDF/XML XML literals.
parseXml = 
   attribute parse { string "xml" },
   (text|anyElement)*

anyElement =
   element * {
      (attribute * { text }
       | text
       | anyElement)*
   }

nocontent = string ""

## Declarations provide a sane way of declaring lists, containers,
## and un-asserted, reified statements.
d = 
    element d {
       parseList |
       parseContainer
    }

## Only one un-asserted reified statement block is allowed, but it can
## contain many statements.
dstmt =
    element d {
       parseStatement
    }

## Represents an RDF collection.  The 'id' of the collection may be represented
## by a 'listId' attribute on the first member 'o' element.
## empty collections are supported.
parseList = 
   attribute parse { string "list" },
   collectedo*

## Represents an RDF container.  The URI represents the container type, which
## is assumed to be a subtype of rdfs:Container.  The attribute value:
## container indicates that none of the explicit types are stated.
## empty containers must use SPO syntax.
parseContainer = 
   attribute parse { string "seq" | string "alt" | string "bag" | string "container" },
   attribute id { id },
   containedo+

## Represents un-asserted, reified statements.
parseStatement = 
   attribute parse { string "statement" },
   s+

## NOTE there is no special support for reified containers, collections, or statements.

## Objects in containers can't contain a stmtId.
containedo =
    element o {
      (
          (attribute id { id }, nocontent) |
          literal |
          parseXml
       )
    }

## Objects in collections can't contain a stmtId, but can contain a listId to
## allow the list nodes themselves to be referenced.
collectedo =
    element o {
      attribute listId { id }?,
      (
          (attribute id { id }, nocontent) |
          literal |
          parseXml
       )
    }</pre>
        </div>
        <a href="http://djpowell.net/schemas/treetriples/1/rdftt.rnc">[Download RelaxNG Schema]</a>
      </div>
    </content>
  </entry>
  <entry xml:lang="en-GB">
    <id>tag:djpowell.net,2005:sbe/eq7tp5lv/TreeTriples</id>
    <link rel="alternate" type="text/html" href="entries/TreeTriples.html" />
    <title>TreeTriples</title>
    <dct:title>TreeTriples</dct:title>
    <sbe:revision>1</sbe:revision>
    <updated>2008-03-09T15:29:32Z</updated>
    <dct:modified>2008-03-09T18:31:58Z</dct:modified>
    <category term="RDF" />
    <category term="TreeTriples" />
    <summary>My RDF syntax has a name!</summary>
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p>
          Ok, I finally decided to give ‘newrdfsyntax’ a name.  It’s now
	called
          <a href="http://djpowell.net/schemas/treetriples/1/">‘treetriples’</a>
          .
	I also took the opportunity to change the URLs on the site,
	and to change the namespace to
          <a href="http://djpowell.net/schemas/treetriples/1/">http://djpowell.net/schemas/treetriples/1/</a>
          .
        </p>
        <p>The rationale, and spec isn’t too far behind either.</p>
        <p>
          Thanks to the include support that I added to my strange batch
	blog publishing thing, and thanks to Vista’s symlinks, I have
	changed the entries that contain
          <a href="http://djpowell.net/blog/entries/A-new-RDF-syntax.html">inline
	examples</a>
          and
          <a href="http://djpowell.net/blog/entries/New-RDF-syntax-The-Schema.html">schemas</a>
          to include the latest versions from CVS.  Cool.
        </p>
        <p>I tried using hard-links to organize web publishing on Windows
	XP, but they don't work so well, cause any app that implements
	‘save’ by moving a temp file over the original breaks the
	hard-link.</p>
      </div>
    </content>
  </entry>
</feed>

