Opened 10 years ago
Closed 10 years ago
#7016 closed Bugs (fixed)
"graphml" value for the "for" attribute of a key shouldn't throw an exception
Reported by: | Owned by: | Jeremiah Willcock | |
---|---|---|---|
Milestone: | To Be Determined | Component: | graph |
Version: | Boost 1.49.0 | Severity: | Problem |
Keywords: | Cc: |
Description
The GraphML specification (http://graphml.graphdrawing.org/xmlns/1.1/graphml-structure.xsd) 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 (3)
comment:1 by , 10 years ago
comment:2 by , 10 years ago
I've just come across this defect, also while trying to parse a yEd file.
According to the documentation at graphml.graphdrawing.org/specification/schema_element.xsd.htm 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"/> ... snip ... <data key="d0"> <y:Resources/> </data> </graphml>
see the attached patch on the duplicate ticket 7155
What are the semantics for
graphml
when it is used as the value offor
? 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 usefor="graphml"
?