Hi All I'd like to use GraphViz to create a graph of the entire node structure of a (simple) page. Keeping the page simple and just for experimentation. Not trying to change any values of node lists, just to output values and structures etc. Before I get too far, is it safe/possible to do this? If so, would anyone have some pseudo code I can use to get me started in the right direction...? Many thanks in advance for suggestions etc. Warm regards Graham
On 11/22/2010 03:54 PM, Graham Douglas wrote:
Hi All
I'd like to use GraphViz to create a graph of the entire node structure of a (simple) page. Keeping the page simple and just for experimentation. Not trying to change any values of node lists, just to output values and structures etc.
Before I get too far, is it safe/possible to do this? If so, would anyone have some pseudo code I can use to get me started in the right direction...?
Many thanks in advance for suggestions etc.
The simplest is: callback.register('pre_output_filter', function (head) ... return head end) This callback does not replace any code, so you can do whatever you want without interfering, as long as you remember to pass back 'head'. This callback runs just before box255 is packaged for the output routine, btw. Best wishes, Taco
Taco Hoekwater wrote:
On 11/22/2010 03:54 PM, Graham Douglas wrote:
Hi All
I'd like to use GraphViz to create a graph of the entire node structure of a (simple) page. Keeping the page simple and just for experimentation. Not trying to change any values of node lists, just to output values and structures etc.
Before I get too far, is it safe/possible to do this? If so, would anyone have some pseudo code I can use to get me started in the right direction...?
Many thanks in advance for suggestions etc.
The simplest is:
callback.register('pre_output_filter', function (head) ... return head end)
This callback does not replace any code, so you can do whatever you want without interfering, as long as you remember to pass back 'head'. This callback runs just before box255 is packaged for the output routine, btw.
Best wishes, Taco
Many thanks Taco, much appreciated, as always. Warm regards Graham
Hi Graham, you know https://gist.github.com/556247 ? This is a backend for writing the nodelist to a gv file, perhaps you can use (parts of) it? Patrick
participants (3)
-
Graham Douglas
-
Patrick Gundlach
-
Taco Hoekwater