Opened 5 years ago

Closed 5 years ago

#7016 closed Bugs (fixed)

"graphml" value for the "for" attribute of a key shouldn't throw an exception

Reported by: Guillaume Ansanay-Alex <guillaume.ansanay@…> Owned by: Jeremiah Willcock
Milestone: To Be Determined Component: graph
Version: Boost 1.49.0 Severity: Problem
Keywords: Cc:


The GraphML specification ( states that the possible values for the "for" attribute of a key are "all", "graphml", "graph", "node", "edge", "hyperedge", "port" and "endpoint".

(Actually the "graphml" value is absent from the documentation of the scheme, but present as a possible value in the .xsd file. I have sent an e-mail to the authors of the specification, mentioning this ambiguity.)

If the value is "graphml", the graphml reader in BGL throws an exception : "Attribute for is not valid: graphml".

This value should be added to the ones accepted by the BGL reader, otherwise files such as those produced by the yEd graph editor cannot be read.

Attachments (0)

Change History (3)

comment:1 Changed 5 years ago by Jeremiah Willcock

What are the semantics for graphml when it is used as the value of for? I don't see it mentioned anywhere in the spec or in the yFiles documentation other than as just a possible option. How does yEd use for="graphml"?

comment:2 Changed 5 years ago by Will Plano

I've just come across this defect, also while trying to parse a yEd file.

According to the documentation at the for="graphml" key attribute is for data associated with "the whole collection of graphs described by the content of <graphml>" Since read_graphml only deals with a single graph in the file, I beleive it is correct to silently ignore this section.

As for how yEd uses it, it looks like it's for shared resources within the file...

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
snip schema definitions for spam filter
  <!--Created by yFiles for Java 2.10-->
  <key for="graphml" id="d0" yfiles.type="resources"/>
  <data key="d0">

see the attached patch on the duplicate ticket 7155

comment:3 Changed 5 years ago by Jeremiah Willcock

Resolution: fixed
Status: newclosed

(In [83961]) Applied patch from #7155 to add "graphml" as a value for "for"; fixes #7155; fixes #7016

Modify Ticket

Change Properties
Set your email in Preferences
as closed The owner will remain Jeremiah Willcock.
The resolution will be deleted.

Add Comment

E-mail address and name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.