[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: find the following sibling of my parent

Subject: Re: find the following sibling of my parent
From: "Sebastian Rahtz" <sebastian.rahtz@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
Date: Thu, 27 Apr 2000 00:31:56 +0100 (BST)
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


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.