This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

XSL-T to map a D(A)G


Hi all,

I've an XML file that describes a DG and am looking for an xsl-t to map
this into a SVG/PNG image.

The XML consists of a couple of nodes with links inbetween. The links
are direckted, and one node is the start.

something like:

<graph start="1">
  <node id="1">
    <link to="2" />
    <link to="3" />
  </node>
  <node id="2">
    <link to="4" />
  </node>
  <node id="3" />
  <node id="4" />
</graph>

this should be mapped into:

                  .---.
                  | 1 |
                  `---'
                    |
              .-----^-----.
              |           |
            .---.       .---.
            | 2 |       | 3 |
            `---'       `---'
              |
            .---.
            | 4 |
            `---'

I know that such a mapping is not easy and  due to the scructur of the
XML it is possible to created the strangest graphs :-(
But I'd be happy just do map a DAG, ignorring all the backward
references.

I don't need this immediatly, because this functionality will only be
the suggar for my current project.
Anyway, has anyone ever written a D(A)G mapper in XSL-T? 
Or should I just forget XSL-T for this and use a "real" programming
language.

Thanks,
    Goetz.

PGP signature


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]