Ticket #7016 (closed Bugs: fixed)

Opened 22 months ago

Last modified 12 months ago

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

Reported by: Guillaume Ansanay-Alex <guillaume.ansanay@…> Owned by: jewillco
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.


Change History

comment:1 Changed 22 months ago by jewillco

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 12 months 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 12 months ago by jewillco

  • Status changed from new to closed
  • Resolution set to fixed

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


Add a comment

Modify Ticket

Change Properties
<Author field>
as closed
The resolution will be deleted. Next status will be 'reopened'

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

Note: See TracTickets for help on using tickets.