I cooked up a RelaxNG schema for Pie/Not-Echo or whatever you want to call it, in its 0.1 snapshot form. Which, as a side-effect, generates a W3C XML Schema. This note includes specific conmmentary on this schema, general commentary on schemas (summary: Why would you ever use XML Schema?), and some recommendations for pruning Pie/Not-Echo.

Pie.rnc v0.1 · The schema is available at http//www.tbray.org/ongoing/pie/0.1/pie.rnc; as the snapshot versions advance, I’ll try to make sure there are snapshot schemas under directories named by the version number; so the 0.2 schema will be in http//www.tbray.org/ongoing/pie/0.2/pie.rnc, and so on.

While I’ve fooled around with RelaxNG, this is my first attempt to take on something substantial from scratch. It’s perfectly possible that I’ve done this in a way that is stupid or wrong or suboptimal, I’d be delighted to get feedback and will incorporate to the extent possible. I’ve created a discussion page at the Wiki; feedback there, please.

Here are a list of points with reference to the existing schema, in no particular order:

What Needs Fixing in Pie · The elements and attributes that are in the 0.1 snapshot are OK, except there are too many of them. The following need removal forthwith, simply because previous generations of syndication technology got by without them just fine, and we’re not here to invent stuff:

subtitle · Exactly what can we not do if we don’t have this? What prior art demonstrates its necessity?

weblog/homepage · The debate over in the Wiki had, I thought, some crushing arguments in favor of just having a <web> field per-person; the extras are at best un-necessary and in some cases actively harmful.

content* · Why do we ever need more than one <content> element per entry? This has never been proved necessary in previous syndication formats, and now is the wrong time to invent it. We have the ability to embed XML in the <content> element, and XML provides many nice mechanisms for marking-up lists of things, so anybody who really needs this functionality can work out the bugs in that sandbox until we know what needs to go in at the Pie level.

<content src= · Content-by-reference is a bold new idea, and we don’t need bold new ideas, we need to write down what already works. Once again, <content> can contain XML, and XML provides excellent ways to insert hyperlinks to other things. Work it out there and when you prove that you understand the issues, then it’s a candidate for first-clss citizenship in the syndication format itself.

...But the Glass is Half-Full · These gripes aside, the Pie format feels reasonably well-baked to me. All we have to do is lose the superfluous bits, find it a name, sort out a pure-HTTP API and derive XML-RPC and SOAP versions from that (let the market sort ’em out), figure out a neutral, long-lived home for the spec, and declare victory.

RelaxNG vs W3C XML Schemas · I invite people, even those who don’t think they’re schema weenies (I for example am definitely not a schema guy) to have a look at that RelaxNG compact-syntax schema. It’s readable, it only took me two hours to get it working (that includes downloading the Jing and Trang software, downlaoding and installing Java 1.4 from Apple, rebooting, and sorting out the usual CLASSPATH hell).

It does some pretty magical things with the allowed content of <content>, based on attribute values. It calls out to precooked definitions of dates and URIs, and it generates XML Schema files for free.

I’d really like to see a best effort from an XML Schemas maven which duplicates the functionality of the RNC as closely as possible, as readably as possible; and maybe does some more things that the RNC can’t do.

Until I’ve seen that, my provisional conclusion is that XML Schemas are basically second-rate in terms of functionality and usability, and you can get them for free by starting with Relax NG.

So, why would you use anything else?


author · Dad
colophon · rights
picture of the day
July 09, 2003
· Technology (90 fragments)
· · Publishing (162 more)

By .

The opinions expressed here
are my own, and no other party
necessarily agrees with them.

A full disclosure of my
professional interests is
on the author page.

I’m on Mastodon!