• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Creation of Tree View : dealing with laternate rows

 
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi
i am converting xml which actucally depicts folder structure into
tree view of structure.
Its working fine but i want to paint the alternate rows in diff color
my xml
<DESIGN >Design Default<FOLDER >EHV</FOLDER>
<FOLDER >highvoltage<FOLDER >66kv<FOLDER >GASFILLED</FOLDER>
</FOLDER>
</FOLDER>
<FOLDER >switchYard<FOLDER >BAY1<FOLDER >BUS1</FOLDER>
<FOLDER >BUS2</FOLDER>
</FOLDER>
</FOLDER>
<DOCUMENT VERSION="A.1" CREATORNAME="Administrator" MODIFYSTAMP="2001-12-03 15:18:06.0" >DemoDB<TYPE >Components<OBJECT VERSION="A.1" CREATORNAME="Administrator" MODIFYSTAMP="2001-12-03 15:18:11.0" >AFT<TYPE >Components<OBJECT VERSION="A.1" CREATORNAME="Administrator" MODIFYSTAMP="2001-12-03 15:18:11.0" >1</OBJECT>
<OBJECT VERSION="A.1" CREATORNAME="Administrator" MODIFYSTAMP="2001-12-03 15:18:11.0" >2</OBJECT>
<OBJECT VERSION="A.1" CREATORNAME="Administrator" MODIFYSTAMP="2001-12-03 15:18:12.0" >3</OBJECT>
<OBJECT VERSION="A.1" CREATORNAME="Administrator" MODIFYSTAMP="2001-12-03 15:18:12.0" >4</OBJECT>
<OBJECT VERSION="A.1" CREATORNAME="Administrator" MODIFYSTAMP="2001-12-03 15:18:12.0" >5</OBJECT>
<OBJECT VERSION="A.1" CREATORNAME="Administrator" MODIFYSTAMP="2001-12-03 15:18:12.0" >6</OBJECT>
</TYPE>
</OBJECT>
<OBJECT VERSION="A.1" CREATORNAME="Administrator" MODIFYSTAMP="2001-12-03 15:18:14.0" >AUDIO_CONN<TYPE >Components<OBJECT VERSION="A.1" CREATORNAME="Administrator" MODIFYSTAMP="2001-12-03 15:18:14.0" >1</OBJECT>
<OBJECT VERSION="A.1" CREATORNAME="Administrator" MODIFYSTAMP="2001-12-03 15:18:15.0" >2</OBJECT>
<OBJECT VERSION="A.1" CREATORNAME="Administrator" MODIFYSTAMP="2001-12-03 15:18:15.0" >3</OBJECT>
<OBJECT VERSION="A.1" CREATORNAME="Administrator" MODIFYSTAMP="2001-12-03 15:18:16.0" >4</OBJECT>
<OBJECT VERSION="A.1" CREATORNAME="Administrator" MODIFYSTAMP="2001-12-03 15:18:16.0" >5</OBJECT>
</TYPE>
</OBJECT>
<OBJECT VERSION="A.1" CREATORNAME="Administrator" MODIFYSTAMP="2001-12-03 15:18:09.0" >AUDIO_HEAD</OBJECT>
<OBJECT VERSION="A.1" CREATORNAME="Administrator" MODIFYSTAMP="2001-12-03 15:18:10.0" >CAM_SWITCH</OBJECT>
<OBJECT VERSION="A.1" CREATORNAME="Administrator" MODIFYSTAMP="2001-12-03 15:18:11.0" >CAPSTAN</OBJECT>
<OBJECT VERSION="A.1" CREATORNAME="Administrator" MODIFYSTAMP="2001-12-03 15:18:08.0" >CYLINDER_DRIVE</OBJECT>
<OBJECT VERSION="A.1" CREATORNAME="Administrator" MODIFYSTAMP="2001-12-03 15:18:09.0" >DEW_HEATER</OBJECT>
<OBJECT VERSION="A.1" CREATORNAME="Administrator" MODIFYSTAMP="2001-12-03 15:18:10.0" >HEAD_RELAY</OBJECT>
<OBJECT VERSION="A.1" CREATORNAME="Administrator" MODIFYSTAMP="2001-12-03 15:18:12.0" >JY1<TYPE >Components<OBJECT VERSION="A.1" CREATORNAME="Administrator" MODIFYSTAMP="2001-12-03 15:18:13.0" >1</OBJECT>
<OBJECT VERSION="A.1" CREATORNAME="Administrator" MODIFYSTAMP="2001-12-03 15:18:13.0" >2</OBJECT>
<OBJECT VERSION="A.1" CREATORNAME="Administrator" MODIFYSTAMP="2001-12-03 15:18:13.0" >3</OBJECT>
<OBJECT VERSION="A.1" CREATORNAME="Administrator" MODIFYSTAMP="2001-12-03 15:18:13.0" >4</OBJECT>
</TYPE>
</OBJECT>
<OBJECT VERSION="A.1" CREATORNAME="Administrator" MODIFYSTAMP="2001-12-03 15:18:11.0" >LOADING_MOTOR</OBJECT>
<OBJECT VERSION="A.1" CREATORNAME="Administrator" MODIFYSTAMP="2001-12-03 15:18:07.0" >POWER_CONN</OBJECT>
<OBJECT VERSION="A.1" CREATORNAME="Administrator" MODIFYSTAMP="2001-12-03 15:18:09.0" >RF_MOD</OBJECT>
<OBJECT VERSION="A.1" CREATORNAME="Administrator" MODIFYSTAMP="2001-12-03 15:18:09.0" >SERVO</OBJECT>
<OBJECT VERSION="A.1" CREATORNAME="Administrator" MODIFYSTAMP="2001-12-03 15:18:08.0" >SUPPLY_REEL</OBJECT>
<OBJECT VERSION="A.1" CREATORNAME="Administrator" MODIFYSTAMP="2001-12-03 15:18:08.0" >SWITCH</OBJECT>
<OBJECT VERSION="A.1" CREATORNAME="Administrator" MODIFYSTAMP="2001-12-03 15:18:16.0" >SW_CONN<TYPE >Components<OBJECT VERSION="A.1" CREATORNAME="Administrator" MODIFYSTAMP="2001-12-03 15:18:16.0" >1</OBJECT>
<OBJECT VERSION="A.1" CREATORNAME="Administrator" MODIFYSTAMP="2001-12-03 15:18:16.0" >2</OBJECT>
<OBJECT VERSION="A.1" CREATORNAME="Administrator" MODIFYSTAMP="2001-12-03 15:18:17.0" >3</OBJECT>
<OBJECT VERSION="A.1" CREATORNAME="Administrator" MODIFYSTAMP="2001-12-03 15:18:17.0" >4</OBJECT>
<OBJECT VERSION="A.1" CREATORNAME="Administrator" MODIFYSTAMP="2001-12-03 15:18:17.0" >5</OBJECT>
</TYPE>
</OBJECT>
<OBJECT VERSION="A.1" CREATORNAME="Administrator" MODIFYSTAMP="2001-12-03 15:18:09.0" >TAKE_UP</OBJECT>
<OBJECT VERSION="A.1" CREATORNAME="Administrator" MODIFYSTAMP="2001-12-03 15:18:08.0" >TRANSFORMER</OBJECT>
<OBJECT VERSION="A.1" CREATORNAME="Administrator" MODIFYSTAMP="2001-12-03 15:18:17.0" >TRCONN8<TYPE >Components<OBJECT VERSION="A.1" CREATORNAME="Administrator" MODIFYSTAMP="2001-12-03 15:18:17.0" >1</OBJECT>
<OBJECT VERSION="A.1" CREATORNAME="Administrator" MODIFYSTAMP="2001-12-03 15:18:19.0" >10</OBJECT>
<OBJECT VERSION="A.1" CREATORNAME="Administrator" MODIFYSTAMP="2001-12-03 15:18:18.0" >2</OBJECT>
<OBJECT VERSION="A.1" CREATORNAME="Administrator" MODIFYSTAMP="2001-12-03 15:18:18.0" >3</OBJECT>
<OBJECT VERSION="A.1" CREATORNAME="Administrator" MODIFYSTAMP="2001-12-03 15:18:18.0" >4</OBJECT>
<OBJECT VERSION="A.1" CREATORNAME="Administrator" MODIFYSTAMP="2001-12-03 15:18:18.0" >5</OBJECT>
<OBJECT VERSION="A.1" CREATORNAME="Administrator" MODIFYSTAMP="2001-12-03 15:18:18.0" >6</OBJECT>
<OBJECT VERSION="A.1" CREATORNAME="Administrator" MODIFYSTAMP="2001-12-03 15:18:19.0" >7</OBJECT>
<OBJECT VERSION="A.1" CREATORNAME="Administrator" MODIFYSTAMP="2001-12-03 15:18:19.0" >8</OBJECT>
<OBJECT VERSION="A.1" CREATORNAME="Administrator" MODIFYSTAMP="2001-12-03 15:18:19.0" >9</OBJECT>
</TYPE>
</OBJECT>
<OBJECT VERSION="A.1" CREATORNAME="Administrator" MODIFYSTAMP="2001-12-03 15:18:10.0" >TUNER</OBJECT>
<OBJECT VERSION="A.1" CREATORNAME="Administrator" MODIFYSTAMP="2001-12-03 15:18:13.0" >VIDEO_CONN<TYPE >Components<OBJECT VERSION="A.1" CREATORNAME="Administrator" MODIFYSTAMP="2001-12-03 15:18:14.0" >1</OBJECT>
<OBJECT VERSION="A.1" CREATORNAME="Administrator" MODIFYSTAMP="2001-12-03 15:18:14.0" >2</OBJECT>
<OBJECT VERSION="A.1" CREATORNAME="Administrator" MODIFYSTAMP="2001-12-03 15:18:14.0" >3</OBJECT>
</TYPE>
</OBJECT>
<OBJECT VERSION="A.1" CREATORNAME="Administrator" MODIFYSTAMP="2001-12-03 15:18:10.0" >VIDEO_PROCESSOR</OBJECT>
</TYPE>
<TYPE >Wiring Wires<OBJECT VERSION="A.1" CREATORNAME="Administrator" MODIFYSTAMP="2001-12-03 15:18:26.0" >A-DEW1</OBJECT>
<OBJECT VERSION="A.1" CREATORNAME="Administrator" MODIFYSTAMP="2001-12-03 15:18:26.0" >A-DEW2</OBJECT>
<OBJECT VERSION="A.1" CREATORNAME="Administrator" MODIFYSTAMP="2001-12-03 15:18:32.0" >A-DEW3</OBJECT>
<OBJECT VERSION="A.1" CREATORNAME="Administrator" MODIFYSTAMP="2001-12-03 15:18:31.0" >AFT-1</OBJECT>
<OBJECT VERSION="A.1" CREATORNAME="Administrator" MODIFYSTAMP="2001-12-03 15:18:28.0" >AFT-POW</OBJECT>
<OBJECT VERSION="A.1" CREATORNAME="Administrator" MODIFYSTAMP="2001-12-03 15:18:29.0" >AFT-SW1</OBJECT>
<OBJECT VERSION="A.1" CREATORNAME="Administrator" MODIFYSTAMP="2001-12-03 15:18:30.0" >AFT-SW2</OBJECT>
<OBJECT VERSION="A.1" CREATORNAME="Administrator" MODIFYSTAMP="2001-12-03 15:18:28.0" >AFT-TU1</OBJECT>
<OBJECT VERSION="A.1" CREATORNAME="Administrator" MODIFYSTAMP="2001-12-03 15:18:28.0" >AFT-TU2</OBJECT>
<OBJECT VERSION="A.1" CREATORNAME="Administrator" MODIFYSTAMP="2001-12-03 15:18:26.0" >AREL-REL1</OBJECT>
<OBJECT VERSION="A.1" CREATORNAME="Administrator" MODIFYSTAMP="2001-12-03 15:18:26.0" >AREL-REL2</OBJECT>
<OBJECT VERSION="A.1" CREATORNAME="Administrator" MODIFYSTAMP="2001-12-03 15:18:27.0" >AREL-REL3</OBJECT>
<OBJECT VERSION="A.1" CREATORNAME="Administrator" MODIFYSTAMP="2001-12-03 15:18:26.0" >CAM-CYL1</OBJECT>
<OBJECT VERSION="A.1" CREATORNAME="Administrator" MODIFYSTAMP="2001-12-03 15:18:26.0" >CAM_CYL2</OBJECT>
<OBJECT VERSION="A.1" CREATORNAME="Administrator" MODIFYSTAMP="2001-12-03 15:18:31.0" >CAP-CAM1</OBJECT>
<OBJECT VERSION="A.1" CREATORNAME="Administrator" MODIFYSTAMP="2001-12-03 15:18:32.0" >CAP-CAM2</OBJECT>
<OBJECT VERSION="A.1" CREATORNAME="Administrator" MODIFYSTAMP="2001-12-03 15:18:27.0" >CAP-CYL1</OBJECT>
<OBJECT VERSION="A.1" CREATORNAME="Administrator" MODIFYSTAMP="2001-12-03 15:18:27.0" >CAP-CYL2</OBJECT>
<OBJECT VERSION="A.1" CREATORNAME="Administrator" MODIFYSTAMP="2001-12-03 15:18:29.0" >MTR-TRL1</OBJECT>
<OBJECT VERSION="A.1" CREATORNAME="Administrator" MODIFYSTAMP="2001-12-03 15:18:29.0" >MTR-TRL2</OBJECT>
<OBJECT VERSION="A.1" CREATORNAME="Administrator" MODIFYSTAMP="2001-12-03 15:18:27.0" >POW-V</OBJECT>
<OBJECT VERSION="A.1" CREATORNAME="Administrator" MODIFYSTAMP="2001-12-03 15:18:29.0" >SER-A1</OBJECT>
<OBJECT VERSION="A.1" CREATORNAME="Administrator" MODIFYSTAMP="2001-12-03 15:18:29.0" >SER-A2</OBJECT>
<OBJECT VERSION="A.1" CREATORNAME="Administrator" MODIFYSTAMP="2001-12-03 15:18:31.0" >SRL-TRANS1</OBJECT>
<OBJECT VERSION="A.1" CREATORNAME="Administrator" MODIFYSTAMP="2001-12-03 15:18:30.0" >SRL-TRANS2</OBJECT>
<OBJECT VERSION="A.1" CREATORNAME="Administrator" MODIFYSTAMP="2001-12-03 15:18:30.0" >SRL-TRANS3</OBJECT>
<OBJECT VERSION="A.1" CREATORNAME="Administrator" MODIFYSTAMP="2001-12-03 15:18:28.0" >TRANS-LOG</OBJECT>
<OBJECT VERSION="A.1" CREATORNAME="Administrator" MODIFYSTAMP="2001-12-03 15:18:28.0" >TRANS-V</OBJECT>
<OBJECT VERSION="A.1" CREATORNAME="Administrator" MODIFYSTAMP="2001-12-03 15:18:30.0" >TU-RF1</OBJECT>
<OBJECT VERSION="A.1" CREATORNAME="Administrator" MODIFYSTAMP="2001-12-03 15:18:30.0" >TU-RF2</OBJECT>
<OBJECT VERSION="A.1" CREATORNAME="Administrator" MODIFYSTAMP="2001-12-03 15:18:30.0" >TU-RF3</OBJECT>
<OBJECT VERSION="A.1" CREATORNAME="Administrator" MODIFYSTAMP="2001-12-03 15:18:31.0" >V-A1</OBJECT>
<OBJECT VERSION="A.1" CREATORNAME="Administrator" MODIFYSTAMP="2001-12-03 15:18:27.0" >V-POW1</OBJECT>
<OBJECT VERSION="A.1" CREATORNAME="Administrator" MODIFYSTAMP="2001-12-03 15:18:28.0" >V-POW2</OBJECT>
<OBJECT VERSION="A.1" CREATORNAME="Administrator" MODIFYSTAMP="2001-12-03 15:18:31.0" >V-SRL</OBJECT>
</TYPE>
<TYPE >Cables<OBJECT VERSION="A.1" CREATORNAME="Administrator" MODIFYSTAMP="2001-12-03 15:18:24.0" >CABLE_1<OBJECT VERSION="A.1" CREATORNAME="Administrator" MODIFYSTAMP="2001-12-03 15:18:25.0" >JX-Y1</OBJECT>
<OBJECT VERSION="A.1" CREATORNAME="Administrator" MODIFYSTAMP="2001-12-03 15:18:25.0" >JX-Y2</OBJECT>
<OBJECT VERSION="A.1" CREATORNAME="Administrator" MODIFYSTAMP="2001-12-03 15:18:25.0" >JX-Y3</OBJECT>
<OBJECT VERSION="A.1" CREATORNAME="Administrator" MODIFYSTAMP="2001-12-03 15:18:25.0" >JX-Y4</OBJECT>
</OBJECT>
<OBJECT VERSION="A.1" CREATORNAME="Administrator" MODIFYSTAMP="2001-12-03 15:18:23.0" >PRIMARY<OBJECT VERSION="A.1" CREATORNAME="Administrator" MODIFYSTAMP="2001-12-03 15:18:23.0" >CORE1</OBJECT>
<OBJECT VERSION="A.1" CREATORNAME="Administrator" MODIFYSTAMP="2001-12-03 15:18:23.0" >CORE2</OBJECT>
</OBJECT>
<OBJECT VERSION="A.1" CREATORNAME="Administrator" MODIFYSTAMP="2001-12-03 15:18:23.0" >SECONDARY<OBJECT VERSION="A.1" CREATORNAME="Administrator" MODIFYSTAMP="2001-12-03 15:18:24.0" >CORE1</OBJECT>
<OBJECT VERSION="A.1" CREATORNAME="Administrator" MODIFYSTAMP="2001-12-03 15:18:24.0" >CORE2</OBJECT>
</OBJECT>
</TYPE>
<TYPE >Wire Spools<OBJECT VERSION="A.1" CREATORNAME="Administrator" MODIFYSTAMP="2001-12-03 15:18:21.0" >ACT2BK</OBJECT>
<OBJECT VERSION="A.1" CREATORNAME="Administrator" MODIFYSTAMP="2001-12-03 15:18:22.0" >SIG18R</OBJECT>
<OBJECT VERSION="A.1" CREATORNAME="Administrator" MODIFYSTAMP="2001-12-03 15:18:22.0" >SIG24G</OBJECT>
<OBJECT VERSION="A.1" CREATORNAME="Administrator" MODIFYSTAMP="2001-12-03 15:18:22.0" >SIG24R</OBJECT>
<OBJECT VERSION="A.1" CREATORNAME="Administrator" MODIFYSTAMP="2001-12-03 15:18:22.0" >SNS20BL</OBJECT>
<OBJECT VERSION="A.1" CREATORNAME="Administrator" MODIFYSTAMP="2001-12-03 15:18:22.0" >SNS24Y</OBJECT>
<OBJECT VERSION="A.1" CREATORNAME="Administrator" MODIFYSTAMP="2001-12-03 15:18:22.0" >SP14W</OBJECT>
</TYPE>
<TYPE >Cable Spools<OBJECT VERSION="A.1" CREATORNAME="Administrator" MODIFYSTAMP="2001-12-03 15:18:19.0" >CABLE<OBJECT VERSION="A.1" CREATORNAME="Administrator" MODIFYSTAMP="2001-12-03 15:18:20.0" >1 : CABLE:1</OBJECT>
<OBJECT VERSION="A.1" CREATORNAME="Administrator" MODIFYSTAMP="2001-12-03 15:18:20.0" >2 : CABLE:2</OBJECT>
<OBJECT VERSION="A.1" CREATORNAME="Administrator" MODIFYSTAMP="2001-12-03 15:18:20.0" >3 : CABLE:3</OBJECT>
<OBJECT VERSION="A.1" CREATORNAME="Administrator" MODIFYSTAMP="2001-12-03 15:18:20.0" >4 : CABLE:4</OBJECT>
</OBJECT>
<OBJECT VERSION="A.1" CREATORNAME="Administrator" MODIFYSTAMP="2001-12-03 15:18:20.0" >CBL_G<OBJECT VERSION="A.1" CREATORNAME="Administrator" MODIFYSTAMP="2001-12-03 15:18:21.0" >1 : CBL_G:1</OBJECT>
<OBJECT VERSION="A.1" CREATORNAME="Administrator" MODIFYSTAMP="2001-12-03 15:18:21.0" >2 : CBL_G:2</OBJECT>
</OBJECT>
<OBJECT VERSION="A.1" CREATORNAME="Administrator" MODIFYSTAMP="2001-12-03 15:18:21.0" >CBL_R<OBJECT VERSION="A.1" CREATORNAME="Administrator" MODIFYSTAMP="2001-12-03 15:18:21.0" >1 : CBL_R:1</OBJECT>
<OBJECT VERSION="A.1" CREATORNAME="Administrator" MODIFYSTAMP="2001-12-03 15:18:21.0" >2 : CBL_R:2</OBJECT>
</OBJECT>
</TYPE>
</DOCUMENT>
</DESIGN>

