Archive for November, 2005

Nov 18 2005

Dynamic Accesskeys

Published by Ian Davis under Uncategorized

Accesskeys in (X)HTML is an example of a beautiful hypothesis being ruined by an ugly fact. The theory of being able to assign keys to activate links in web pages is sound but the reality is that the choice of keys is limited by those that are used to control the browser (and of course the reserved ones are different for each browser); there are no standards for which keys to use for common tasks such as ‘home’ or ‘next page’; and every operating system has a different method of combining keys (e.g. CTRL+A, ALT+A Apple+A). Here’s one approach to solving part of the problem: dynamically assigned accesskeys. The technique is to allow each user to specify they keys they want to use for common functions on the site and use Javascript to assign them on each page load. Presumably the key assignments are stored in a cookie for later. Interesting technique.

Comments Off

Nov 18 2005

How Hard Is It To Understand Test DRIVEN Development?

Published by Ian Davis under Uncategorized

Oh dear with recommendations like these is it any wonder that Ward Cunningham left? Really, how much further from TDD can suggestions like Generate tests from your interfaces and classes be?

3 responses so far

Nov 14 2005

Classes In Embedded RDF

Published by Ian Davis under Uncategorized

I updated the embedded RDF extractor stylesheet to support the two constructs I wrote about a couple of days ago, namely using cite to generate subject URIs and hyphen prefixed class names to denote RDF classes.

I’ll update the main documentation shortly but in the meantime here’s some info on the embedded Class support.

For tags with an id attribute and for anchors any token beginning with a hypen in the class attribute are considered to be RDF class names. So the following XHTML:

<p id="ian" class="-foaf-Person">I am a person</p>

generates the following triple:

<#ian> rdf:type foaf:Person .

A more complex example:


  <p id="ian" class="-foaf-Person">
    <span class="foaf-name">Ian Davis</span> has a homepage
    <a href="http://purl.org/NET/iand" rel="foaf-homepage" class="-foaf-Document">here</a>
  </p>

Generates these triples:


<#ian> rdf:type foaf:Person .
<#ian> foaf:name "Ian Davis" .
<#ian> foaf:homepage <http://purl.org/NET/iand> .
<http://purl.org/NET/iand> rdf:type foaf:Document .

Or one with mixed properties and classes in the class attribute:


  <p id="ian" class="-foaf-Person">
   Ian is owed $1 by <span class="foaf-knows -foaf-Person" id="eric">Eric Miller</span>
  </p>

Which embeds the following triples:


<#ian> rdf:type foaf:Person .
<#ian> foaf:knows <#eric> .
<#eric> rdf:type foaf:Person .

As a final test, I’ve augmented my homepage with classes, added a meta link to the embedded RDF extraction service and confirmed that Piggy Bank picks up the types. Works a treat.

2 responses so far

Nov 13 2005

SIOC Enabled

Published by Ian Davis under Uncategorized

I promised Uldis that I’d do this last week - I’ve installed the SIOC plugin for wordpress. Find the output linked from via a meta tag in my HTML or directly: http://internetalchemy.org/sioc. For the uinitiated, SIOC is an RDF vocabulary for describing online communities. Now phase two is SIOC in XHTML…

Comments Off

Nov 10 2005

Planetary Collateral Damage

Published by Ian Davis under Uncategorized

Phil Ringnalda wrote recently about the potential damage to the blogosphere of planet-style aggregators. I’ve thought of another problem. If you’re being aggregated onto a planet site then none of the other people on that planet will link to your posts. Why should they? After all, it’ll just look like noise when it hits the aggregator. This could have serious repercussions for your GoogleRank.

This issue doesn’t affect me too much since, as far as I know, there are no planets aggregating the whole of my blog. Planet RDF just takes my RDF category feed and I don’t aggregate myself on the two planets I run (Agile Planet and Planet Web 2.0) because they’re designed to be my reading lists not a publishing mechanism. (Actually I do partly aggregate myself on both - on Agile Planet I aggregate a category of posts from this blog but they’re just for status messages and I write on the Silkworm group blog which is aggregated by Planet Web 2.0)

3 responses so far

Nov 09 2005

A Spectre Haunting the Enterprise

Published by Ian Davis under Uncategorized

Peter Rip writes on Enterprise Web 2.0:

