Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there any defined atom syndication xml schema?

Is there any defined atom syndication xml schema?

RFC 4287 only contains a Relax NG compact schema in appendix B.

like image 668
Ali Ersöz Avatar asked Jan 15 '09 13:01

Ali Ersöz


2 Answers

http://www.kbcafe.com/rss/atom.xsd.xml (A Web Archive version since the original is no longer available)

like image 78
Welbog Avatar answered Oct 20 '22 04:10

Welbog


What does not work

http://www.kbcafe.com/rss/atom.xsd.xml should not be used, since it does not even detect missing <id> tags.

https://tools.oasis-open.org/version-control/browse/wsvn/cmis/trunk/SchemaProject/schema/ATOM.xsd is broken, xmllint reports an error when using it:

complex type 'atomPersonConstruct': The content model is not determinist.

What does work

The RFC contains a relax ng compact specification: https://validator.w3.org/feed/docs/rfc4287.html#rfc.section.B

With the help of trang that .rnc file can be converted from the compact format to the XML-based .rng file. This in turn can be used with xmllint:

$ xmllint --noout --relaxng atom.rng feed.atom
feed.atom:4: element feed: Relax-NG validity error : Expecting an element updated, got nothing
feed.atom:16: element entry: Relax-NG validity error : Invalid sequence in interleave
feed.atom:16: element entry: Relax-NG validity error : Element feed failed to validate content
feed.atom fails to validate
like image 36
cweiske Avatar answered Oct 20 '22 04:10

cweiske