xsl i am using
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<!-- This xsl is an attempt to build treeview of design/system hierarchy for RSExplorer -->
<xsl aram name="iterator" select="'0'"/>
<xsl:template match="/DESIGN">
<HTML>
<BODY>
<HEAD>
<link rel="stylesheet" href="Report.css" type="text/css"></link>
</HEAD>

<TABLE align="LEFT" width="100%" border="0" cellsapcing="1" cellpadding="1">
<CAPTION align="CENTER"><nobr><b>Hierarchial Report For Design <xsl:value-of select="text()"/></b></nobr></CAPTION>
<TR class="t1-bg-col-head">
<TD><IMG SRC="images/folder.gif" width="20" height="20" align="middle"></IMG>Design Default</TD>
<TD> </TD>
<TD> </TD>
<TD> </TD>
</TR>
<xsl:for-each select="*">
<xsl:call-template name="hierarchy-builder">
<xsl:with-param name="iterator" select="$iterator + 1"/>
</xsl:call-template>

</xsl:for-each>

</TABLE>
</BODY>
</HTML>
</xsl:template>

<xsl:template name="hierarchy-builder">
<TR><TD><xsl:value-of select="$iterator"/></TD></TR>
<TR>
<xsl:if test="$iterator mod 2 =0">
<xsl:attribute name="class">r0</xsl:attribute>
</xsl:if>
<xsl:if test="$iterator mod 2 !=0">
<xsl:attribute name="class">r1</xsl:attribute>
</xsl:if>
<TD>
<!-- ******** trying to adjust vertical line or tree spacer ****** -->
<xsl:if test="count(ancestor::node()) > 1">
<xsl:for-each select="ancestor::*">
<xsl:choose>
<xsl:when test="count(following-sibling::*) > 0">
<IMG SRC="images/verticalline.gif" width="16" height="16"></IMG>
</xsl:when>
<xsl therwise>
<xsl:if test="position() != 1">
<IMG SRC="images/treespacer.gif" width="16" height="16"></IMG>
</xsl:if>
</xsl therwise>
</xsl:choose>
</xsl:for-each>
</xsl:if>
<!-- ************* end ***************** -->
<!-- *********** deciding the image for folder connections ******** -->
<xsl:choose>
<xsl:when test="count(ancestor::*) > 0 and count(following-sibling::*) > 0">
<IMG SRC="images/leaf.gif" ALT="Expand" TITLE="Expand" hspace="0" vspace="0" align="middle" BORDER="0"></IMG>
</xsl:when>
<xsl:when test="count(ancestor::*) > 0 and count(following-sibling::*) < 1">
<IMG SRC="images/leaf2.gif" ALT="Expand" TITLE="Expand" hspace="0" vspace="0" align="middle" BORDER="0"></IMG>
</xsl:when>
<xsl therwise>
<IMG SRC="images/leaf2.gif" ALT="Expand" TITLE="Expand" hspace="0" vspace="0" align="middle" BORDER="0"></IMG>
</xsl therwise>
</xsl:choose>
<!-- ************* end ***************** -->

