Number: 1283
Title: Allow including of .dot files for reuseability.
Submitter: Pander
Date: Mon Jan 28 06:02:46 2008
Subsys: Dot
Version: 2.17
System: *-*-
Severity: minor
Problem:
Allow including of .dot files for reuseability.

E.g.

file a.dot digraph test { rankdir=LR; include="c.dot"; } file b.dot digraph test { rankdir=TB; include="c.dot"; } file c.dot a -> b; b -> c;

It would take a simple recursive search and replace of all "include='file';" with the content of the named file. Of course reporting errors on line numbers will have to take care of correct messaging (naming also the file).

Implementing this feature will allow reusing graphs or parts of graphs in different end product graphs. Of course on can 'cat' text file together but not all end users are able to set up scripting etc.
Input:

digraph test {
   rankdir=LR;
   include="c.dot";
}
Comments:
Not a perfect solution, but one can always use one's favorite macro language to get the desired effect. In particular, if one uses cpp, the dot parser handles line numbers correctly.
Owner: *
Status: Request