summaryrefslogtreecommitdiffstats
path: root/schemas/genshi.xsd
blob: 35d81e2f1f6711cd4702090dfa0754b2a41ee81c (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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
<?xml version="1.0"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
           xmlns:py="http://genshi.edgewall.org/"
           xml:lang="en"
           targetNamespace="http://genshi.edgewall.org/"
           elementFormDefault="qualified">
  <xs:annotation>
    <xs:documentation>
      Genshi schema
      Chris St. Pierre
    </xs:documentation>
  </xs:annotation>

  <!-- genshi types -->
  <xs:complexType name="forType" mixed="true">
    <xs:choice minOccurs="0" maxOccurs="unbounded">
      <xs:any processContents="lax"/>
    </xs:choice>
    <xs:attribute name="each" type="xs:string" use="required"/>
  </xs:complexType>

  <xs:complexType name="ifType" mixed="true">
    <xs:choice minOccurs="0" maxOccurs="unbounded">
      <xs:any processContents="lax"/>
    </xs:choice>
    <xs:attribute name="test" type="xs:string" use="required"/>
  </xs:complexType>

  <xs:complexType name="matchType" mixed="true">
    <xs:choice minOccurs="0" maxOccurs="unbounded">
      <xs:any processContents="lax"/>
    </xs:choice>
    <xs:attribute name="path" type="xs:string" use="required"/>
    <xs:attribute name="once" type="xs:boolean" default="false"/>
    <xs:attribute name="buffer" type="xs:boolean" default="true"/>
    <xs:attribute name="recursive" type="xs:boolean" default="true"/>
  </xs:complexType>

  <xs:complexType name="defType" mixed="true">
    <xs:choice minOccurs="0" maxOccurs="unbounded">
      <xs:any processContents="lax"/>
    </xs:choice>
    <xs:attribute name="function" type="xs:string" use="required"/>
  </xs:complexType>

  <xs:complexType name="withType" mixed="true">
    <xs:choice minOccurs="0" maxOccurs="unbounded">
      <xs:any processContents="lax"/>
    </xs:choice>
    <xs:attribute name="vars" type="xs:string" use="required"/>
  </xs:complexType>

  <xs:complexType name="replaceType" mixed="true">
    <xs:choice minOccurs="0" maxOccurs="unbounded">
      <xs:any processContents="lax"/>
    </xs:choice>
    <xs:attribute name="value" type="xs:string" use="required"/>
  </xs:complexType>

  <xs:complexType name="chooseType" mixed="true">
    <xs:sequence>
      <xs:element name="when" type="py:ifType" maxOccurs="unbounded"/>
      <xs:element name="otherwise" type="py:otherwiseType"
                   minOccurs="0"/>
    </xs:sequence>
    <xs:attribute name="test" type="xs:string" use="required"/>
  </xs:complexType>

  <xs:complexType name="otherwiseType" mixed="true">
    <xs:choice minOccurs="0" maxOccurs="unbounded">
      <xs:any processContents="lax"/>
    </xs:choice>
  </xs:complexType>

  <!-- genshi tags -->
  <xs:group name="genshiElements">
    <xs:choice>
      <xs:element name="with" type="py:withType"/>
      <xs:element name="replace" type="py:replaceType"/>
      <xs:element name="choose" type="py:chooseType"/>
      <xs:element name="for" type="py:forType"/>
      <xs:element name="if" type="py:ifType"/>
      <xs:element name="match" type="py:matchType"/>
      <xs:element name="def" type="py:defType"/>
    </xs:choice>
  </xs:group>

  <!-- genshi attributes -->
  <xs:attributeGroup name="genshiAttrs">
    <xs:attribute name="if" type="xs:string" form="qualified"/>
    <xs:attribute name="choose" type="xs:string" form="qualified"/>
    <xs:attribute name="when" type="xs:string" form="qualified"/>
    <xs:attribute name="otherwise" type="xs:string" form="qualified"/>
    <xs:attribute name="for" type="xs:string" form="qualified"/>
    <xs:attribute name="def" type="xs:string" form="qualified"/>
    <xs:attribute name="match" type="xs:string" form="qualified"/>
    <xs:attribute name="with" type="xs:string" form="qualified"/>
    <xs:attribute name="attrs" type="xs:string" form="qualified"/>
    <xs:attribute name="content" type="xs:string" form="qualified"/>
    <xs:attribute name="replace" type="xs:string" form="qualified"/>
    <xs:attribute name="strip" type="xs:string" form="qualified"/>
  </xs:attributeGroup>
</xs:schema>