[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: Counter values in attributes??

Subject: RE: Counter values in attributes??
From: "Livingstone, Stephen" <Livinsb@xxxxxxxxxx>
Date: Thu, 18 Feb 1999 11:23:57 -0000
dhtml get attribute colspan
Bit extreme, but maybe use DHTML(client)/ASP(server) to dynamiclly
re-size the table as you retreive new instances??

steven

Steven Livingstone BSc MSc GradInstP
Corporate Systems Development (TCN)
Royal Bank Of Scotland.
> *: mailto:livinsb@xxxxxxxxxx
> *:  +44 0131 523 4354 [x24354]
> 
Networking Technical Associates,
Glasgow, Scotland.
> *: mailto:ntw_uk@xxxxxxxxxxx
> *: +44 07771-957-280
> 
> -----Original Message-----
> From:	Evan Easton [SMTP:evan@xxxxxxxxxxx]
> Sent:	Wednesday, February 17, 1999 8:49 PM
> To:	XSL-List@xxxxxxxxxxxxxxxx
> Subject:	Counter values in attributes??
> 
> 
> *** Warning : this message originates from the Internet ****
> 
> I'd like some enlightenment on counters if there's any to be had.  I'm
> having problems with this scenario:  I have a parent tag (container)
> that contains a variable number of children.  I want to prepare an
> HTML
> table that has a header cell containing the description of the
> container.  I want this header cell to span the same number of columns
> as there are children.
> 
> For example, the XML:
> 
>    <container>
>       <description>My Kids</description>
>       <child>Child 1</child>
>       <child>Child 2</child>
>       <child>Child 3</child>
>    </container>
> 
> Should get turned into a table like:
> 
>    +-----------------------------+
>    |           My Kids           |
>    +---------+---------+---------+
>    | Child 1 | Child 2 | Child 3 |
>    +---------+---------+---------+
> 
> I'm trying to use a counter to count all the container's children.  I
> have a template matching the child tag in the "count" mode which
> increments the "childCount" counter.  Next I want to include the value
> of the "childCount" counter as the COLSPAN tag of the TD for the
> description header.  I've tried all sorts of things to get the counter
> value as an attribute to no avail (See XSL below). 
> 
> ----------- XSL Snippet -----------
> <xsl:template match="container">
> 	<!-- COUNT MY CHILDREN -->
> 	<xsl:counter-reset name="childCount"/>
> 	<xsl:apply-templates select="child" mode="count"/>
> 
> 	<TD COLSPAN="{../xsl:counters[@name='bubbleCount']/@value}">
> 		<xsl:apply-templates select="description"/>
> 	</TD>
> </xsl:template>
> 
> <xsl:template match="child" mode="count">
> 	<xsl:counter-increment name="childCount"/>
> </xsl:template>
> 
> 
> So, is there a way to get the counter value other than <xsl:counter
> name="childCount"/> (which won't work in the attribute)?  If not, how
> else might I solve this problem?
> 
> Evan Easton
> 
> 
>  XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


This e-mail message is confidential and for use by the addressee only.  If the message is received by anyone other than the addressee, please return the message to the sender by replying to it and then delete the message from your computer..

'Internet e-mails are not necessarily secure. The Royal Bank of Scotland plc does not accept responsibility for changes made to this message after it was sent.'



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


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.