Wireshark-users: [Wireshark-users] DTD in XML dissector
From: Fam Dijns <dijns@xxxxxxx>
Date: Wed, 12 May 2010 17:41:24 +0200

Hi

 

I am a newbie, so I am apologize for stupid questions. Since I am a newbie, I am starting at square 1 for the XML dissector. When looking to the wiki page of the XML dissector, I took this DTD

 

<?wireshark:protocol protocol_name="this" media="application/this"

hierarchy="yes" ?>

<!DOCTYPE this [

  <!ELEMENT that (other|another|#PCDATA) >

  <!-- #PCDATA is assumed to be there even it isn't -->

 

  <!ATTLIST that

     one CDATA #REQUIRED

     two CDATA #IMPLIED  >

  <!-- we don't care of #REQUIRED, #IMPLIED or other #THINGS  -->

 

  <!ELEMENT other (#PCDATA) >

  <!ELEMENT another (#PCDATA) >

]>

 

The Wiki says that it will create these filters

 

this

this.that

this.that.one

this.that.two

this.that.other

this.that.another

 

which is correct. But I got additional filters as well called “this.other” and “this.anothor” which is not valid for the xml expected

 

<this>

   aaa

   <that _one_="bbb">

      ccc

      <other>ddd</other>

   </that>

   eee

</this>

 

As I understand the DTD correctly, the elements “other” and  “another” are always a child of the element “that”.

 

In this case there are just two extra filters, but in my case it ends up with a lot of unnecessary filters, which is confusing for the users.

 

Any help is appreciated

 

Richard