[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: XSL documentor
> From: Martin.Borgars@xxxxxxxxxxxxxxxxxxxxxxxx > > I've recently been given another developer's XSL templates to > support now that she's left the team. > > There are a large number of templates. Does anyone know of > any tools that could provide me with details of how all the > templates fit together (i.e. a root map) if I tell it what > the top-level template is? Christof's software sounds good, but I can't connect to his site at the moment. In the meantime, here's a stylesheet that I use to help me maintain a system with 2000+ templates. It produces a nested, static summary XML file that lists the includes, imports, templates and call-templates. I run a second stylesheet with that XML file as input that creates a set of web pages with forward and back links. <?xml version="1.0"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> <xsl:output method="xml" indent="yes"/> <xsl:template match="text()"/> <xsl:template match="/"> <templates> <xsl:apply-templates/> </templates> </xsl:template> <xsl:template match="/" mode="child"> <xsl:apply-templates/> </xsl:template> <xsl:template match="xsl:import"> <import name="{@href}"> <xsl:apply-templates select="document(@href)" mode="child"/> </import> </xsl:template> <xsl:template match="xsl:include"> <include name="{@href}"> <xsl:apply-templates select="document(@href)" mode="child"/> </include> </xsl:template> <xsl:template match="xsl:template"> <template> <xsl:copy-of select="@name | @match"/> <xsl:for-each select=".//xsl:call-template"> <calls name="{@name}"/> </xsl:for-each> </template> </xsl:template> </xsl:stylesheet> Best Wishes, James -- "Be excellent to each other", Bill & Ted
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|