Document(Document, '1.0', 'UTF-8', None)
  DocumentType(DocumentType, root, None, None)
    ElementDecl(ElementDecl, root, (#PCDATA|child)*)
    ElementDecl(ElementDecl, child, (((child2+,child3)|child3)?,child4)*)
    ElementDecl(ElementDecl, child2, EMPTY)
    ElementDecl(ElementDecl, child3, ANY)
    ElementDecl(ElementDecl, child4, (child2|child3)+)
    Comment(Comment, ' entity declarations ')
    EntityDecl(EntityDecl, ent1, foo.gif, None, gif, 'None')
    EntityDecl(EntityDecl, ent2, bar.png, None, png, 'None')
    EntityDecl(EntityDecl, ent3, None, None, None, 'entity-value')
    NotationDecl(NotationDecl, jpg, image/jpeg, JPG 1.0)
    NotationDecl(NotationDecl, gif, None, GIF 1.0)
    NotationDecl(NotationDecl, png, image/png, None)
    AttlistDecl(AttlistDecl, root, attr1, ID, #REQUIRED)
    AttlistDecl(AttlistDecl, child, attr2, NOTATION (gif|jpg|png), #REQUIRED)
    AttlistDecl(AttlistDecl, child, attr3, ENTITY, #REQUIRED)
    AttlistDecl(AttlistDecl, child2, attr4, ENTITIES, #REQUIRED)
    AttlistDecl(AttlistDecl, child2, attr5, (bar|foo|hoge), #IMPLIED)
  Element(Element, root, root, None, None)
    Attribute(Attribute, attr1, attr1, None, None, 'foo')
      Text(Text, 'foo')
    Text(Text, '
    This is a character data.
    ')
    Element(Element, child, child, None, None)
      Attribute(Attribute, attr2, attr2, None, None, 'jpg')
        Text(Text, 'jpg')
      Attribute(Attribute, attr3, attr3, None, None, 'ent3')
        Text(Text, 'ent3')
      Text(Text, '
        ')
      Element(Element, child2, child2, None, None)
        Attribute(Attribute, attr4, attr4, None, None, 'ent1 ent2')
          Text(Text, 'ent1 ent2')
      Text(Text, '
        ')
      Element(Element, child3, child3, None, None)
      Text(Text, '
        ')
      Element(Element, child4, child4, None, None)
        Text(Text, '
            ')
        Element(Element, child2, child2, None, None)
          Attribute(Attribute, attr4, attr4, None, None, 'ent1 ent2')
            Text(Text, 'ent1 ent2')
          Attribute(Attribute, attr5, attr5, None, None, 'hoge')
            Text(Text, 'hoge')
        Text(Text, '
            ')
        Element(Element, child3, child3, None, None)
        Text(Text, '
        ')
      Text(Text, '
    ')
    Text(Text, '
')
