atom.rng 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <grammar ns="http://www.w3.org/2005/Atom" xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0" xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
  3. <start>
  4. <element name="feed">
  5. <attribute name="xml:lang">
  6. <ref name="iso639"/>
  7. </attribute>
  8. <ref name="title"/>
  9. <ref name="link"/>
  10. <ref name="id"/>
  11. <ref name="updated"/>
  12. <element name="generator">
  13. <attribute name="uri">
  14. <data type="anyURI"/>
  15. </attribute>
  16. <attribute name="version"/>
  17. <text/>
  18. </element>
  19. <element name="author">
  20. <element name="name">
  21. <text/>
  22. </element>
  23. </element>
  24. <zeroOrMore>
  25. <element name="entry">
  26. <ref name="title"/>
  27. <ref name="id"/>
  28. <ref name="updated"/>
  29. <element name="content">
  30. <text/>
  31. </element>
  32. <ref name="link"/>
  33. </element>
  34. </zeroOrMore>
  35. </element>
  36. </start>
  37. <define name="title">
  38. <element name="title">
  39. <text/>
  40. </element>
  41. </define>
  42. <define name="link">
  43. <element name="link">
  44. <choice>
  45. <group>
  46. <attribute name="rel">
  47. <value>enclosure</value>
  48. </attribute>
  49. <attribute name="length">
  50. <data type="unsignedLong"/>
  51. </attribute>
  52. </group>
  53. <attribute name="rel">
  54. <data type="NCName"/>
  55. </attribute>
  56. </choice>
  57. <attribute name="href">
  58. <data type="anyURI"/>
  59. </attribute>
  60. <attribute name="type"/>
  61. </element>
  62. </define>
  63. <define name="id">
  64. <element name="id">
  65. <data type="anyURI"/>
  66. </element>
  67. </define>
  68. <define name="updated">
  69. <element name="updated">
  70. <ref name="rfc3339"/>
  71. </element>
  72. </define>
  73. <define name="iso639">
  74. <data type="NCName">
  75. <param name="pattern">[a-z]{2}</param>
  76. </data>
  77. </define>
  78. <define name="rfc3339">
  79. <a:documentation>http://tools.ietf.org/html/rfc3339/#section-5.6 with time-numoffset</a:documentation>
  80. <data type="dateTime">
  81. <param name="pattern">[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}[+\-][0-9]{2}:[0-9]{2}</param>
  82. </data>
  83. </define>
  84. </grammar>