[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Resources for AtomPub parser validation
Daniel Jalkut wrote:
There are well-known and trusted public feed validators for Atom and
RSS. What I'm curious to know is whether anybody has resources to share
for testing/validating the parsers of such feeds.
In particular, I continue to have mind-bending problems interpreting
the ins and outs of how particular content needs to be treated in the
Atom format that is used by AtomPub. Right now, for instance, I'm
trying to learn definitively whether an escaped "&" inside a content
type xhtml div should be left alone or converted to an ampersand in the
parsed content output.
It would be a great aid if there was some "reference" feed that
exercised many of the common mistakes parsers make, and at the same time
expressed definitive advice for how these entities should be handled.
Anybody know of such a resource?
Not sure its applicable.
I write a blog using atom, xhtml in atom to be precise.
To validate it I use the atom rng schema and
a mod to the xhtml schema (since I root the xhtml in div I
added div as a start candidate.)
<rules xmlns="http://purl.oclc.org/dsdl/nvdl/ns/structure/1.0"
xmlns:a="http://www.w3.org/2005/Atom"
xmlns:x="http://www.w3.org/1999/xhtml"
startMode="doc" >
<mode name="doc">
<namespace ns="http://www.w3.org/2005/Atom">
<validate schema="atom.rng">
<context path="feed/entry/content" useMode="xhtml"/>
</validate>
</namespace>
</mode>
<mode name="xhtml">
<namespace ns="http://www.w3.org/1999/xhtml">
<attach/>
<validate schema="xhtmldiv.rng" />
</namespace>
</mode>
</rules>
then
<grammar xmlns="http://relaxng.org/ns/structure/1.0">
<include href="xhtml.rng">
<start combine="choice">
<ref name="div"/>
</start>
</include>
</grammar>
xhtml.rng is a standard xhtml schema in rng.
That seems to work for me.
I catch most of my sillies this way..
HTH
regards
--
Dave Pawson
XSLT XSL-FO FAQ.
http://www.dpawson.co.uk