Today’s Enterprise IT budgets continue to be largely defined by the consolidation happening in the legacy software businesses. Over the next 24 months I think we will see are a lot of IT folks doing heavy lifting with legacy apps by day and playing with lightweight Web 2.0 technologies by night. The innovation at the edge is going to wash into the Enterprise. And when it does, we’re going to see IT Departments finally see a platform shift worth making. The potential losers are the legacy vendors with their ’software mainframes.’ The winners will be the companies that package componentized functionality with light, maybe even non-procedural, methods of stitching together flexible Web applications quickly.

Too right! It’s going to happen from the outside in and it’s going to be grounded in the Web. This is exactly the thinking that’s happening at Talis, specifically around our Silkworm project where we’re bringing together all kinds of components to create a genuinely new type of development platform.

Comments Off

Nov 09 2005

It’s SOAP vs HTTP

Published by Ian Davis under Uncategorized

Mark Nottingham characterises the old REST vs SOAP debate in a different way. Now it’s SOAP vs. HTTP:

you can get any of the listed architectural styles [SOA, RPC, REST] with both SOAP and HTTP.

…[useful table - go see it!]…

When doing so, notice that REST is native in HTTP, and SOAP is native for SOA. Intuitively, I’d rather use HTTP if my chosen architectural style were REST, especially considering how widely deployed and provably interoperable it is. I can choose any number of off-the-shelf, commercial or Open Source intermediaries, caches and libraries to take advantage of REST in HTTP, but the same is not true of REST in SOAP.

My takeaway is: use HTTP if you’re doing REST (document based), use SOAP if you want SOA (message based).

One response so far

Nov 09 2005

Embedded Trackbacks

Published by Ian Davis under Uncategorized

Given the cite extension I mentioned earlier today it becomes possible
to embed another well-known schema: trackbacks. The trackback RDF is notorious for being embedded in an HTML comment which hides it from everything except screen scrapers. Here’s the trackback rdf from this posting:


<!--
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
	    xmlns:dc="http://purl.org/dc/elements/1.1/"
	    xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/">

  <rdf:Description rdf:about="http://internetalchemy.org/2005/11/embedded-trackbacks"
    dc:identifier="http://internetalchemy.org/2005/11/embedded-trackbacks"
    dc:title="Embedded Trackbacks"
    trackback:ping="http://internetalchemy.org/2005/11/embedded-trackbacks.tb" />

</rdf:RDF>
-->

Here’s one way of embedding that information in an XHTML document.


<html  xmlns="http://www.w3.org/1999/xhtml">
  <head profile="http://purl.org/NET/erdf/profile">
    <title>Embedded Trackbacks</title>
    <link rel="schema.dc" href="http://purl.org/dc/elements/1.1/" />
    <link rel="schema.trackback" href="http://madskills.com/public/xml/rss/module/trackback/" />
  </head>
  <body>
    <blockquote cite="http://internetalchemy.org/2005/11/embedded-trackbacks">
      <h1 class="dc-title">Embedded Trackbacks</h1>
      <p>
         Link to this post at this permanent URL:
        <a href="http://internetalchemy.org/2005/11/embedded-trackbacks"
           class="dc-identifier">http://internetalchemy.org/2005/11/embedded-trackbacks</a>
        or ping it with a track back using this URL:
        <a href="http://internetalchemy.org/2005/11/embedded-trackbacks.tb"
           class="trackback-ping">http://internetalchemy.org/2005/11/embedded-trackbacks.tb</a>
      </p>
    </blockquote>
  </body>
</html>

I’ve worked on an enhanced embedded RDF extractor that understands the cite usage and here’s its output. Hopefully I should be able to release the cite-enabled version later tonight.


<rdf:RDF
    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
    xmlns:dc="http://purl.org/dc/elements/1.1/"
    xmlns:ns211="http://madskills.com/public/xml/rss/module/trackback/">
  <rdf:Description rdf:about="">
    <admin:generatorAgent rdf:resource="http://purl.org/NET/erdf/extract"/>
  </rdf:Description>
  <rdf:Description rdf:about="http://internetalchemy.org/2005/11/embedded-trackbacks">
    <dc:title>Embedded Trackbacks</dc:title>
    <dc:identifier>http://internetalchemy.org/2005/11/embedded-trackbacks</dc:identifier>

    <ns211:ping>http://internetalchemy.org/2005/11/embedded-trackbacks.tb</ns211:ping>
  </rdf:Description>
</rdf:RDF>

One response so far

Nov 09 2005

Enhancing Embedded RDF

Published by Ian Davis under Uncategorized

I’ve been thinking more about embedded RDF, prompted by the many people at the conference who have been grilling me about it. There’s a real desire to get more of RDF embeddable and there are two key areas I’m going to focus on: (1) assertions about external URIs and (2) classes (at Eric Miller’s very vocal insistance!).

