"I have a mind like a steel... uh... thingy." Patrick Logan's weblog.

Search This Blog

Friday, November 02, 2007

Documents and Schemas

James Strachan writes about atom format and how to indicate schemas...

One idea is to use content types...

...another could be to add a new kind of link to the feed.

This has some appeal. We're building some feeds that will have specific kinds of content, and validation of the specific content will be beneficial.

However an aspect of RelaxNG that is appealing for our project is not tying a specific schema to a specific document. Certain consumers of a document want to validate just the parts of the document that is of interest to them. There may be more than one schema applied to a document.

Some publisher may simply want to ensure a document is a good Atom entry. Some other publisher may want that and to ensure the content meets some other schema and associated rules. Some consumer may just care about the content or a subset.

See "duck typing", below. :-S

I don't have any good ideas, but I would hesitate building in a 1:1 association out of fear some producers and consumers may become over-dependent on that association. That's my barely formed 2 cents.

1 comment:

dehora said...

It's not well known, but you can validate a subtree inside Atom using RELAX. IOW RELAX doesn't require you to validate starting from the root element a la DTD/XSD.

Blog Archive

About Me

Portland, Oregon, United States
I'm usually writing from my favorite location on the planet, the pacific northwest of the u.s. I write for myself only and unless otherwise specified my posts here should not be taken as representing an official position of my employer. Contact me at my gee mail account, username patrickdlogan.