This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: find the following sibling of my parent


I solve a similar problem with code like this:

    <xsl:apply-templates select="ancestor::div[last() - $splitlevel]" />

that is to say, I go back up all the <div> ancestors I have, and get
the one which is $splitlevel from the top (where $splitlevel is the
point at which I split <div> elements off into separate files). 

in your situation, once you know the ancestor <div> at the level you are 
interested in, you can process it in a mode which looks for a
following sibling.

your error

	Error in expression $context::following-sibling::*[position()=1]:

is simply because XSL isnt like that. you cannot pile together a set
of axes. at the least:

  $context/following-sibling::*[position()=1]


See http://users.ox.ac.uk/~rahtz/tei/ for my TEI XSL style sheets
which do this stuff. I hope my explanation above is not too obscure,
and I am not misrepresenting your problem. Your paragraph

  I've got a stylesheet which creates a table of contents with
  links which call the second stylesheet.  To this second
  stylesheet I pass the id [generated using generate-id()] of the 
  div I want to see. 

mildly baffles me. "links which call the second stylesheet"?? what
gives here? From what you say, this looks like a one-pass problem.

I would be glad to discuss TEI XSL in more detail if it helps.

Sebastian Rahtz


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]