RE: [xsl] Critique/comments sought: XML/XSLT website documentation project

Subject: RE: [xsl] Critique/comments sought: XML/XSLT website documentation project
From: "Dan Sumption" <dan@xxxxxxxxxxxxxx>
Date: Thu, 18 Sep 2003 23:26:40 +0100
> I changed the template/@name & call-template to a 
> template/@match & apply-template. I couldn't get rid of the 
> for-each and strictly use apply-templates because it would 
> not change the child's angle. I don't know why 
> apply-templates doesn't work in place of for-each???

Yeah, I realised that part was a little messy :) I changed the logic of
what I was doing several times while doing it, and ended up with things
that way pretty much because it worked rather than because it was in the
least bit graceful. I'd be interested to see what your version looks
like (translation: it sounds simpler to look at your version than to
work out the template matching and structure myself) - you can mail me
off-list with a copy if that's OK.

> Since we have folder and page nodes I multiplied the cx and 
> cy variables for folders by 4 to give more room for larger 
> sites. In doing so, I still get overlaps. Perhaps you have 
> plans for collision detection? :)

Haha, actually one of the biggest things that put me off starting this
was that I had no idea how to detect/prevent collisions (but that's also
one of the biggest reasons I hate Visio - it's got a lot better in
recent versions, but I still seem to end up spending more time tidying
up lines than I do entering any kind of useful data). I was actually
really surprised when I realised that the abstract-seeming code I'd
entered managed to do a pretty good job of laying things out - mainly
because of the way the angles are handled, and the fact that line length
decreases the further you go from the "hub". But beyond that, I don't
really know where I'd start.

> Another feature might be to add interactivity where you can 
> click on a node to expand/collapse it (and center the node 
> clicked in the viewport).

That's something I'd certainly considered, as well as adding drag
functionality so that you can reposition nodes yourself. But it took
enough for me to get to grips with the basic SVG - I want to take a deep
breath before I start tackling scripting and DOM stuff as well.

In the meantime, something else very simple which I'd meant to include
but forgot was the ability to set a start page - for a very large site
you could just do this several times, and so map the site in a series of
smaller diagrams rather than one big messy one.


 XSL-List info and archive:

Current Thread