This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: accessing an attribute value in a for-each loop
- To: <xsl-list at lists dot mulberrytech dot com>
- Subject: Re: [xsl] accessing an attribute value in a for-each loop
- From: Jörg Heinicke <joerg dot heinicke at gmx dot de>
- Date: Thu, 18 Oct 2001 00:26:36 +0200
- References: <20011017234807.X29680@apple.fruitcom.com>
- Reply-To: xsl-list at lists dot mulberrytech dot com
Hello Eric,
are you sure that it doesn't work? I saw it and found nothing, tested it and
there was no problem - with MSXML and Xalan. Maybe you looked to fast
because the most of your <cell>s don't have an span-attribute.
Furthermore your <xsl:attribute> can't work, because you can't add the same
attribute multiple times (one for each <cell>).
Joerg
> Why can I not access the @span value in the XSL below, first the XML:
> ... and the XSL fragment:
>
> <xsl:template match="table">
> <fo:table break-before="page">
> <fo:table-column column-width="100pt"/>
> <fo:table-column column-width="100pt"/>
> <fo:table-column column-width="75pt"/>
> <fo:table-column column-width="100pt"/>
> <fo:table-column column-width="75pt"/>
> <fo:table-column column-width="100pt"/>
> <fo:table-column column-width="100pt"/>
> <fo:table-body font-size="6pt" font-family="sans-serif">
> <xsl:for-each select="row">
> <fo:table-row>
> <xsl:for-each select="cell">
> <!-- <xsl:attribute
name="number-columns-spanned">5</xsl:attribute> nope :( -->
> <fo:table-cell number-columns-spanned="{@span}" >
> <fo:block>
>
> --
> Eric Smith - using xalan and fop
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list