Re: [blogite] PingBack description files

Date view Thread view Subject view Author view Attachment view

From: Simon Willison (
Date: Sat Sep 07 2002 - 18:06:01 BST

At 17:35 07/09/2002 +0100, Simon Willison wrote:
>One potential problem with the above is that interface details are
>contained as a single block of CDATA. This is pretty inflexible - for
>example, it would be better if PingBack servers were indicated with a
>host, path and port and it would be good if email addresses could request
>a specific subject. Any ideas for a way of adding that to the above format
>without bloating it with too many elements (it would be good if it was
>extendable as well, so the format could be used to specify a new format
>like instant messenging via jabber without needing any extra elements or
>attributes added to the DTD).

I've got a solution. Unfortunately it uses XML namespaces - is this a big
problem? I've only just got my head around them and I'm not overly keen on
adding something complicated like namespaces to the spec for no good
reason. That said, I think this is a pretty cool way of using them :)

Basically, each interface type has its own set of elements defined in its
own DTD. The XML-RPC interface for example needs port, path and host
elements. The email interface needs address and subject elements. A jabber
interface might need elements of its own. Each interface is given a
namespace on the domain - then when additional interfaces are
added later on it can be done by giving them a new interface. The example
file now looks something like this (I may have got the syntax wrong, this
is the first time I've used XML namespaces):

   <interface type="xmlrpc">
       <interface type="get">
   <interface type="email">
     <email:subject>I've linked to your site</email:subject>

As you can see, each interface type now has its own namespace and its own
set of elements. New interface types can be defined without changing the
basic PingBack specification or DTD.

Keep the ideas flowing :)


Web Developer,
Message sent over the Blogite mailing list.

Date view Thread view Subject view Author view Attachment view

This archive was generated by hypermail 2.1.5 : Sat Sep 07 2002 - 19:05:01 BST