[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

GXL parsing Sukanya's result file



Hi All,

Sukanya wrote a converter java program to convert the bad syntax in the generated gxl file for Rigi I believe, to corrected gxl.

So far the data binding takes it in no problem. This was surprising in two ways:

1. What puzzled me at first was noticing it (Sukanya's gxl file) lacked the attribute xmlns:xlink in the gxl tag -- something the data bindings did not like in some other gxl files. What I now believe is happening is that for those files that use xlink in them, the parser in data bindings is complaining if it does not have a declaration of the XMl namespace for Xlink in it, which is want the <gxl xmlns:xlink "..."> stuff does.

2. The data binding did not complain that the required graph it attribute was missing:

is <graph>

should be something like <graph id ="some-id">

see dtd
<!ELEMENT graph (type? , attr* , ( node | edge | rel )* %graph-extension;)

<!ATTLIST graph
   id          ID       #REQUIRED
   role        NMTOKEN  #IMPLIED
   edgeids     ( true | false ) "false"
   hypergraph  ( true | false ) "false"
   edgemode    ( directed | undirected |
                   defaultdirected | defaultundirected) "directed"
   %graph-attr-extension;


I'm not sure why the data binding lets this go ... I should perhaps try it with the validation methods turned on.


Yuzo

Sukanya's gxl file:

<gxl>
<graph>
<node id="11!listcreate" type="Function"></node>
<node id="116!Rigi" type="Syntactic"></node>
<node id="140!Root" type="Syntactic"></node>
<node id="151!element" type="Data"></node>
<node id="163!listnext" type="Function"></node>
<node id="179!elementcreate" type="Function"></node>
<node id="199!elementinfo" type="Function"></node>
<node id="207!list" type="Data"></node>
<node id="225!src" type="System"></node>
<node id="227!elementsetnext" type="Function"></node>
<node id="243!listinsert" type="Function"></node>
<node id="247!listfirst" type="Function"></node>
<node id="255!listid" type="Function"></node>
<node id="273!Base" type="System"></node>
<node id="275!mylistprint" type="Function"></node>
<node id="291!main" type="Function"></node>
<node id="295!elementnext" type="Function"></node>
<node id="303!listinit" type="Function"></node>
<edge id="4023216" from="11!listcreate" type="data" to="207!list"></edge>
<edge id="4013776" from="116!Rigi" type="level" to="273!Base"></edge>
<edge id="4013824" from="140!Root" type="level" to="116!Rigi"></edge>
<edge id="4025760" from="151!element" type="data" to="151!element"></edge>
<edge id="4023504" from="163!listnext" type="data" to="207!list"></edge>
<edge id="4023456" from="163!listnext" type="call" to="295!elementnext"></edge>
<edge id="4023264" from="179!elementcreate" type="data" to="151!element"></edge>
<edge id="4025808" from="199!elementinfo" type="data" to="151!element"></edge>
<edge id="4025568" from="207!list" type="data" to="151!element"></edge>
<edge id="4022832" from="225!src" type="level" to="11!listcreate"></edge>
<edge id="4023024" from="225!src" type="level" to="151!element"></edge>
<edge id="4021400" from="225!src" type="level" to="163!listnext"></edge>
<edge id="4022736" from="225!src" type="level" to="179!elementcreate"></edge>
<edge id="4023072" from="225!src" type="level" to="199!elementinfo"></edge>
<edge id="4022688" from="225!src" type="level" to="207!list"></edge>
<edge id="4022640" from="225!src" type="level" to="227!elementsetnext"></edge>
<edge id="4022784" from="225!src" type="level" to="243!listinsert"></edge>
<edge id="4022976" from="225!src" type="level" to="247!listfirst"></edge>
<edge id="4022880" from="225!src" type="level" to="255!listid"></edge>
<edge id="4022592" from="225!src" type="level" to="275!mylistprint"></edge>
<edge id="4021448" from="225!src" type="level" to="291!main"></edge>
<edge id="4021496" from="225!src" type="level" to="295!elementnext"></edge>
<edge id="4022928" from="225!src" type="level" to="303!listinit"></edge>
<edge id="4025472" from="227!elementsetnext" type="data" to="151!element"></edge>
<edge id="4023120" from="243!listinsert" type="data" to="207!list"></edge>
<edge id="4023168" from="243!listinsert" type="call" to="227!elementsetnext"></edge>
<edge id="4025712" from="247!listfirst" type="data" to="207!list"></edge>
<edge id="4025616" from="255!listid" type="data" to="207!list"></edge>
<edge id="4021352" from="273!Base" type="level" to="225!src"></edge>
<edge id="4023408" from="275!mylistprint" type="call" to="163!listnext"></edge>
<edge id="4023312" from="275!mylistprint" type="call" to="199!elementinfo"></edge>
<edge id="4023360" from="275!mylistprint" type="call" to="247!listfirst"></edge>
<edge id="4025424" from="291!main" type="call" to="11!listcreate"></edge>
<edge id="4025280" from="291!main" type="call" to="179!elementcreate"></edge>
<edge id="4025328" from="291!main" type="call" to="243!listinsert"></edge>
<edge id="4025376" from="291!main" type="call" to="275!mylistprint"></edge>
<edge id="4025520" from="295!elementnext" type="data" to="151!element"></edge>
<edge id="4025664" from="303!listinit" type="data" to="207!list"></edge>
</graph>
</gxl>