Re: [Re: First Occurrence of an Element]

Subject: Re: [Re: First Occurrence of an Element]
From: Chuck Darney <cdarney@xxxxxxxxxxxxxxxx>
Date: Wed, 15 Apr 1998 10:21:24 -0400
These both work to find the lowest level of the element, but not just
the first time it occurs.  I have an element SECTION.  It can and will
ocuur throughout the instance.  There can be SECTIONs within
SECTIONs...  What I need to do is execute a function the first time a
SECTION element is encountered, but never again.  Should a switch be set
within the executed function to say that it's been done and it's not to
be done again?

..Chuck Darney

James Clark Wrote:

> Chris Maden wrote:
> >
> > [Chuck Darney]
> > > Is it possible to know when the first occurrence of an element
> > > exists?  I would like to be able to affect only the first occurrence
> > > of say the SECTION element.
> >
> > If they're always on the same level, you can use (child-number):
> >
> > (= (child-number (current-node))
> >    1)
> 
> first-sibling? or absolute-first-sibling? would be better: child-number
> and element-number can be slow.
> 
> James
> 
>  DSSSList info and archive:  http://www.mulberrytech.com/dsssl/dssslist


 DSSSList info and archive:  http://www.mulberrytech.com/dsssl/dssslist


Current Thread
  • Re: [Re: First Occurrence of an Element]
    • Chuck Darney - from mail1.ability.netby web4-1.ability.net (8.8.5/8.6.12) with ESMTP id KAA16349Wed, 15 Apr 1998 10:36:48 -0400 (EDT) <=
      • Chris Maden - from mail1.ability.netby web4-1.ability.net (8.8.5/8.6.12) with ESMTP id KAA16720Wed, 15 Apr 1998 10:51:00 -0400 (EDT)
      • Daniel Speck - from mail1.ability.netby web4-1.ability.net (8.8.5/8.6.12) with ESMTP id KAA16856Wed, 15 Apr 1998 10:54:21 -0400 (EDT)
      • Gregg Reynolds - from mail1.ability.netby web4-1.ability.net (8.8.5/8.6.12) with ESMTP id WAA24382Wed, 15 Apr 1998 22:47:00 -0400 (EDT)