リスト2 button.rng

 1 <?xml version="1.0" encoding="iso-8859-1"?>
 2 <grammar xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0"
 3          xmlns="http://relaxng.org/ns/structure/1.0"
 4          datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes"
 5          ns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
 6
 7   <define name="button">
 8     <element name="button">
 9       <ref name="button.attlist"/>
10       <zeroOrMore>
11         <choice>
12           <ref name="description"/>
13           <ref name="menupopup"/>
14         </choice>
15       </zeroOrMore>
16     </element>
17   </define>
18   
19   <define name="button.attlist">
20     <ref name="xul.attlist"/>
21     <ref name="common.attlist"/>
22     <ref name="script.attlist"/>
23     <ref name="autocheck.attrib"/>
24     <ref name="checkstate.attrib"/>
25     <ref name="dlgType.attrib"/>
26     <ref name="group.attrib"/>
27     <ref name="open.attrib"/>
28     <ref name="type.attrib"/>
29   </define>
30
31   <define name="Button.class">
32     <ref name="button"/>
33   </define>
34
35   <define name="Block.class" combine="choice">
36     <ref name="Button.class"/>
37   </define>
38
39 </grammar>