Index: Graph-Easy/t/graphml_yed.t
===================================================================
--- Graph-Easy/t/graphml_yed.t (revision 4571)
+++ Graph-Easy/t/graphml_yed.t (working copy)
@@ -63,12 +63,15 @@
</key>
<graph id="G" edgedefault="directed">
- <node id="A"/>
+ <node id="A">
<data key="d0">red</data>
- <node id="B"/>
+ </node>
+ <node id="B">
+ </node>
- <edge source="A" target="B"/>
+ <edge source="A" target="B">
<data key="d1">blue</data>
+ </edge>
</graph>
</graphml>
EOT
@@ -93,13 +96,16 @@
<key id="d2" for="edge" attr.name="label" attr.type="string"/>
<graph id="G" edgedefault="directed">
- <node id="A"/>
+ <node id="A">
<data key="d0">red</data>
- <node id="B"/>
+ </node>
+ <node id="B">
+ </node>
- <edge source="A" target="B"/>
+ <edge source="A" target="B">
<data key="d1">blue</data>
<data key="d2">train-station & <Ãberlingen "Süd"></data>
+ </edge>
</graph>
</graphml>
EOT2
@@ -122,13 +128,16 @@
<key id="d2" for="edge" attr.name="label" attr.type="string"/>
<graph id="G" edgedefault="directed">
- <node id="<&'">"/>
+ <node id="<&'">">
<data key="d0">red</data>
- <node id="B"/>
+ </node>
+ <node id="B">
+ </node>
- <edge source="<&'">" target="B"/>
+ <edge source="<&'">" target="B">
<data key="d1">blue</data>
<data key="d2">train-station & <Ãberlingen "Süd"></data>
+ </edge>
</graph>
</graphml>
EOT3
@@ -150,14 +159,19 @@
<key id="d0" for="edge" attr.name="label" attr.type="string"/>
<graph id="G" edgedefault="directed">
- <node id="A"/>
- <node id="B"/>
- <node id="C"/>
+ <node id="A">
+ </node>
+ <node id="B">
+ </node>
+ <node id="C">
+ </node>
- <edge source="A" target="B"/>
+ <edge source="A" target="B">
<data key="d0">car</data>
- <edge source="A" target="C"/>
+ </edge>
+ <edge source="A" target="C">
<data key="d0">train</data>
+ </edge>
</graph>
</graphml>
EOT4
@@ -176,7 +190,8 @@
$result = <<EOT5
<graph id="G" edgedefault="directed">
<graph id="Cities"" edgedefault="directed">
- <node id="Bonn"/>
+ <node id="Bonn">
+ </node>
</graph>
</graph>
</graphml>
@@ -199,10 +214,10 @@
$result = <<EOR
<?xml version="1.0" encoding="UTF-8"?>
-<graphml xmlns="
http://graphml.graphdrawing.org/xmlns/graphml"
+<graphml xmlns="
http://graphml.graphdrawing.org/xmlns"
xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance"
xmlns:y="
http://www.yworks.com/xml/graphml"
- xsi:schemaLocation="
http://graphml.graphdrawing.org/xmlns/graphml
+ xsi:schemaLocation="
http://graphml.graphdrawing.org/xmlns
http://www.yworks.com/xml/schema/graphml/1.0/ygraphml.xsd">
EOR
Index: Graph-Easy/t/graphml.t
===================================================================
--- Graph-Easy/t/graphml.t (revision 4571)
+++ Graph-Easy/t/graphml.t (working copy)
@@ -63,12 +63,15 @@
</key>
<graph id="G" edgedefault="directed">
- <node id="A"/>
+ <node id="A">
<data key="d0">red</data>
- <node id="B"/>
+ </node>
+ <node id="B">
+ </node>
- <edge source="A" target="B"/>
+ <edge source="A" target="B">
<data key="d1">blue</data>
+ </edge>
</graph>
</graphml>
EOT
@@ -93,13 +96,16 @@
<key id="d2" for="edge" attr.name="label" attr.type="string"/>
<graph id="G" edgedefault="directed">
- <node id="A"/>
+ <node id="A">
<data key="d0">red</data>
- <node id="B"/>
+ </node>
+ <node id="B">
+ </node>
- <edge source="A" target="B"/>
+ <edge source="A" target="B">
<data key="d1">blue</data>
<data key="d2">train-station & <Ãberlingen "Süd"></data>
+ </edge>
</graph>
</graphml>
EOT2
@@ -122,13 +128,16 @@
<key id="d2" for="edge" attr.name="label" attr.type="string"/>
<graph id="G" edgedefault="directed">
- <node id="<&'">"/>
+ <node id="<&'">">
<data key="d0">red</data>
- <node id="B"/>
+ </node>
+ <node id="B">
+ </node>
- <edge source="<&'">" target="B"/>
+ <edge source="<&'">" target="B">
<data key="d1">blue</data>
<data key="d2">train-station & <Ãberlingen "Süd"></data>
+ </edge>
</graph>
</graphml>
EOT3
@@ -150,14 +159,19 @@
<key id="d0" for="edge" attr.name="label" attr.type="string"/>
<graph id="G" edgedefault="directed">
- <node id="A"/>
- <node id="B"/>
- <node id="C"/>
+ <node id="A">
+ </node>
+ <node id="B">
+ </node>
+ <node id="C">
+ </node>
- <edge source="A" target="B"/>
+ <edge source="A" target="B">
<data key="d0">car</data>
- <edge source="A" target="C"/>
+ </edge>
+ <edge source="A" target="C">
<data key="d0">train</data>
+ </edge>
</graph>
</graphml>
EOT4
@@ -176,7 +190,8 @@
$result = <<EOT5
<graph id="G" edgedefault="directed">
<graph id="Cities"" edgedefault="directed">
- <node id="Bonn"/>
+ <node id="Bonn">
+ </node>
</graph>
</graph>
</graphml>
@@ -199,9 +214,9 @@
$result = <<EOR
<?xml version="1.0" encoding="UTF-8"?>
-<graphml xmlns="
http://graphml.graphdrawing.org/xmlns/graphml"
+<graphml xmlns="
http://graphml.graphdrawing.org/xmlns"
xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="
http://graphml.graphdrawing.org/xmlns/graphml
+ xsi:schemaLocation="
http://graphml.graphdrawing.org/xmlns
http://graphml.graphdrawing.org/xmlns/1.0/graphml.xsd">
EOR
Index: Graph-Easy/lib/Graph/Easy/As_graphml.pm
===================================================================
--- Graph-Easy/lib/Graph/Easy/As_graphml.pm (revision 4571)
+++ Graph-Easy/lib/Graph/Easy/As_graphml.pm (working copy)
@@ -111,9 +111,9 @@
my $txt = <<EOF
<?xml version="1.0" encoding="UTF-8"?>
-<graphml xmlns="
http://graphml.graphdrawing.org/xmlns/graphml"
+<graphml xmlns="
http://graphml.graphdrawing.org/xmlns"
xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance"##Y##
- xsi:schemaLocation="
http://graphml.graphdrawing.org/xmlns/graphml
+ xsi:schemaLocation="
http://graphml.graphdrawing.org/xmlns
##SCHEMA##">
<!-- Created by Graph::Easy v##VERSION## at ##DATE## -->
@@ -313,11 +313,13 @@
my ($self, $indent, $ids) = @_;
my $g = $self->{graph};
- my $txt = $indent . '<node id="' . $g->_safe_xml($self->{name}) . "\"/>\n";
+ my $txt = $indent . '<node id="' . $g->_safe_xml($self->{name}) . "\">\n";
$txt .= $g->_attributes_as_graphml($self, $indent, $ids->{node});
- $txt;
+ $txt .= "$indent</node>\n";
+
+ return $txt;
}
#############################################################################
@@ -332,10 +334,12 @@
my $g = $self->{graph};
my $txt = $indent . '<edge source="' . $g->_safe_xml($self->{from}->{name}) .
- '" target="' . $g->_safe_xml($self->{to}->{name}) . "\"/>\n";
+ '" target="' . $g->_safe_xml($self->{to}->{name}) . "\">\n";
$txt .= $g->_attributes_as_graphml($self, $indent, $ids->{edge});
+ $txt .= "$indent</edge>\n";
+
$txt;
}
Index: Graph-Easy/bin/graph-easy
===================================================================
--- Graph-Easy/bin/graph-easy (revision 4571)
+++ Graph-Easy/bin/graph-easy (working copy)
@@ -634,13 +634,18 @@
<key id="d0" for="edge" attr.name="label" attr.type="string"/>
<graph id="G" edgedefault="directed">
- <node id="Berlin"/>
- <node id="Bonn"/>
- <node id="Ulm"/>
- <edge source="Bonn" target="Berlin"/>
+ <node id="Berlin">
+ </node>
+ <node id="Bonn">
+ </node>
+ <node id="Ulm">
+ </node>
+ <edge source="Bonn" target="Berlin">
<data key="d0">car</data>
- <edge source="Bonn" target="Ulm"/>
+ </edge>
+ <edge source="Bonn" target="Ulm">
<data key="d0">car</data>
+ </edge>
</graph>
<graphml>