summaryrefslogtreecommitdiffstats
path: root/sudoers/ipa.rng
blob: 759caeecc882face5742a7a04779fc6ac6665787 (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
<grammar xmlns="http://relaxng.org/ns/structure/1.0"
         xmlns:a="http://freeipa.org/xml/rng/ns/annotations/1.0">
  <a:doc> top (root) level IPA pattern </a:doc>

  <!-- this simply allows any valid XML to be enclosed in <ipa> -->
  <start ns="http://freeipa.org/xml/rng/ipa/1.0">
    <element name="ipa">
      <!-- note that text is not allowed -->
      <zeroOrMore>
        <ref name="anyElement" />
      </zeroOrMore>
    </element>
  </start>

  <!--
       This allows anything in ANOTHER namespace.
       The way nsName works requires that this be in each schema (grammar);
       it cannot be included.
  -->
  <define name="anyElement">
    <element>
      <anyName>
        <except>
          <nsName />
          <nsName ns="" />
          <nsName ns="http://freeipa.org/xml/rng/ipa/1.0" />
        </except>
      </anyName>
      <zeroOrMore>
        <choice>
          <attribute>
            <anyName />
          </attribute>
          <text/>
          <ref name="anyElement" />
        </choice>
      </zeroOrMore>
    </element>
  </define>

</grammar>