Re: First Occurrence of an Element

Subject: Re: First Occurrence of an Element
From: James Clark <jjc@xxxxxxxxxx>
Date: Wed, 15 Apr 1998 11:27:42 +0100
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


Current Thread
  • First Occurrence of an Element
    • Chuck Darney - from mail1.ability.netby web4-1.ability.net (8.8.5/8.6.12) with ESMTP id QAA01565Tue, 14 Apr 1998 16:06:02 -0400 (EDT)
      • Chris Maden - from mail1.ability.netby web4-1.ability.net (8.8.5/8.6.12) with ESMTP id QAA02169Tue, 14 Apr 1998 16:50:15 -0400 (EDT)
        • James Clark - from mail1.ability.netby web4-1.ability.net (8.8.5/8.6.12) with ESMTP id AAA05683Wed, 15 Apr 1998 00:50:51 -0400 (EDT) <=