summaryrefslogtreecommitdiffstats
path: root/xml/acls-1.2.rng
blob: 378ce087bf0c9baa4df4302bdcedd3bb415bbf67 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
<?xml version="1.0" encoding="UTF-8"?>
<grammar xmlns="http://relaxng.org/ns/structure/1.0" 
         datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
  <start>
    <optional>
      <ref name="element-acls"/>
    </optional>
  </start>

  <define name="element-acls">
    <element name="acls">
      <zeroOrMore>
        <choice>
          <element name="acl_user">
            <attribute name="id"><data type="ID"/></attribute>
            <choice>
              <zeroOrMore>
                <element name="role_ref">
                  <attribute name="id"><data type="IDREF"/></attribute>
                </element>
              </zeroOrMore>
              <zeroOrMore>
                <ref name="element-acl"/>
              </zeroOrMore>
            </choice>
          </element>
          <element name="acl_role">
            <attribute name="id"><data type="ID"/></attribute>
            <zeroOrMore>
              <ref name="element-acl"/>
            </zeroOrMore>
          </element>
        </choice>
      </zeroOrMore>
    </element>
  </define>

  <define name="element-acl">
    <choice>
      <element name="read">
        <ref name="attribute-acl"/>
      </element>
      <element name="write">
        <ref name="attribute-acl"/>
      </element>
      <element name="deny">
        <ref name="attribute-acl"/>
      </element>
    </choice>
  </define>

  <define name="attribute-acl">
    <attribute name="id"><data type="ID"/></attribute>
      <choice>
        <attribute name="tag"><text/></attribute>
        <attribute name="ref"><data type="IDREF"/></attribute>
        <group>
          <attribute name="tag"><text/></attribute>
          <attribute name="ref"><data type="IDREF"/></attribute>
        </group>
        <attribute name="xpath"><text/></attribute>
      </choice>
      <optional>
        <attribute name="attribute"><text/></attribute>
      </optional>
  </define>

</grammar>