Re: [xsl] XSL design question

Subject: Re: [xsl] XSL design question
From: David Carlisle <davidc@xxxxxxxxx>
Date: Tue, 2 Sep 2003 18:29:53 +0100


> 2) Why doesn't <xsl:apply-templates select="*[not(descendant::index)]"/>
> process all elements except <index> elements?

It selects all children that don't have an index descendent. Isn't that
what you expect?


> I would need to create "NO_INDEX" mode templates of any element that could
> contain an <index> element, right?
No, why?

You just need something like

<xsl:template name="make_toc">
      <xsl:for-each select="//title">
            <p class="toc">
                  <xsl:apply-templates mode="toc"/>
            </p>
      </xsl:for-each>
</xsl:template>

Then a template in toc mode for just b i tt and index.
(actually don't you want your toc lines to be <a> links rather that <p>
?

David


________________________________________________________________________
This e-mail has been scanned for all viruses by Star Internet. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
________________________________________________________________________

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


Current Thread