[Ejtools-cvs] CVS: applications/jmx.browser/src/webapp/content index.jsp.old,NONE,1.1 index.xml,NONE
Brought to you by:
letiemble
From: Laurent E. <let...@us...> - 2002-05-17 20:41:34
|
Update of /cvsroot/ejtools/applications/jmx.browser/src/webapp/content In directory usw-pr-cvs1:/tmp/cvs-serv8722/jmx.browser/src/webapp/content Modified Files: style.xsl tree.xsl Added Files: index.jsp.old index.xml Log Message: Add icons --- NEW FILE: index.jsp.old --- (This appears to be a binary file; contents omitted.) --- NEW FILE: index.xml --- (This appears to be a binary file; contents omitted.) Index: style.xsl =================================================================== RCS file: /cvsroot/ejtools/applications/jmx.browser/src/webapp/content/style.xsl,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** style.xsl 24 Apr 2002 20:03:29 -0000 1.1 --- style.xsl 17 May 2002 20:41:31 -0000 1.2 *************** *** 1,256 **** ! <?xml version="1.0"?> ! <xsl:stylesheet version='1.0' xmlns:xsl='http://www.w3.org/1999/XSL/Transform'> ! <xsl:output method="html" version="1.0" encoding="UTF-8" indent="yes" omit-xml-declaration="yes" /> ! ! <xsl:template match="/Page"> ! <html> ! <head> ! <title><xsl:value-of select="@title"/></title> ! <link rel="stylesheet" type="text/css" href="style.css"/> ! </head> ! <body> ! <xsl:apply-templates/> ! </body> ! </html> ! </xsl:template> ! ! <xsl:template match="Spacer"> ! <img border="0" src="images/white.png" width="5" height="15"/> ! </xsl:template> ! ! <xsl:template match="TitleBlock"> ! <table border="0" width="100%" bgcolor="#CCCCCC" cellspacing="0"> ! <tr> ! <td width="100%"> ! <table border="0" width="100%" cellspacing="0" cellpadding="3" bgcolor="#FFFFFF"> ! <tr> ! <td><b><font face="verdana,arial,sans-serif" color="#000000" size="6"><xsl:value-of select="@title"/></font></b></td> ! <td align="right" rowspan="2"><img border="0" src="images/ejtools50.png" width="175" height="50"/></td> ! </tr> ! <tr> ! <td> ! <xsl:for-each select="Path/Element"> ! <xsl:choose> ! <xsl:when test="./@link != ''"> ! <xsl:element name="a"> ! <xsl:attribute name="href"><xsl:value-of select="./@link"/></xsl:attribute> ! <xsl:value-of select="."/> ! </xsl:element> ! </xsl:when> ! <xsl:otherwise> ! <xsl:value-of select="."/> ! </xsl:otherwise> ! </xsl:choose> ! <xsl:if test="position() != last()"> ! <xsl:text> >> </xsl:text> ! </xsl:if> ! </xsl:for-each> ! </td> ! </tr> ! </table> ! </td> ! </tr> ! </table> ! </xsl:template> ! ! <xsl:template match="Frame"> ! <table border="0" cellspacing="1" bgcolor="#CCCCCC" width="100%"> ! <tr bgcolor="#EEEEEE"> ! <td align="left" valign="top"> ! <xsl:apply-templates select="HeaderBlock"/> ! </td> ! </tr> ! <xsl:if test="ContentBlock"> ! <tr bgcolor="#FFFFFF"> ! <td align="left" valign="top"> ! <xsl:apply-templates select="ContentBlock"/> ! </td> ! </tr> ! </xsl:if> ! </table> ! </xsl:template> ! ! <xsl:template match="HeaderBlock"> ! <table border="0" width="100%" cellspacing="0" cellpadding="3"> ! <tr> ! <xsl:apply-templates/> ! </tr> ! </table> ! </xsl:template> ! ! <xsl:template match="ContentBlock"> ! <table border="0" width="100%" cellspacing="0" cellpadding="3"> ! <tr> ! <td align="left"> ! <xsl:apply-templates/> ! </td> ! </tr> ! </table> ! </xsl:template> ! ! <xsl:template match="AttributesBlock"> ! <table border="0" width="100%" cellspacing="1" cellpadding="2" bgcolor="#CCCCCC"> ! <tr bgcolor="#000090"> ! <td align="center" valign="top" width="25%"><font face="verdana,arial,sans-serif" color="#ffffff" size="-1"><b>Attribute</b></font></td> ! <td align="center" valign="top" width="30%"><font face="verdana,arial,sans-serif" color="#ffffff" size="-1"><b>Type</b></font></td> ! <td align="center" valign="top" width="10%"><font face="verdana,arial,sans-serif" color="#ffffff" size="-1"><b>Access</b></font></td> ! <td align="center" valign="top" width="30%"><font face="verdana,arial,sans-serif" color="#ffffff" size="-1"><b>Value</b></font></td> ! </tr> ! <xsl:for-each select="Attribute"> ! <tr bgcolor="#EEEEEE"> ! <td valign="top" align="right"> ! <xsl:element name="a"> ! <xsl:attribute name="href"> ! <xsl:text>javascript:alert('</xsl:text> ! <xsl:value-of select="./@description"/> ! <xsl:text>')</xsl:text> ! </xsl:attribute> ! <xsl:value-of select="./@display-name"/> ! </xsl:element> ! <xsl:text> :</xsl:text></td> ! <td valign="top" align="right"><xsl:value-of select="./@type"/></td> ! <td valign="top" align="center"><xsl:value-of select="./@access"/></td> ! <td class="attributeValue" valign="top" align="left">false</td> ! </tr> ! </xsl:for-each> ! </table> ! </xsl:template> ! ! <xsl:template match="OperationsBlock"> ! <table border="0" width="100%" cellspacing="1" cellpadding="2" bgcolor="#CCCCCC"> ! <tr bgcolor="#000090"> ! <td align="center" valign="top" colspan="2"><font face="verdana,arial,sans-serif" color="#ffffff" size="-1"><b>Operation</b></font></td> ! <td align="center" valign="top"><font face="verdana,arial,sans-serif" color="#ffffff" size="-1"><b>Arguments</b></font></td> ! </tr> ! <xsl:for-each select="Operation"> ! <tr bgcolor="#EEEEEE"> ! <td valign="top" align="right"> ! <xsl:element name="a"> ! <xsl:attribute name="href"> ! <xsl:text>javascript:alert('</xsl:text> ! <xsl:value-of select="./@description"/> ! <xsl:text>')</xsl:text> ! </xsl:attribute> ! <xsl:value-of select="./@display-name"/> ! </xsl:element> ! <xsl:text> :</xsl:text></td> ! <td valign="top" class="attributeValue" align="center"><font size="-1"><input type="submit" value="Invoke" class="button"/></font></td> ! <td valign="top" class="attributeValue" align="left"></td> ! </tr> ! </xsl:for-each> ! </table> ! </xsl:template> ! ! <xsl:template match="*|@*"> ! <xsl:copy-of select="."/> ! </xsl:template> ! ! <xsl:template match="Tree"> ! <xsl:variable name="sessionid" select="./@id"/> ! <xsl:for-each select="tree-node"> ! <xsl:call-template name="node"> ! <xsl:with-param name="sessionid" select="$sessionid"/> ! </xsl:call-template> ! </xsl:for-each> ! </xsl:template> ! ! <xsl:template name="node"> ! <xsl:param name="sessionid"/> ! <xsl:param name="parent_follow"/> ! ! <TABLE border="0" cellspacing="0" cellpadding="0"> ! <TR> ! <TD valign="middle"> ! ! <xsl:call-template name="spacer"> ! <xsl:with-param name="indent" select="$parent_follow"/> ! </xsl:call-template> ! ! <xsl:choose> ! <xsl:when test="count(ancestor::tree-node) = 0"> ! <img src="images/tree/empty.gif" width="16" height="16"></img> ! </xsl:when> ! <xsl:when test="count(following-sibling::tree-node) > 0"> ! <img src="images/tree/joinbottom.gif" width="16" height="16"></img> ! </xsl:when> ! <xsl:otherwise> ! <img src="images/tree/join.gif" width="16" height="16"></img> ! </xsl:otherwise> ! </xsl:choose> ! ! <xsl:variable name="small-icon" select="./@small-icon"/> ! ! <xsl:element name="img"> ! <xsl:attribute name="src"> ! <xsl:text>images/icons/</xsl:text> ! <xsl:value-of select="$small-icon"/> ! </xsl:attribute> ! </xsl:element> ! ! <img src="images/tree/empty.gif" width="4" height="16"></img> ! ! </TD> ! <TD valign="middle"> ! ! <xsl:variable name="item-name" select="./text"/> ! ! <xsl:element name="a"> ! <xsl:attribute name="href"> ! <xsl:text>detail.do;jsessionid=</xsl:text><xsl:value-of select="$sessionid"/><xsl:text>?ref=</xsl:text><xsl:value-of select="./@objref"/> ! </xsl:attribute> ! <font size="-1"> ! <xsl:choose> ! <xsl:when test="contains($item-name, ':')"> ! <xsl:value-of select="substring-after($item-name, ':')"/> ! </xsl:when> ! <xsl:otherwise> ! <xsl:value-of select="$item-name"/> ! </xsl:otherwise> ! </xsl:choose> ! </font> ! </xsl:element> ! ! </TD> ! </TR> ! </TABLE> ! ! <xsl:choose> ! <xsl:when test="count(following-sibling::tree-node) > 0"> ! <xsl:for-each select="tree-node"> ! <xsl:call-template name="node"> ! <xsl:with-param name="sessionid" select="$sessionid"/> ! <xsl:with-param name="parent_follow" select="concat($parent_follow, '1')"/> ! </xsl:call-template> ! </xsl:for-each> ! </xsl:when> ! <xsl:otherwise> ! <xsl:for-each select="tree-node"> ! <xsl:call-template name="node"> ! <xsl:with-param name="sessionid" select="$sessionid"/> ! <xsl:with-param name="parent_follow" select="concat($parent_follow, '0')"/> ! </xsl:call-template> ! </xsl:for-each> ! </xsl:otherwise> ! </xsl:choose> ! ! </xsl:template> ! ! <xsl:template name="spacer"> ! <xsl:param name="indent" select="''"/> ! ! <xsl:if test="string-length($indent) > 0"> ! <xsl:choose> ! <xsl:when test="substring($indent, 1, 1) = '1'"> ! <img src="images/tree/line.gif" width="16" height="16"></img> ! </xsl:when> ! <xsl:otherwise> ! <img src="images/tree/empty.gif" width="16" height="16"></img> ! </xsl:otherwise> ! </xsl:choose> ! <xsl:call-template name="spacer"> ! <xsl:with-param name="indent" select="substring($indent, 2)"/> ! </xsl:call-template> ! </xsl:if> ! </xsl:template> ! ! </xsl:stylesheet> --- 1,319 ---- ! <?xml version="1.0"?> ! <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> ! <xsl:output method="html" version="1.0" encoding="UTF-8" indent="yes" omit-xml-declaration="yes"/> ! <xsl:template match="/Page"> ! <html> ! <head> ! <title> ! <xsl:value-of select="@title"/> ! </title> ! <link rel="stylesheet" type="text/css" href="style.css"/> ! </head> ! <body> ! <xsl:apply-templates/> ! </body> ! </html> ! </xsl:template> ! <xsl:template match="Spacer"> ! <img border="0" src="images/white.png" width="5" height="15"/> ! </xsl:template> ! <xsl:template match="TitleBlock"> ! <table border="0" width="100%" bgcolor="#CCCCCC" cellspacing="0"> ! <tr> ! <td width="100%"> ! <table border="0" width="100%" cellspacing="0" cellpadding="3" bgcolor="#FFFFFF"> ! <tr> ! <td> ! <b> ! <font face="verdana,arial,sans-serif" color="#000000" size="6"> ! <xsl:value-of select="@title"/> ! </font> ! </b> ! </td> ! <td align="right" rowspan="2"> ! <img border="0" src="images/ejtools50.png" width="175" height="50"/> ! </td> ! </tr> ! <tr> ! <td> ! <xsl:for-each select="Path/Element"> ! <xsl:choose> ! <xsl:when test="./@link != ''"> ! <xsl:element name="a"> ! <xsl:attribute name="href"><xsl:value-of select="./@link"/></xsl:attribute> ! <xsl:value-of select="."/> ! </xsl:element> ! </xsl:when> ! <xsl:otherwise> ! <xsl:value-of select="."/> ! </xsl:otherwise> ! </xsl:choose> ! <xsl:if test="position() != last()"> ! <xsl:text> >> </xsl:text> ! </xsl:if> ! </xsl:for-each> ! </td> ! </tr> ! </table> ! </td> ! </tr> ! </table> ! </xsl:template> ! <xsl:template match="Frame"> ! <table border="0" cellspacing="1" bgcolor="#CCCCCC" width="100%"> ! <tr bgcolor="#EEEEEE"> ! <td align="left" valign="top"> ! <xsl:apply-templates select="HeaderBlock"/> ! </td> ! </tr> ! <xsl:if test="ContentBlock"> ! <tr bgcolor="#FFFFFF"> ! <td align="left" valign="top"> ! <xsl:apply-templates select="ContentBlock"/> ! </td> ! </tr> ! </xsl:if> ! </table> ! </xsl:template> ! <xsl:template match="HeaderBlock"> ! <table border="0" width="100%" cellspacing="0" cellpadding="3"> ! <tr> ! <td> ! <xsl:apply-templates/> ! </td> ! </tr> ! </table> ! </xsl:template> ! <xsl:template match="ContentBlock"> ! <table border="0" width="100%" cellspacing="0" cellpadding="3"> ! <tr> ! <td align="left"> ! <xsl:apply-templates/> ! </td> ! </tr> ! </table> ! </xsl:template> ! <xsl:template match="AttributesBlock"> ! <table border="0" width="100%" cellspacing="1" cellpadding="2" bgcolor="#CCCCCC"> ! <tr bgcolor="#000090"> ! <td align="center" valign="top" width="30%"> ! <font face="verdana,arial,sans-serif" color="#ffffff" size="-1"> ! <b>Attribute</b> ! </font> ! </td> ! <td align="center" valign="top" width="30%"> ! <font face="verdana,arial,sans-serif" color="#ffffff" size="-1"> ! <b>Type</b> ! </font> ! </td> ! <td align="center" valign="top" width="10%"> ! <font face="verdana,arial,sans-serif" color="#ffffff" size="-1"> ! <b>Access</b> ! </font> ! </td> ! <td align="center" valign="top" width="30%"> ! <font face="verdana,arial,sans-serif" color="#ffffff" size="-1"> ! <b>Value</b> ! </font> ! </td> ! </tr> ! <xsl:for-each select="Attribute"> ! <tr bgcolor="#EEEEEE"> ! <td valign="top" align="right"> ! <xsl:element name="a"> ! <xsl:attribute name="href"><xsl:text>javascript:alert('</xsl:text><xsl:value-of select="./@description"/><xsl:text>')</xsl:text></xsl:attribute> ! <xsl:value-of select="./@display-name"/> ! </xsl:element> ! <xsl:text> :</xsl:text> ! </td> ! <td valign="top" align="right"> ! <xsl:value-of select="./@type"/> ! </td> ! <td valign="top" align="center"> ! <xsl:value-of select="./@access"/> ! </td> ! <td class="attributeValue" valign="top" align="left">false</td> ! </tr> ! </xsl:for-each> ! </table> ! </xsl:template> ! <xsl:template match="ConstructorsBlock"> ! <table border="0" width="100%" cellspacing="1" cellpadding="2" bgcolor="#CCCCCC"> ! <tr bgcolor="#000090"> ! <td align="center" valign="top" width="30%"> ! <font face="verdana,arial,sans-serif" color="#ffffff" size="-1"> ! <b>Constructor</b> ! </font> ! </td> ! <td align="center" valign="top" width="70%"> ! <font face="verdana,arial,sans-serif" color="#ffffff" size="-1"> ! <b>Parameters</b> ! </font> ! </td> ! </tr> ! <xsl:for-each select="Constructor"> ! <tr bgcolor="#EEEEEE"> ! <td valign="top" align="right"> ! <xsl:element name="a"> ! <xsl:attribute name="href"><xsl:text>javascript:alert('</xsl:text><xsl:value-of select="./@description"/><xsl:text>')</xsl:text></xsl:attribute> ! <xsl:value-of select="./@display-name"/> ! </xsl:element> ! <xsl:text> :</xsl:text> ! </td> ! <td class="attributeValue" valign="top" align="left">false</td> ! </tr> ! </xsl:for-each> ! </table> ! </xsl:template> ! <xsl:template match="NotificationsBlock"> ! <table border="0" width="100%" cellspacing="1" cellpadding="2" bgcolor="#CCCCCC"> ! <tr bgcolor="#000090"> ! <td align="center" valign="top" width="30%"> ! <font face="verdana,arial,sans-serif" color="#ffffff" size="-1"> ! <b>Notification</b> ! </font> ! </td> ! <td align="center" valign="top" width="70%"> ! <font face="verdana,arial,sans-serif" color="#ffffff" size="-1"> ! <b>Value</b> ! </font> ! </td> ! </tr> ! <xsl:for-each select="Notification"> ! <tr bgcolor="#EEEEEE"> ! <td valign="top" align="right"> ! <xsl:element name="a"> ! <xsl:attribute name="href"><xsl:text>javascript:alert('</xsl:text><xsl:value-of select="./@description"/><xsl:text>')</xsl:text></xsl:attribute> ! <xsl:value-of select="./@display-name"/> ! </xsl:element> ! <xsl:text> :</xsl:text> ! </td> ! <td class="attributeValue" valign="top" align="left">false</td> ! </tr> ! </xsl:for-each> ! </table> ! </xsl:template> ! <xsl:template match="OperationsBlock"> ! <table border="0" width="100%" cellspacing="1" cellpadding="2" bgcolor="#CCCCCC"> ! <tr bgcolor="#000090"> ! <td align="center" valign="top" colspan="2"> ! <font face="verdana,arial,sans-serif" color="#ffffff" size="-1"> ! <b>Operation</b> ! </font> ! </td> ! <td align="center" valign="top"> ! <font face="verdana,arial,sans-serif" color="#ffffff" size="-1"> ! <b>Arguments</b> ! </font> ! </td> ! </tr> ! <xsl:for-each select="Operation"> ! <tr bgcolor="#EEEEEE"> ! <td valign="top" align="right"> ! <xsl:element name="a"> ! <xsl:attribute name="href"><xsl:text>javascript:alert('</xsl:text><xsl:value-of select="./@description"/><xsl:text>')</xsl:text></xsl:attribute> ! <xsl:value-of select="./@display-name"/> ! </xsl:element> ! <xsl:text> :</xsl:text> ! </td> ! <td valign="top" class="attributeValue" align="center"> ! <font size="-1"> ! <input type="submit" value="Invoke" class="button"/> ! </font> ! </td> ! <td valign="top" class="attributeValue" align="left"/> ! </tr> ! </xsl:for-each> ! </table> ! </xsl:template> ! <xsl:template match="*|@*"> ! <xsl:copy-of select="."/> ! </xsl:template> ! <xsl:template match="Tree"> ! <xsl:variable name="sessionid" select="./@id"/> ! <xsl:for-each select="tree-node"> ! <xsl:call-template name="node"> ! <xsl:with-param name="sessionid" select="$sessionid"/> ! </xsl:call-template> ! </xsl:for-each> ! </xsl:template> ! <xsl:template name="node"> ! <xsl:param name="sessionid"/> ! <xsl:param name="parent_follow"/> ! <TABLE border="0" cellspacing="0" cellpadding="0"> ! <TR> ! <TD valign="middle"> ! <xsl:call-template name="spacer"> ! <xsl:with-param name="indent" select="$parent_follow"/> ! </xsl:call-template> ! <xsl:choose> ! <xsl:when test="count(ancestor::tree-node) = 0"> ! <img src="images/tree/empty.gif" width="16" height="16"/> ! </xsl:when> ! <xsl:when test="count(following-sibling::tree-node) > 0"> ! <img src="images/tree/joinbottom.gif" width="16" height="16"/> ! </xsl:when> ! <xsl:otherwise> ! <img src="images/tree/join.gif" width="16" height="16"/> ! </xsl:otherwise> ! </xsl:choose> ! <xsl:variable name="small-icon" select="./@small-icon"/> ! <xsl:element name="img"> ! <xsl:attribute name="src"><xsl:text>images/icons/</xsl:text><xsl:value-of select="$small-icon"/></xsl:attribute> ! </xsl:element> ! <img src="images/tree/empty.gif" width="4" height="16"/> ! </TD> ! <TD valign="middle"> ! <xsl:variable name="item-name" select="./text"/> ! <xsl:element name="a"> ! <xsl:attribute name="href"><xsl:text>detail.do;jsessionid=</xsl:text><xsl:value-of select="$sessionid"/><xsl:text>?ref=</xsl:text><xsl:value-of select="./@objref"/></xsl:attribute> ! <font size="-1"> ! <xsl:choose> ! <xsl:when test="contains($item-name, ':')"> ! <xsl:value-of select="substring-after($item-name, ':')"/> ! </xsl:when> ! <xsl:otherwise> ! <xsl:value-of select="$item-name"/> ! </xsl:otherwise> ! </xsl:choose> ! </font> ! </xsl:element> ! </TD> ! </TR> ! </TABLE> ! <xsl:choose> ! <xsl:when test="count(following-sibling::tree-node) > 0"> ! <xsl:for-each select="tree-node"> ! <xsl:call-template name="node"> ! <xsl:with-param name="sessionid" select="$sessionid"/> ! <xsl:with-param name="parent_follow" select="concat($parent_follow, '1')"/> ! </xsl:call-template> ! </xsl:for-each> ! </xsl:when> ! <xsl:otherwise> ! <xsl:for-each select="tree-node"> ! <xsl:call-template name="node"> ! <xsl:with-param name="sessionid" select="$sessionid"/> ! <xsl:with-param name="parent_follow" select="concat($parent_follow, '0')"/> ! </xsl:call-template> ! </xsl:for-each> ! </xsl:otherwise> ! </xsl:choose> ! </xsl:template> ! <xsl:template name="spacer"> ! <xsl:param name="indent" select="''"/> ! <xsl:if test="string-length($indent) > 0"> ! <xsl:choose> ! <xsl:when test="substring($indent, 1, 1) = '1'"> ! <img src="images/tree/line.gif" width="16" height="16"/> ! </xsl:when> ! <xsl:otherwise> ! <img src="images/tree/empty.gif" width="16" height="16"/> ! </xsl:otherwise> ! </xsl:choose> ! <xsl:call-template name="spacer"> ! <xsl:with-param name="indent" select="substring($indent, 2)"/> ! </xsl:call-template> ! </xsl:if> ! </xsl:template> ! </xsl:stylesheet> Index: tree.xsl =================================================================== RCS file: /cvsroot/ejtools/applications/jmx.browser/src/webapp/content/tree.xsl,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** tree.xsl 24 Apr 2002 20:03:29 -0000 1.1 --- tree.xsl 17 May 2002 20:41:31 -0000 1.2 *************** *** 1,101 **** ! <?xml version="1.0"?> ! <xsl:stylesheet version = '1.0' xmlns:xsl='http://www.w3.org/1999/XSL/Transform'> ! <xsl:output method="html" version="1.0" encoding="UTF-8" indent="yes" omit-xml-declaration="yes"/> ! ! <xsl:template match="/"> ! <xsl:for-each select="tree-node"> ! <xsl:call-template name="node"> ! </xsl:call-template> ! </xsl:for-each> ! </xsl:template> ! ! <xsl:template name="node"> ! <xsl:param name="parent_follow"/> ! ! <TABLE border="0" cellspacing="0" cellpadding="0"> ! <TR> ! <TD valign="middle"> ! ! <xsl:call-template name="spacer"> ! <xsl:with-param name="indent" select="$parent_follow"/> ! </xsl:call-template> ! ! <xsl:choose> ! <xsl:when test="count(ancestor::tree-node) = 0"> ! <img src="images/tree/empty.gif" width="16" height="16"></img> ! </xsl:when> ! <xsl:when test="count(following-sibling::tree-node) > 0"> ! <img src="images/tree/joinbottom.gif" width="16" height="16"></img> ! </xsl:when> ! <xsl:otherwise> ! <img src="images/tree/join.gif" width="16" height="16"></img> ! </xsl:otherwise> ! </xsl:choose> ! ! <xsl:variable name="small-icon" select="./@small-icon"/> ! ! <xsl:element name="img"> ! <xsl:attribute name="src"> ! <xsl:text>images/icons/</xsl:text> ! <xsl:value-of select="$small-icon"/> ! </xsl:attribute> ! </xsl:element> ! ! <img src="images/tree/empty.gif" width="4" height="16"></img> ! ! </TD> ! <TD valign="middle"> ! ! <xsl:variable name="item-name" select="./text"/> ! ! <xsl:element name="a"> ! <xsl:attribute name="href"> ! <xsl:text>detail.do?ref=</xsl:text><xsl:value-of select="./text"/> ! </xsl:attribute> ! <font size="-1"> ! <xsl:value-of select="$item-name"/> ! </font> ! </xsl:element> ! ! </TD> ! </TR> ! </TABLE> ! ! <xsl:choose> ! <xsl:when test="count(following-sibling::tree-node) > 0"> ! <xsl:for-each select="tree-node"> ! <xsl:call-template name="node"> ! <xsl:with-param name="parent_follow" select="concat($parent_follow, '1')"/> ! </xsl:call-template> ! </xsl:for-each> ! </xsl:when> ! <xsl:otherwise> ! <xsl:for-each select="tree-node"> ! <xsl:call-template name="node"> ! <xsl:with-param name="parent_follow" select="concat($parent_follow, '0')"/> ! </xsl:call-template> ! </xsl:for-each> ! </xsl:otherwise> ! </xsl:choose> ! ! </xsl:template> ! ! <xsl:template name="spacer"> ! <xsl:param name="indent" select="''"/> ! ! <xsl:if test="string-length($indent) > 0"> ! <xsl:choose> ! <xsl:when test="substring($indent, 1, 1) = '1'"> ! <img src="images/tree/line.gif" width="16" height="16"></img> ! </xsl:when> ! <xsl:otherwise> ! <img src="images/tree/empty.gif" width="16" height="16"></img> ! </xsl:otherwise> ! </xsl:choose> ! <xsl:call-template name="spacer"> ! <xsl:with-param name="indent" select="substring($indent, 2)"/> ! </xsl:call-template> ! </xsl:if> ! </xsl:template> ! ! </xsl:stylesheet> --- 1,101 ---- ! <?xml version="1.0"?> ! <xsl:stylesheet version = '1.0' xmlns:xsl='http://www.w3.org/1999/XSL/Transform'> ! <xsl:output method="html" version="1.0" encoding="UTF-8" indent="yes" omit-xml-declaration="yes"/> ! ! <xsl:template match="/"> ! <xsl:for-each select="tree-node"> ! <xsl:call-template name="node"> ! </xsl:call-template> ! </xsl:for-each> ! </xsl:template> ! ! <xsl:template name="node"> ! <xsl:param name="parent_follow"/> ! ! <TABLE border="0" cellspacing="0" cellpadding="0"> ! <TR> ! <TD valign="middle"> ! ! <xsl:call-template name="spacer"> ! <xsl:with-param name="indent" select="$parent_follow"/> ! </xsl:call-template> ! ! <xsl:choose> ! <xsl:when test="count(ancestor::tree-node) = 0"> ! <img src="images/tree/empty.gif" width="16" height="16"></img> ! </xsl:when> ! <xsl:when test="count(following-sibling::tree-node) > 0"> ! <img src="images/tree/joinbottom.gif" width="16" height="16"></img> ! </xsl:when> ! <xsl:otherwise> ! <img src="images/tree/join.gif" width="16" height="16"></img> ! </xsl:otherwise> ! </xsl:choose> ! ! <xsl:variable name="small-icon" select="./@small-icon"/> ! ! <xsl:element name="img"> ! <xsl:attribute name="src"> ! <xsl:text>images/icons/</xsl:text> ! <xsl:value-of select="$small-icon"/> ! </xsl:attribute> ! </xsl:element> ! ! <img src="images/tree/empty.gif" width="4" height="16"></img> ! ! </TD> ! <TD valign="middle"> ! ! <xsl:variable name="item-name" select="./text"/> ! ! <xsl:element name="a"> ! <xsl:attribute name="href"> ! <xsl:text>detail.do?ref=</xsl:text><xsl:value-of select="./text"/> ! </xsl:attribute> ! <font size="-1"> ! <xsl:value-of select="$item-name"/> ! </font> ! </xsl:element> ! ! </TD> ! </TR> ! </TABLE> ! ! <xsl:choose> ! <xsl:when test="count(following-sibling::tree-node) > 0"> ! <xsl:for-each select="tree-node"> ! <xsl:call-template name="node"> ! <xsl:with-param name="parent_follow" select="concat($parent_follow, '1')"/> ! </xsl:call-template> ! </xsl:for-each> ! </xsl:when> ! <xsl:otherwise> ! <xsl:for-each select="tree-node"> ! <xsl:call-template name="node"> ! <xsl:with-param name="parent_follow" select="concat($parent_follow, '0')"/> ! </xsl:call-template> ! </xsl:for-each> ! </xsl:otherwise> ! </xsl:choose> ! ! </xsl:template> ! ! <xsl:template name="spacer"> ! <xsl:param name="indent" select="''"/> ! ! <xsl:if test="string-length($indent) > 0"> ! <xsl:choose> ! <xsl:when test="substring($indent, 1, 1) = '1'"> ! <img src="images/tree/line.gif" width="16" height="16"></img> ! </xsl:when> ! <xsl:otherwise> ! <img src="images/tree/empty.gif" width="16" height="16"></img> ! </xsl:otherwise> ! </xsl:choose> ! <xsl:call-template name="spacer"> ! <xsl:with-param name="indent" select="substring($indent, 2)"/> ! </xsl:call-template> ! </xsl:if> ! </xsl:template> ! ! </xsl:stylesheet> |