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

RE: XSL documentor

Subject: RE: XSL documentor
From: "James Petry" <jpetry@xxxxxxxxx>
Date: Fri, 16 Jul 2004 12:25:02 +0100
james petry
> 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 

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.