Opened 16 years ago

Closed 13 years ago

#900 closed Bugs (fixed)

graphml reader namespace handling is broken

Reported by: count0 Owned by: Jeremiah Willcock
Milestone: Component: graph
Version: None Severity: Problem
Keywords: Cc:

Description

I believe the modifications done in

http://boost.cvs.sourceforge.net/boost/boost/libs/graph/src/graphml.cpp?r1=1.1&r2=1.2

break xml namespace processing, since it will strip any namespace information from all tags (everything before "|"), not only those which,belong to the graphml namespace. So, tags belonging to other namespaces, such as "foo:node", will be wrongly parsed as graphml tags, eg. "node"...

I'm sending attached patches which revert to the old behavior and have two further modifications:

- Better expat error handling. It now informs the user where in the file a problem occured
- Reordering of tag processing for possible speed improvement ("node" is more frequent than "graph", so it should be tested first, etc)

I'm also sending slightly improved documentation and test case.

Attachments (6)

graphml.cpp.patch (10.0 KB ) - added by Jeremiah Willcock 13 years ago.
graphml.hpp.patch (636 bytes ) - added by Jeremiah Willcock 13 years ago.
reader_test.cc (3.2 KB ) - added by Jeremiah Willcock 13 years ago.
reader-test.xml (2.4 KB ) - added by Jeremiah Willcock 13 years ago.
read_graphml.rst (5.6 KB ) - added by Jeremiah Willcock 13 years ago.
write_graphml.rst (7.8 KB ) - added by Jeremiah Willcock 13 years ago.

Download all attachments as: .zip

Change History (15)

comment:1 by count0, 16 years ago

Logged In: YES 
user_id=365386
Originator: YES

File Added: graphml.hpp.patch

comment:2 by count0, 16 years ago

Logged In: YES 
user_id=365386
Originator: YES

File Added: reader_test.cc

comment:3 by count0, 16 years ago

Logged In: YES 
user_id=365386
Originator: YES

File Added: reader-test.xml

comment:4 by count0, 16 years ago

Logged In: YES 
user_id=365386
Originator: YES

File Added: read_graphml.rst

comment:5 by count0, 16 years ago

Logged In: YES 
user_id=365386
Originator: YES

File Added: write_graphml.rst

comment:6 by Jeremiah Willcock, 13 years ago

Severity: Showstopper

I do not see any files anymore. It appears the parse error issue has been fixed; have the other issues?

comment:7 by Jeremiah Willcock, 13 years ago

Severity: ShowstopperProblem

by Jeremiah Willcock, 13 years ago

Attachment: graphml.cpp.patch added

by Jeremiah Willcock, 13 years ago

Attachment: graphml.hpp.patch added

by Jeremiah Willcock, 13 years ago

Attachment: reader_test.cc added

by Jeremiah Willcock, 13 years ago

Attachment: reader-test.xml added

by Jeremiah Willcock, 13 years ago

Attachment: read_graphml.rst added

by Jeremiah Willcock, 13 years ago

Attachment: write_graphml.rst added

comment:8 by Jeremiah Willcock, 13 years ago

Owner: changed from jsiek to Jeremiah Willcock
Status: assignednew

These are the files from the old tracker.

comment:9 by Jeremiah Willcock, 13 years ago

Resolution: Nonefixed
Status: newclosed

(In [53650]) Applied patches from ticket #900; fixes #900

Note: See TracTickets for help on using tickets.