<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE root [
    <!ELEMENT root (#PCDATA|child)*>
    <!ELEMENT child ((child2*,child3*)?,child4)*>
    <!ELEMENT child2 EMPTY>
    <!ELEMENT child3 ANY>
    <!ELEMENT child4 (child2|child3)+>

    <!-- notation declarations -->
    <!NOTATION jpg PUBLIC "JPG 1.0" "image/jpeg">
    <!NOTATION gif PUBLIC "GIF 1.0">
    <!NOTATION png SYSTEM "image/png">

    <!ATTLIST root      attr1 ID #REQUIRED>
    <!ATTLIST child     attr2 NOTATION (jpg|gif|png) #REQUIRED
                        attr3 IDREFS #IMPLIED>
    <!ATTLIST child2    attr4 NMTOKEN "hoge"
                        attr5 (foo|bar|hoge) #IMPLIED>
]>
<root attr1="foo">
    This is a character data.
    <child attr2="jpg" attr3=" foo ">
        <child2 attr4="hoge"/>
        <child3></child3>
        <child4>
            <child2 attr5="hoge" />
            <child3></child3>
        </child4>
    </child>
</root>