download module-dependency-graph.xsl
Language: NonCode
LOC: 0
Project Info
JavaML
Server: SourceForge
Type: cvs
...avaml\javaml\java‑ml\tools\
   call-graph.xsl
   chart-to-svg.xsl
   class-hierarchy.xsl
   ..._XML_Tree_Viewer_35.xsl
   foo.xsl
   identity.xsl
   ...ml-extract-comments.xsl
   javaml-to-csharp.xsl
   javaml-to-html.xsl
   javaml-to-plain-source.xsl
   JavaMLHandlers.pm
   method-rename.xsl
   ...ds-for-each-complex.xsl
   methods-for-each.xsl
   methods.xsl
   module-dependencies.xsl
   ...le-dependency-graph.xsl
   null-xform.xsl
   pretty-printer.xsl
   print-date.xsl
   ReflectDump.java
   showtree-19991008.xsl
   strip-attributes.sgmltrans
   xml-flatten.xslt

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                xmlns:xt="http://www.jclark.com/xt"
                version="1.0"
                extension-element-prefixes="xt">
<!-- Run this with: 
     saxon foo.java.xml module-dependencies.xsl
  -->

<xsl:variable name="arrow" select="' -> '"/>
<xsl:output method="text"/>

<xsl:template match="/">
  <xsl:text>digraph G {</xsl:text>
  <xsl:apply-templates/>
  <xsl:text>}</xsl:text>
</xsl:template>

<xsl:template match="java-class-file">
  <xsl:apply-templates select="import">
    <xsl:with-param name="source" select="@name"/>
  </xsl:apply-templates>
</xsl:template>

<xsl:template match="import">
  <xsl:param name="source"/>
  <xsl:choose>
    <xsl:when test="@module='parser.*'">
      <xsl:text>"</xsl:text>
      <xsl:value-of select="$source"/>
      <xsl:text>" [color = blue];</xsl:text>
    </xsl:when>
  </xsl:choose>
  <xsl:text>"</xsl:text>
  <xsl:value-of select="$source"/>
  <xsl:text>"</xsl:text>
  <xsl:value-of select="$arrow"/>
  <xsl:text>"</xsl:text>
  <xsl:value-of select="@module"/>
  <xsl:text>"</xsl:text>
  <xsl:text>&#xA;</xsl:text>
</xsl:template>

</xsl:stylesheet>

About Koders | Resources | Downloads | Support | Black Duck | Submit Project | Terms of Service | DMCA | Privacy Policy | Site Map| Contact Us