<?xml version="1.0" encoding="UTF-8"?>
<grammar datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes"
    ns="" xmlns="http://relaxng.org/ns/structure/1.0">
    <start>
        <ref name="ResultSet"/>
    </start>
    <define name="ResultSet">
        <element name="ResultSet">
            <ref name="xbook"/>
        </element>
    </define>
    <define name="xbook">
        <element name="xbook">
            <attribute name="game">
                <text/>
            </attribute>
            <attribute name="update">
                <text/>
            </attribute>
            <oneOrMore>
                <element name="scene">
                    <attribute name="id">
                        <text/>
                    </attribute>
                    <zeroOrMore>
                        <choice>
                            <element name="image">
                                <attribute name="src">
                                    <text/>
                                </attribute>
                                <attribute name="x">
                                    <text/>
                                </attribute>
                                <attribute name="y">
                                    <text/>
                                </attribute>
                                <attribute name="alpha">
                                    <text/>
                                </attribute>
                            </element>
                            <element name="turnImage">
                                <attribute name="frame">
                                    <text/>
                                </attribute>
                                <attribute name="src">
                                    <text/>
                                </attribute>
                            </element>
                            <element name="window">
                                <ref name="windowInline"/>
                            </element>
                            <element name="xwindow">
                                <attribute name="x">
                                    <text/>
                                </attribute>
                                <attribute name="y">
                                    <text/>
                                </attribute>
                                <attribute name="xx">
                                    <text/>
                                </attribute>
                                <attribute name="yy">
                                    <text/>
                                </attribute>
                                <attribute name="src">
                                    <text/>
                                </attribute>
                            </element>
                            <element name="xwindowAnime">
                                <attribute name="openFrame">
                                    <text/>
                                </attribute>
                                <attribute name="closeFrame">
                                    <text/>
                                </attribute>
                            </element>
                            <element name="xtextColor">
                                <attribute name="r">
                                    <text/>
                                </attribute>
                                <attribute name="g">
                                    <text/>
                                </attribute>
                                <attribute name="b">
                                    <text/>
                                </attribute>
                                <attribute name="a">
                                    <text/>
                                </attribute>
                                <attribute name="sr">
                                    <text/>
                                </attribute>
                                <attribute name="sg">
                                    <text/>
                                </attribute>
                                <attribute name="sb">
                                    <text/>
                                </attribute>
                                <attribute name="sa">
                                    <text/>
                                </attribute>
                            </element>
                            <element name="xtextSpeed">
                                <attribute name="frame">
                                    <text/>
                                </attribute>
                            </element>
                            <element name="xtextSize">
                                <attribute name="height">
                                    <text/>
                                </attribute>
                                <attribute name="line">
                                    <text/>
                                </attribute>
                            </element>
                            <element name="xtextFace">
                                <attribute name="style">
                                    <text/>
                                </attribute>
                            </element>
                            <element name="makeMapImage">
                                <attribute name="value">
                                    <text/>
                                </attribute>
                                <attribute name="src">
                                    <text/>
                                </attribute>
                            </element>
                            <element name="turnAlpha">
                                <attribute name="frame">
                                    <text/>
                                </attribute>
                            </element>
                            <ref name="wait"/>
                            <ref name="informationImage"/>
                            <ref name="oggStop"/>
                            <ref name="oggStopLoadPlay"/>
                            <ref name="effectLoad"/>
                            <ref name="effectPlay"/>
                        </choice>
                    </zeroOrMore>
                </element>
            </oneOrMore>
        </element>
    </define>
    <define name="windowInline">
        <mixed>
            <zeroOrMore>
                <choice>
                    <ref name="textColor"/>
                    <ref name="textFace"/>
                    <element name="br">
                        <empty/>
                    </element>
                    <element name="next">
                        <empty/>
                    </element>
                    <element name="page">
                        <empty/>
                    </element>
                    <ref name="wait"/>
                    <ref name="textSpeed"/>
                    <ref name="informationImage"/>
                    <ref name="oggStop"/>
                    <ref name="oggStopLoadPlay"/>
                    <ref name="effectLoad"/>
                    <ref name="effectPlay"/>
                </choice>
            </zeroOrMore>
        </mixed>
    </define>
    <define name="textColor">
        <element name="textColor">
            <attribute name="r">
                <text/>
            </attribute>
            <attribute name="g">
                <text/>
            </attribute>
            <attribute name="b">
                <text/>
            </attribute>
            <attribute name="a">
                <text/>
            </attribute>
            <attribute name="sr">
                <text/>
            </attribute>
            <attribute name="sg">
                <text/>
            </attribute>
            <attribute name="sb">
                <text/>
            </attribute>
            <attribute name="sa">
                <text/>
            </attribute>
            <ref name="windowInline"/>
        </element>
    </define>
    <define name="textFace">
        <element name="textFace">
            <attribute name="style">
                <text/>
            </attribute>
            <ref name="windowInline"/>
        </element>
    </define>
    <define name="wait">
        <element name="wait">
            <attribute name="value">
                <text/>
            </attribute>
            <attribute name="key">
                <text/>
            </attribute>
        </element>
    </define>
    <define name="textSpeed">
        <element name="textSpeed">
            <attribute name="frame"/>
            <ref name="windowInline"/>
        </element>
    </define>
    <define name="informationImage">
        <element name="informationImage">
            <attribute name="src">
                <text/>
            </attribute>
            <attribute name="count">
                <text/>
            </attribute>
        </element>
    </define>
    <define name="oggStop">
        <element name="oggStop">
            <empty/>
        </element>
    </define>
    <define name="oggStopLoadPlay">
        <element name="oggStopLoadPlay">
            <attribute name="src">
                <text/>
            </attribute>
            <attribute name="stop">
                <text/>
            </attribute>
            <attribute name="play">
                <text/>
            </attribute>
        </element>
    </define>
    <define name="effectLoad">
        <element name="effectLoad">
            <attribute name="ch">
                <text/>
            </attribute>
            <attribute name="src">
                <text/>
            </attribute>
        </element>
    </define>
    <define name="effectPlay">
        <element name="effectPlay">
            <attribute name="ch">
                <text/>
            </attribute>
        </element>
    </define>
</grammar>
