1
<?xml version="1.0" encoding="UTF-8"?>
4
RELAX NG Compact Syntax Grammar for the
5
Atom Format Specification Version 11
7
<grammar xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:s="http://www.ascc.net/xml/schematron" xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
10
<ref name="atomLink"/>
13
<!-- Common attributes -->
14
<define name="atomCommonAttributes">
16
<attribute name="xml:base">
21
<attribute name="xml:lang">
22
<ref name="atomLanguageTag"/>
26
<ref name="undefinedAttribute"/>
30
<define name="atomLink">
31
<element name="atom:link">
32
<ref name="atomCommonAttributes"/>
33
<attribute name="href">
37
<attribute name="rel">
39
<ref name="atomNCName"/>
45
<attribute name="type">
46
<ref name="atomMediaType"/>
50
<attribute name="hreflang">
51
<ref name="atomLanguageTag"/>
55
<attribute name="title"/>
58
<attribute name="length"/>
60
<ref name="undefinedContent"/>
63
<!-- Low-level simple types -->
64
<define name="atomNCName">
66
<param name="minLength">1</param>
67
<param name="pattern">[^:]*</param>
70
<!-- Whatever a media type is, it contains at least one slash -->
71
<define name="atomMediaType">
73
<param name="pattern">.+/.+</param>
76
<!-- As defined in RFC 3066 -->
77
<define name="atomLanguageTag">
79
<param name="pattern">[A-Za-z]{1,8}(-[A-Za-z0-9]{1,8})*</param>
83
Unconstrained; it's not entirely clear how IRI fit into
84
xsd:anyURI so let's not try to constrain it here
86
<define name="atomUri">
89
<!-- Other Extensibility -->
90
<define name="undefinedAttribute">
101
<define name="undefinedContent">
105
<ref name="anyForeignElement"/>
109
<define name="anyElement">
118
<ref name="anyElement"/>
123
<define name="anyForeignElement">
127
<nsName ns="http://www.w3.org/2005/Atom"/>
136
<ref name="anyElement"/>