> > > Am I getting everything wrong or could this XML representation of a GUI be > > > handled by libglade? After all glade stores the GUI in XML and libglade can > > > display it in an application. > > > > > > > This would requiere translation of the XML code, Glade knows about Gtk+ and > > GNOME widgets, not about nodes and relations. > > But I think basically both use the same approach. > > :-) Again, there is some confusion here. Jean-Marc and I are talking about > the representation of a node's interface in XML. You (and Brad) have been > using the term 'XML representation' to mean the dataflow structure of a > network. > > We should probably add 'of a node' or 'of a network' to this term to avoid > confusion :-) OK, I'll try to summerize the way XML is used in Overflow with an example: <?xml version="1.0"?> <Document> A document is a file and can contain many networks (it's the equivalent of a .c) <Network type="subnet" name="MAIN"> A network if the C equivalent of a function. Each document must contain a MAIN network. <Node name="node1" type="Constant" x="-294.000000" y="101.000000"> <Parameter name="VALUE" type="subnet_param" value="IN"/> </Node> This is a node definition. The name is arbitrary, while the type corresponds to an Overflow node class. x and y are for the GUI. The parameters have to correspond to what the node expects. <Node name="node5" type="MAIN_LOOP" x="-26.000000" y="108.000000"> <Parameter name="FRAME_SIZE" type="int" value="256"/> </Node> <Node name="node2" type="ExecStream" x="-165.000000" y="98.000000"> <Parameter name="COMMAND" type="string" value="cat"/> </Node> <Node name="node6" type="Constant" x="-162.000000" y="186.000000"> <Parameter name="VALUE" type="string" value="frames"/> </Node> <Node name="node8" type="OutputStream" x="43.000000" y="190.000000"/> <Node name="node9" type="Save" x="243.000000" y="119.000000"/> <Link from="node2" output="OUTPUT" to="node5" input="INPUT"/> <Link from="node1" output="VALUE" to="node2" input="INPUT"/> <Link from="node6" output="VALUE" to="node8" input="INPUT"/> <Link from="node5" output="TRAIN_IN" to="node9" input="OBJECT"/> <Link from="node8" output="OUTPUT" to="node9" input="STREAM"/> Links define which node is connected to which. Input and output names need to be defined since nodes can have more than one input/output. <NetOutput name="OUTPUT" node="node9" terminal="OUTPUT"/> NetOutput means which node (and which output of that node) will be used as the output of the whole network. The same applies to NetInput and NetCondition. </Network> <Network type="iterator" name="MAIN_LOOP"> <Node name="node1" type="AudioStream" x="-526.000000" y="93.000000"> <Parameter name="LENGTH" type="subnet_param" value="FRAME_SIZE"/> <Parameter name="ENCODING" type="string" value="LIN16"/> <Parameter name="STREAM_TYPE" type="string" value="FILE"/> </Node> <Node name="node2" type="NotDone" x="-344.000000" y="45.000000"/> <Node name="node10" type="FrameAccumulator" x="-336.000000" y="131.000000"> <Parameter name="LENGTH" type="int" value="256"/> <Parameter name="CACHEALL" type="int" value="1"/> </Node> <Link from="node1" output="OUTPUT" to="node2" input="INPUT"/> <Link from="node1" output="OUTPUT" to="node10" input="INPUT"/> <NetInput name="INPUT" node="node1" terminal="INPUT"/> <NetCondition name="CONDITION" node="node2" terminal="OUTPUT"/> <NetOutput name="TRAIN_IN" node="node10" terminal="OUTPUT"/> </Network> <Parameter name="IN" type="string" value="/data/ntt/french/*/*"/> </Document> Questions? Jean-Marc -- Jean-Marc Valin Universite de Sherbrooke - Genie Electrique valj01 at gel.usherb.ca