|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Dynamic Table Generation
> (2) use it when producing each table row. however, this involves using a
> node-set()
you wouldn't have to use node-set if you'd have grabbed a node-set
rather than a result tree fragment
so rather than
<xsl:variable name="content-types">
<!-- list of (unique) content-types: -->
<xsl:for-each select="//content-type[not(.=following::content-type)]">
<th><xsl:value-of select="."/></th>
</xsl:for-each>
</xsl:variable>
you could do
<xsl:variable name="content-types"
<xsl:for-each select="//content-type[not(.=following::content-type)]">
/>
and instead of
<xsl:copy-of select="$content-types"/>
do
<xsl:for-each select="$content-types">
<th><xsl:value-of select="."/></th>
</xsl:for-each>
and instead of
<xsl:for-each select="xt:node-set($content-types)/th">
<td>
<xsl:if test=".=$s/content-type">X</xsl:if>
</td>
do
<xsl:for-each select="$content-types/content-type">
<td>
<xsl:if test=".=$s/content-type">X</xsl:if>
</td>
David
(untested:-)
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








