James Strachan writes about atom format and how to indicate schemas...
One idea is to use content types...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....another could be to add a new kind of link to the feed.
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:
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.
Post a Comment