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 |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[no subject], Dr. Markus Hönicka | Thread | Re: [Re: First Occurrence of an Ele, Chris Maden |
[no subject], Dr. Markus Hönicka | Date | Re: [Re: First Occurrence of an Ele, Chris Maden |
Month |