Issue one is easiest I think. The embedded RDF rules state that class attributes on tags inside anchor elements represent properties of the target of that anchor. Because you can’t nest anchor elements in HTML, this limits the embedded triples to having literal values.

As an illustration, the following HTML shows an embedded assertion that the Dublin Core title of http://example.com/physics is the literal “My physics page”:

<a href="http://example.com/physics"><span class="dc-title">My physics page</span></a>

It would be useful to be able to embed assertions with URI values, e.g. the FOAF topic of the page. For example:

<http://example.com/physics> foaf:topic <http://en.wikipedia.org/wiki/Physics> .

At the moment you’d have to nest anchors to achieve this in embedded RDF. A way around this would be to utilise the cite attribute. The HTML 4.01 specification says this about cite: The value of this attribute is a URI that designates a source document or message. This attribute is intended to give information about the source from which the quotation was borrowed.

So, possibly, it would be reasonable to use cite attributes to specify the subject of a series of triples almost as though we were quoting some metadata from that URI. So, my example could be rewritten as:

<blockquote cite="http://example.com/physics">
  <p>
    <span class="dc-title">My physics page</span> which is about
    <a href="http://en.wikipedia.org/wiki/Physics" rel="foaf-topic">physics</a>
  </p>
</blockquote>

which would represent the following two triples:

<http://example.com/physics> dic:title "My physics page" .
<http://example.com/physics> foaf:topic <http://en.wikipedia.org/wiki/Physics> .

The cite attribute can be used on q, blockquote, ins and del tags which collectively allow all kinds of markup to be contained within them, certainly enough for our needs.

The second problem, that of embedded classes, is harder. Eric wants this for better Piggy Bank integration and has promised me mucho lucre as an incentive (well mucho more than zero, mucho less than $2).

There are a number of approaches. The first is actually already supported. You can just embed an rdf:typelink in the HTML:

<p id="ian">I am a <a rel="rdf-type" href="http://xmlns.com/foaf/0.1/Person">person</a></p>

I don’t think this is what Eric needs because the usage is likely to be low - it’s extraneous information for humans. Besides, who’s going to be linking to RDF property definitions in their prose? (RDF geeks excluded of course).

An alternative is to do something funky in the XSLT that extracts the RDF from the HTML. It could dereference each schema referenced in the head of the document and extract all the domains and ranges. This is possible but how would it deal with domains or ranges that have blank nodes as their value? Probably simply by ignoring them. A more serious problem is that often the author knows more than the schema. I might be using the foaf:depiction property to relate me to my picture. The FOAF schema declares the domain of foaf:depiction to be owl:Thing but obviously I know that I’m describing the property of a foaf:Person and it would be nice to be able to explicitly state this.

Another approach is to continue using the class attribute but lexically separate types, perhaps by prefixing with a special character. The CSS grammar doesn’t allow much wiggle room: basically it’s a hypen or nothing! Perhaps a class name prefixed with a hyphen should be interpreted as the name of a type like this:

<p id="ian" class="-foaf-Person">I am a person</p>

which would infer an additional triple:

<#ian> rdf:type foaf:Person .

I could live with this since I believe the number of type declarations in a document will be a small compared to the use of properties. What do you think? I’m casting around for other suggestions here too. If you have a good idea let me know and help me win Eric’s dollar.

6 responses so far

Nov 09 2005

Naked Metadata Using Embedded RDF

Published by Ian Davis under Uncategorized

Jonathan O’Donnell has implemented embedded RDF in his page on Naked Metadata. His reasoning echos exactly the microformats principles of visible metadata and don’t repeat yourself:

When I first learned to put Dublin Core into Web pages, I often found myself replicating data. I would place a DC.creator tag in the head, even though the name of the author was on the Web page. This annoyed me, because I knew that it is bad practice to replicate data like that. When I mentioned this to a workmate at the time, he said that I could probably make a link from the metadata field to the data in XML. At that stage, I didn’t understand enough XML to even understand the concept, much less make it work.

Fast forward eight years to DC-ANZ 2005, where Eve Young and Baden Hughes made the point that people updating Web pages often don’t update the metadata. One of the problems that they talked about was that metadata in the header is essentially invisible to people editing the page (when, for example, using some wysiwyg editors).

In general, data (including metadata) should be stored in one place only. This prevents drift: if it is only stored in one place, it can only be updated in that place.

Comments Off

Next »