Re: [xsl] finding next element after

Subject: Re: [xsl] finding next element after
From: Wendell Piez <wapiez@xxxxxxxxxxxxxxxx>
Date: Wed, 02 Oct 2002 13:53:42 -0400
Hi Nate,

At 01:18 PM 10/2/2002, you wrote:
I got it, but want to make sure that I am not doing
anything too funky here, as this is my first real
foray into using axises.

<xsl:when test="local-name(parent::node())='Link'">
<xsl:attribute name="align">
<xsl:value-of select="'bottom'" />
select="../../following-sibling::node()" />


Thoughts? Is there an easier/better way to accomplish

How about:

<xsl:when test="parent::Link">
  <xsl:for-each select="../../following-sibling::Caption">
    <!-- this might better be
         if you want to constrain it to the immediately following sibling;
         in any case if there's no Caption nothing happens, like your test
    <Caption align="bottom">
        <xsl:value-of select="."/>
       <!-- but you might rather apply templates here -->

Don't hesitate to post with questions.


====================================================================== Wendell Piez mailto:wapiez@xxxxxxxxxxxxxxxx Mulberry Technologies, Inc. 17 West Jefferson Street Direct Phone: 301/315-9635 Suite 207 Phone: 301/315-9631 Rockville, MD 20850 Fax: 301/315-8285 ---------------------------------------------------------------------- Mulberry Technologies: A Consultancy Specializing in SGML and XML ======================================================================

XSL-List info and archive:

Current Thread