Nifty! Thanks very much for all the instruction and advice, and have a
fine, fine weekend.
Bob
On 9/8/06, David Carlisle <davidc(_at_)nag(_dot_)co(_dot_)uk> wrote:
> So, turning to elegance. Better to have that test inside the loop? Or
> just ahead of, triggered by a test="exists(key('findTitle', blah,
> blah))" ?
if I'm producing text or html or something I use the position()=1 method
(often as not). If I'm producing a proper structured xml nnested output
then you can't put the heading inside the loop as you need to do
something like
<xsl:if test="key(...)">
<section>
<head>...</head>
<xsl:for-each select="key(...)">
...
</xsl:for-each>
</section>
</xsl:if>
or since i see you're xslt2, you can often replace the whole shebang with
<xsl:for-each-group select="something" group-by="something else">
<section>
<head>...</head>
<xsl:for-each select="current-group()">
...
</xsl:for-each>
</section>
</xsl:for-each-group.
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--