<!-- ********* section renders the name of element and selects gig ********** -->
<xsl:variable name="typetest"><xsl:value-of select="text()"/></xsl:variable>
<xsl:choose>
<xsl:when test="name()='OBJECT'">
<font class="f-folder"><xsl:value-of select="text()"/></font>
</xsl:when>
<xsl:when test="name()='DOCUMENT'">
<IMG SRC="images/document.gif" width="20" height="20" align="middle"></IMG><font class="f-folder"><xsl:value-of select="text()"/></font>
</xsl:when>
<xsl:when test="$typetest = 'Components'">
<IMG SRC="images/component.gif" width="20" height="20" align="middle"></IMG><font class="f-folder"><xsl:value-of select="text()"/></font>
</xsl:when>
<xsl:when test="$typetest = 'Wiring Wires'">
<IMG SRC="images/wire.gif" width="20" height="20" align="middle"></IMG><font class="f-folder"><xsl:value-of select="text()"/></font>
</xsl:when>
<xsl:when test="$typetest = 'Wire Spools'">
<IMG SRC="images/wirespool.gif" width="20" height="20" align="middle"></IMG><font class="f-folder"><xsl:value-of select="text()"/></font>
</xsl:when>
<xsl:when test="$typetest = 'Connections'">
<IMG SRC="images/connection.gif" width="20" height="20" align="middle"></IMG><font class="f-folder"><xsl:value-of select="text()"/></font>
</xsl:when>
<xsl:when test="$typetest = 'Cables'">
<IMG SRC="images/cable.gif" width="20" height="20" align="middle"></IMG><font class="f-folder"><xsl:value-of select="text()"/></font>
</xsl:when>
<xsl:when test="$typetest = 'Cable Spools'">
<IMG SRC="images/cablespool.gif" width="20" height="20" align="middle"></IMG><font class="f-folder"><xsl:value-of select="text()"/></font>
</xsl:when>
<xsl therwise>
<IMG SRC="images/folder.gif" width="20" height="20" align="middle"></IMG><font class="f-folder"><xsl:value-of select="text()"/></font>
</xsl therwise>
</xsl:choose>
<!-- ********************** end *********************** -->
</TD>

