Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Directly parsing fragments causes <application> tags to be skipped #1

Closed
atesgoral opened this issue Apr 18, 2017 · 1 comment
Closed

Comments

@atesgoral
Copy link
Member

atesgoral commented Apr 18, 2017

The Wireshark dictionary files are meant to be used as includes in the parent dictionary.xml file:

<!DOCTYPE dictionary SYSTEM "dictionary.dtd" [
	<!-- Any files added here need to be added to Makefile.am and
	     packaging/nsis/wireshark.nsi -->

	<!ENTITY nasreq			SYSTEM "nasreq.xml">
	<!ENTITY eap			SYSTEM "eap.xml">
	<!ENTITY mobileipv4		SYSTEM "mobileipv4.xml">
	<!ENTITY chargecontrol		SYSTEM "chargecontrol.xml">
	<!ENTITY sunping		SYSTEM "sunping.xml">
	<!ENTITY TGPP			SYSTEM "TGPP.xml">
         ...
	&nasreq;
	&eap;
	&mobileipv4;
	&chargecontrol;
	&sunping;
	&TGPP;
         ...
</dictionary>

The proper way to parse these dictionaries would be to use an XML parser that will interpret <!ENTITY ... SYSTEM ...> to include these fragments, but sax-js isn't such parser.

The problem with the current approach of parsing individual files like TGPP.xml is, they contain more than one <application> root tag. They are invalid XML since there needs to be only one root tag. The SAX parser that is currently being used just ignores the additional <application> tags, leading to many AVPs to be excluded from the compiled dictionary.

@atesgoral
Copy link
Member Author

I might have a fix for this...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant