~ubuntu-branches/ubuntu/quantal/nova/quantal-proposed

« back to all changes in this revision

Viewing changes to nova/api/openstack/compute/schemas/atom-link.rng

  • Committer: Package Import Robot
  • Author(s): Chuck Short
  • Date: 2012-02-10 11:25:38 UTC
  • mto: This revision was merged to the branch mainline in revision 65.
  • Revision ID: package-import@ubuntu.com-20120210112538-3jcp8w9huic41e45
Tags: upstream-2012.1~e4~20120210.12574
ImportĀ upstreamĀ versionĀ 2012.1~e4~20120210.12574

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<?xml version="1.0" encoding="UTF-8"?>
 
2
<!--
 
3
  -*- rnc -*-
 
4
  RELAX NG Compact Syntax Grammar for the
 
5
  Atom Format Specification Version 11
 
6
-->
 
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">
 
8
  <start>
 
9
    <choice>
 
10
      <ref name="atomLink"/>
 
11
    </choice>
 
12
  </start>
 
13
  <!-- Common attributes -->
 
14
  <define name="atomCommonAttributes">
 
15
    <optional>
 
16
      <attribute name="xml:base">
 
17
        <ref name="atomUri"/>
 
18
      </attribute>
 
19
    </optional>
 
20
    <optional>
 
21
      <attribute name="xml:lang">
 
22
        <ref name="atomLanguageTag"/>
 
23
      </attribute>
 
24
    </optional>
 
25
    <zeroOrMore>
 
26
      <ref name="undefinedAttribute"/>
 
27
    </zeroOrMore>
 
28
  </define>
 
29
  <!-- atom:link -->
 
30
  <define name="atomLink">
 
31
    <element name="atom:link">
 
32
      <ref name="atomCommonAttributes"/>
 
33
      <attribute name="href">
 
34
        <ref name="atomUri"/>
 
35
      </attribute>
 
36
      <optional>
 
37
        <attribute name="rel">
 
38
          <choice>
 
39
            <ref name="atomNCName"/>
 
40
            <ref name="atomUri"/>
 
41
          </choice>
 
42
        </attribute>
 
43
      </optional>
 
44
      <optional>
 
45
        <attribute name="type">
 
46
          <ref name="atomMediaType"/>
 
47
        </attribute>
 
48
      </optional>
 
49
      <optional>
 
50
        <attribute name="hreflang">
 
51
          <ref name="atomLanguageTag"/>
 
52
        </attribute>
 
53
      </optional>
 
54
      <optional>
 
55
        <attribute name="title"/>
 
56
      </optional>
 
57
      <optional>
 
58
        <attribute name="length"/>
 
59
      </optional>
 
60
      <ref name="undefinedContent"/>
 
61
    </element>
 
62
  </define>
 
63
  <!-- Low-level simple types -->
 
64
  <define name="atomNCName">
 
65
    <data type="string">
 
66
      <param name="minLength">1</param>
 
67
      <param name="pattern">[^:]*</param>
 
68
    </data>
 
69
  </define>
 
70
  <!-- Whatever a media type is, it contains at least one slash -->
 
71
  <define name="atomMediaType">
 
72
    <data type="string">
 
73
      <param name="pattern">.+/.+</param>
 
74
    </data>
 
75
  </define>
 
76
  <!-- As defined in RFC 3066 -->
 
77
  <define name="atomLanguageTag">
 
78
    <data type="string">
 
79
      <param name="pattern">[A-Za-z]{1,8}(-[A-Za-z0-9]{1,8})*</param>
 
80
    </data>
 
81
  </define>
 
82
  <!--
 
83
    Unconstrained; it's not entirely clear how IRI fit into
 
84
    xsd:anyURI so let's not try to constrain it here
 
85
  -->
 
86
  <define name="atomUri">
 
87
    <text/>
 
88
  </define>
 
89
  <!-- Other Extensibility -->
 
90
  <define name="undefinedAttribute">
 
91
    <attribute>
 
92
      <anyName>
 
93
        <except>
 
94
          <name>xml:base</name>
 
95
          <name>xml:lang</name>
 
96
          <nsName ns=""/>
 
97
        </except>
 
98
      </anyName>
 
99
    </attribute>
 
100
  </define>
 
101
  <define name="undefinedContent">
 
102
    <zeroOrMore>
 
103
      <choice>
 
104
        <text/>
 
105
        <ref name="anyForeignElement"/>
 
106
      </choice>
 
107
    </zeroOrMore>
 
108
  </define>
 
109
  <define name="anyElement">
 
110
    <element>
 
111
      <anyName/>
 
112
      <zeroOrMore>
 
113
        <choice>
 
114
          <attribute>
 
115
            <anyName/>
 
116
          </attribute>
 
117
          <text/>
 
118
          <ref name="anyElement"/>
 
119
        </choice>
 
120
      </zeroOrMore>
 
121
    </element>
 
122
  </define>
 
123
  <define name="anyForeignElement">
 
124
    <element>
 
125
      <anyName>
 
126
        <except>
 
127
          <nsName ns="http://www.w3.org/2005/Atom"/>
 
128
        </except>
 
129
      </anyName>
 
130
      <zeroOrMore>
 
131
        <choice>
 
132
          <attribute>
 
133
            <anyName/>
 
134
          </attribute>
 
135
          <text/>
 
136
          <ref name="anyElement"/>
 
137
        </choice>
 
138
      </zeroOrMore>
 
139
    </element>
 
140
  </define>
 
141
</grammar>