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]
Other format: [Raw text]

RE: XSLT to summarise an XSLT


> For purposes of enhancing/checking the XSLTs I think there would be some
merit in having an XSLT which could pull all templates into one 
> summarised output. XSLT is unwelding when you have template calls with
parameters. Multiple includes make it time-consuming to locate a
> template.
>
> I'm thinking the output would look something closer to procedural code
like VB.

Seems reasonable, I could almost use something like this.  However, it would
seem to me that what you want is a dependency graph, and as such,
hierarchical XML might be a good fit, at least as an intermediate format?
IE;

	<stylesheet name="gunk.xsl">
		<import name="blah.xsl>
			<template match="fee" name="foo">
				<parameter name="test" default="0"/>
			</template>
		</import>
		<template match="root">
			<call name="foo"/>
		</template>
	</stylesheet>

would alert you to the fact that the "root" template can end up invoking the
"foo" template without passing it the "test" parameter (but there is a
default defined for this case).  Of course, this is only better than the
original source in that it eliminates some of the noise and makes the import
targets more obvious.  However, it should be relatively easy to produce?

The problem I see with a VB type pseudo code is that I don't see how you
would map multiple match targets without getting into building (possibly
large) switch statements all over the place; the output could be bigger than
the input.

After you get the reduced XML output then you could play with rendering it
in SVG :-)




 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


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