xsl-list
[Top] [All Lists]

RE: RE: RE: Need to use generate-id() or other method?

2003-04-24 13:46:42
Here is the template that builds the table. Where I'm now using a checkbox
attribute to indicate if a given step should be timed, I will change to be
two columns using the StartTime and EndTime buttons if/when the Timer
attribute for <step> = yes.

Thanks again.

Kathy

<xsl:template match="process_steps">
        <table border="1" cellpadding="4">
        <tr bgcolor="blue" valign="middle">
                <th align="left" colspan="2">
                        <h3>PROCESS STEPS</h3>
                </th>
                        <xsl:apply-templates/>
        </tr>
        </table> 
        </xsl:template> 
        
<xsl:template match="step">  
        <xsl:variable name="space" select="(count(ancestor::step) * 12 + 1)
* 7"/>
        <tr>
                <td width="5%" align="center" valign="top">
                        <xsl:apply-templates select="@ckbox[.='yes']"/>   
                </td>   
                <td valign="top">
                        <table width="100%" border="0" cellpadding="0">
                        <tr>      
                                <td valign="top" width="{$space}">
                                <table border="0" cellpadding="0">
                                        <tr>
                                        <td valign="top"
width="{$space}">&#160;&#160;</td>
                                        <td valign="top">
                                        <xsl:number level="multiple"
count="step" format="1.1"/>
                                                <xsl:if
test="not(ancestor::step)">
                                                <xsl:text>.</xsl:text>
                                                </xsl:if>         
        
<xsl:text>&#160;&#160;</xsl:text>
                                        </td>
                                        </tr>      
                                </table>      
                                </td>      
                                <td>       
                                        <xsl:apply-templates
select="*[not(self::step)]"/>      
                                </td>     
                        </tr>    
                </table>   
        </td>  
        </tr>  
        <xsl:apply-templates select="step"/> 
</xsl:template> 
        
<xsl:template match="@ckbox">  
        <input type="checkbox">
                <xsl:if test=".='yes'">
                        <xsl:attribute
name="unchecked">unchecked</xsl:attribute>
                </xsl:if>  
        </input> 
</xsl:template> 



-----Original Message-----
From: cknell(_at_)onebox(_dot_)com [mailto:cknell(_at_)onebox(_dot_)com]
Sent: Thursday, April 24, 2003 4:38 PM
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: RE: RE: RE: [xsl] Need to use generate-id() or other method?


-----Original Message-----
From:     "Kathy Burke" <Kathy_Burke(_at_)Jabil(_dot_)com>

This does seem to be easier than what I was thinking!

Although the <step> elements don't have an assigned id attribute, I > use
xsl:number when I build the table and they get 
numbered 1., 1.1, 1.1.1, etc.
Could I somehow create this attribute as part of my xsl:number
template...then create the StartTime, EndTime attributes as well?

It would be easier to help if you posted the template that matches
<process_step>.

-- 
Charles Knell
cknell(_at_)onebox(_dot_)com - email


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



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