[xsl] simple xsl:choose question part 2

Subject: [xsl] simple xsl:choose question part 2
From: Meir <umen@xxxxxxxxxxxxxxxx>
Date: Tue, 18 Jun 2002 01:50:22 -0700
first of all tnx for the reply's folks
(i hate to be newbe)
any way .. now that i have this choose working fine i have new problem .
im trying to close every <dir..../><File/><File/><File/> with <span> tag in
the so in the end it will be

<span>  <-------------------------------------this is the span i like to
add.
    <span><dir..../></span>
    <span><File/><span>
    <span><File/><span>
    <span><File/><span>
        <span>  <-------------------------------------this is the span i
like to add.
            <span><dir..../></span>
            <span><File/><span>
            <span><File/><span>
            <span><File/><span>
                <span>  <-------------------------------------this is the
span i like to add.
                   <span><dir..../></span>
                   <span><File/><span>
                   <span><File/><span>
                    <span><File/><span>
                </span> <-------------------------------------this is the
close span i like to add
        </span> <-------------------------------------this is the close span
i like to add
</span> <-------------------------------------this is the close span i like
to add



now i have worked the way to add the inner span's but i can't figger the way
how to inssert the outer span that holds inside all the <span>s

here is the xsl file i have :
----------------------------------------------------------------------------
------------------
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet  version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform";>
<xsl:template match="/">
    <xsl:for-each select="/CdList//*">
 <xsl:call-template name="print"/>
 </xsl:for-each>
 </xsl:template>
 <xsl:template name="print">
  <xsl:choose>
 <xsl:when test="@type='father'">
 <span style="border:'1px solid red';width:auto">
  <xsl:value-of select="name()"/><xsl:text>=</xsl:text>
  <xsl:value-of select="./@id"/>
 </span>
 </xsl:when>
 <xsl:otherwise>
     <span style="border:'1px solid black';width:auto;padding-left:20">
  <xsl:value-of select="name()"/><xsl:text>=</xsl:text>
  <xsl:value-of select="./@id"/>
 </span>
 </xsl:otherwise>
    </xsl:choose>
 <br/>
    </xsl:template>
</xsl:stylesheet>

and here is the xsl file :
----------------------------------------------------------------------------
--------------------------
<?xml version='1.0'?>
<?xml-stylesheet type="text/xsl" href="flashCTL.xsl"?>
<CdList>
<Dir id="flash"  type="father">
<File id="battletank.zip"  type="child" />
<File id="flashquest.zip"  type="child" />
<File id="3d.fla"  type="child" />
<File id="3d.swf"  type="child" />
<File id="3D_Engin-KStor-189.zip"  type="child" />
<Dir id="1"  type="father"><File id="level1.txt"  type="child" />
<File id="flash_quest.swf"  type="child" />
<File id="level2.txt"  type="child" />
<File id="level3.txt"  type="child" />
<File id="level4.txt"  type="child" />
<File id="FKSingapore.txt"  type="child" />
</Dir>
<Dir id="3D_Engin"  type="father">
<File id="3DengineForDummies.fla"  type="child" />
<File id="3DengineForDummies.swf"  type="child" />
<File id="actionscriptsummary.swf"  type="child" />
<File id="button.jpg"  type="child" />
<File id="line.jpg"  type="child" />
<File id="rotating menu.html"  type="child" />
<File id="TheWayWeDoIt.jpg"  type="child" />
</Dir>
</Dir>
</CdList>
--------------------------------------------------------------------
thanks















 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread