17

Is there any defined atom syndication xml schema?

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

Community
  • 1
  • 1
Ali Ersöz
  • 15,860
  • 11
  • 50
  • 64

2 Answers2

18

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

Deer Hunter
  • 1,211
  • 1
  • 18
  • 31
Welbog
  • 59,154
  • 9
  • 110
  • 123
  • Nope. Not like that. I want an Xml Schema. I didn't understand anything from that link. – Ali Ersöz Jan 15 '09 at 13:30
  • 1
    XSD is XML Schema Definition. If that's not what you want then you want something other than a schema. Are you looking for a DTD maybe? – Welbog Jan 15 '09 at 13:32
  • Oops sorry, this is google chrome bug I think. It didn't show the xsd. It show just some text! In Internet Explorer it is OK. Thanks. – Ali Ersöz Jan 15 '09 at 13:37
  • Sounds like you got a bonus Chrome bug to report out of this :) – Welbog Jan 15 '09 at 13:38
  • for future chrome users, just do a view source on that link. – Jeff Martin Dec 21 '10 at 19:50
  • I got a FOUT in Chrome, but then it did the right thing and displayed the tree. – Caleb Hearth Jul 22 '13 at 15:49
  • 2
    Try https://tools.oasis-open.org/version-control/browse/wsvn/cmis/trunk/SchemaProject/schema/ATOM.xsd instead – dvdsmpsn Jun 30 '15 at 13:09
  • 1
    Note that it is just AN xml-schema, AFAIK there is no official xsd. The RFC is the only real spec. The schema in the answer is really sloppy - shame it is so widespread. Among other things it tries to impose required fields in misunderstood ways that don't work, and fails completely to impose some sequence requirements from the spec that are easy to implement if you understand basic xsd. The schema @dvdsmpsn points to looks a lot better at first glance. – Joachim Lous Mar 24 '17 at 12:56
  • Just found copy of the OP missing file: https://github.com/metaleap/go-xsd-pkg/blob/master/kbcafe.com/rss/atom.xsd.xml – mblaettermann Apr 11 '17 at 18:18
  • link isn't dead, view the frame source to get the xsd – user27874 Oct 02 '20 at 11:29
4

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
cweiske
  • 30,033
  • 14
  • 133
  • 194