[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: XSLT to summarise an XSLT

Subject: RE: XSLT to summarise an XSLT
From: "Hunsberger, Peter" <Peter.Hunsberger@xxxxxxxxxx>
Date: Tue, 27 Aug 2002 11:07:37 -0500
xsl import dependency graph
> 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


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.