|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] 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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








