Attached is a simple XSL file you can use. You might want to adapt it to display different Informations, though.

Stephan

Nick Heudecker wrote:

Adrien,

StrutsDoc, my project, does this.  You can check it out at:
http://struts.sf.net/strutsdoc

Feel free to contact me with questions or comments.

On Wed, Nov 12, 2003 at 02:41:22PM +0100, Adrien GEYMOND wrote:

Hello all,

I am looking for a nice presentation of the struts-config.xml. I want to
apply a Xslt file on the struts-config.xml in order to have a well displayed
view of my struts-config. the result format should be HTML, SVG or ....

Does somedy have already seen something like that ? Is there a tool,
somebody has already developped an Xsl for doing that ?

....
Today, i've found on google a Xslt which  examines the struts-config.xml and
looks for inconsistencies and reports the errors.
http://www.aida2.org/ndpsoftware.com/downloads-xsl-struts.php

thanks for advance ...

adrien


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]


<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform";>

<xsl:output method="html" />

<xsl:variable name="server" select="'http://127.0.0.1:8080/crs'"/>

<!-- Head *********** -->
<xsl:template match="struts-config">

<html>
   <head>
      <title>Struts Forward Definitionen</title>
      <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1" />
   </head>
   <body>
   <xsl:apply-templates select="*"/>
  </body></html>
</xsl:template>

<xsl:template match="*">
</xsl:template>

<xsl:template match="//global-forwards">
   <h2>Forwards</h2>
   <table border="1">
   <tr><th>Link</th><th>Datei</th></tr>
   <xsl:apply-templates select="*"/>
   </table> <br /> <br />
</xsl:template>

<xsl:template match="forward">
  <tr>
     <td><xsl:value-of select="@name" /></td>
     <td>      
      <a><xsl:attribute name="href"><xsl:value-of 
      select="$server"/><xsl:value-of 
      select="@path" /></xsl:attribute>
      <xsl:value-of select="@path" />
      </a>
     </td>
 </tr>
</xsl:template>


<!-- ************************************************** -->

<xsl:template match="//form-beans">
   <h2>Form-Beans</h2>
   <table border="1">
   <tr><th>Name</th><th>Klasse</th></tr>
   <xsl:apply-templates select="*"/>
   </table> <br /> <br />
</xsl:template>

<xsl:template match="form-bean">
  <tr>
     <td><xsl:value-of select="@name" /></td>
     <td> <xsl:value-of select="@type" /></td>     
 </tr>
</xsl:template>




<!-- ************************************************** -->

<xsl:template match="//action-mappings">
   <h2>Action-Mappings</h2>
   <table border="1">
   <tr><th>Name</th><th>Pfad</th></tr>
   <xsl:apply-templates select="*"/>
   </table> <br /> <br />
</xsl:template>

<xsl:template match="action">
  <tr>
     <td><xsl:value-of select="@name" /></td>
     <td> <xsl:value-of select="@path" />:
     <table border="0">
	<xsl:apply-templates select="*"/>     
     </table>
     </td>     
 </tr>
</xsl:template>


<xsl:template match="action/forward">
  <tr><td><xsl:value-of select="@name" /></td>
  <td> ==&gt; 
      <a><xsl:attribute name="href"><xsl:value-of 
      select="$server"/><xsl:value-of 
      select="@path" /></xsl:attribute>
      <xsl:value-of select="@path" />
      </a>  

  </td></tr>
</xsl:template>

</xsl:stylesheet>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to