<!-- ************** displaying object properties *************** -->
<xsl:choose>
<xsl:when test="name()='OBJECT'">
<TD><xsl:value-of select="./@VERSION"/></TD>
<TD><xsl:value-of select="./@CREATORNAME"/></TD>
<TD><xsl:value-of select="./@MODIFYSTAMP"/></TD>
</xsl:when>
<xsl:when test="name()='DOCUMENT'">
<TD><xsl:value-of select="./@VERSION"/></TD>
<TD><xsl:value-of select="./@CREATORNAME"/></TD>
<TD><xsl:value-of select="./@MODIFYSTAMP"/></TD>
</xsl:when>
<xsl therwise>
<TD> </TD>
<TD> </TD>
<TD> </TD>
</xsl therwise>
</xsl:choose>
<!-- ********************** end *********************** -->
</TR>
<xsl:if test="count(descendant::node()) > 0">
<xsl:for-each select="*">
<xsl:call-template name="hierarchy-builder">
<xsl:with-param name="iterator" select="$iterator + 1"/>
</xsl:call-template>
</xsl:for-each>
</xsl:if>

</xsl:template>
</xsl:stylesheet>
stylesheet

.f-design { font-size: 1.0em; font-weight:bold ; font-family: "MS UI Gothic", Arial, Geneva, Swiss, SunSans-Regular;font-style: italic }
.f-folder{font-size: 0.8em; font-weight:bold ; font-family: "MS UI Gothic", Arial, Geneva, Swiss, SunSans-Regular;font-style: oblique }
.f-doc{font-size: 0.8em;font-weight:bold ; font-family: "MS UI Gothic", Arial, Geneva, Swiss, SunSans-Regular;font-style: italic }
.f-type{font-size: 0.8em;font-weight:bold ; font-family: "MS UI Gothic", Arial, Geneva, Swiss, SunSans-Regular; font-style blique}
.f-obj{font-size: 0.8em; font-family: "MS UI Gothic", Arial, Geneva, Swiss, SunSans-Regular}
.t1-bg-col-head { background-color:#8FBC8F }
.t1-bg-evenrow { background-color: #eeeeee }
.t1-bg-oddrow { background-color: #ffffff }
.r0{ background-color: #eeeeee }
.r1{ background-color: #ffffff }

Here i am trying to increment parameter value by a consturct
<xsl:with-param name="iterator" select="$iterator + 1"/>
but it keeps the parameter with same value which is set initially.
As far as i Know variable retains the value.
Help is required.
Regards
Sharang
 
I claim this furniture in the name of The Ottoman Empire! You can keep this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic