Re: [xsl] XSLT and SVG

Subject: Re: [xsl] XSLT and SVG
From: "Andrea Pertosa" <andrea.pertosa@xxxxxxxxx>
Date: Tue, 18 Jul 2006 14:31:29 -0400
Hugh,
see below...

On 7/18/06, CyberSpace Industries 2000 Inc. <csi2000@xxxxxxxxxxxxxxx> wrote:
I did a project once where the input was XML text and the output was to be a
hiererchical family tree that was meant to show  - for this particular
equipment manual, what were the prerequisite manuals (parents), and what
detailed manuals followed(child).  Each manual was represented as a box with
manual number, title and a third thing I forget.   The difficulty arose when
there were a variable number of parent and child manuals for each manual,
and the layout was meant to be centered and symmetrical on the page.  Each
manual was to be connected to all its parent and child manuals.  This sounds
sort of what you are doing - but simpler.

I has similar difficulties and eventually wound up writing XSLT to convert
every possible case into the corresponding SVG diagram (e.g. 1 parent, 2
parents, 3 parents... up to a max of 20 parents).  I tried using called
templates - but setting up all the parameters and then calling occupied just
as much space as writing out the  individual cases.  In both cases I had to
determine start coordinates and end coordinates for the connecting lines -
and handle cross overs etc.

The difference here is that there are no predefined limits to the number of various connections. Even if I was able to sort out the simplest scenario (two bodies connected by one joint) I think that I would run into issue with the actual formatting of the page, where to locate the diagrams, intersecting lines etc...

The project got canned before I could completely finish - but the XML to SVG
was working quite well.


this sounds promising to hear.


You seem to be calculating a position based on the position of the entry in
the XML.  Your problem is to use the XML to drive the connectors.   I don't
understand your XML - did you mean

  <Constraint_Joint
    body1_id            = "30301"
    body2_id            = "30302"
  />

Yes, I'm sorry in an effort of simplifying the XML file I made a mistake. I meant exactly what you wrote above.


I could look up what I did on this project and see what applies to your
project.

If you could share anything that applies, that would be *much* appreciated! Andrea.

Current Thread