Re: Recursive elements in DSSSL

Subject: Re: Recursive elements in DSSSL
From: Brandon Ibach <bibach@xxxxxxxxxxxxxx>
Date: Tue, 29 Feb 2000 11:34:06 -0600
Quoting Stephane Bortzmeyer <bortzmeyer@xxxxxxxxxx>:
> I'm using DSSSL for processing DocBook documents and I have a problem with 
> <section> elements: they can be embedded. I want to do a different processing 
> according to the depth. It seems I cannot use a global value to record the 
> depth, so I hesitate between:
> 
> [...]
> 
> I must confess my knowledge of DSSSL is unsufficient here. I've try to read 
> Norman Walsh's Modular Stylesheets but the code to process them seems too 
> hairy for me. Any simple solution?
> 
   Try: (node-list-length (select-elements (ancestors n) "SECTION"))
This will give you the number of <section>s above the current node.
So, for a top level <section>, it would return 0.

-Brandon :)


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


Current Thread