|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: preceding axis and context switching (was re: con
Bruce,
In effect what you're learning is that as you apply templates to one or another node, you sometimes have to "carry your context with you". You are doing this with parameters. So if your calling a new template switches the context back to the $cite-ref, pass the db:citation context as a parameter as you do so. Then in the cite-ref context, assuming the db:citation is bound to $citation, your test would look like count($citation/../db:citation) = 1 and $citation/@linkend = $citation/preceding::db:citation[1]/@linkend (See those location paths start from a node bound to a parameter, instead of implicitly from the current node, which has switched.) This switching back and forth (and the resulting question, "which tree am I on?", which fortunately isn't generally hard to answer) is of the essence of the kind of solution you are designing; once you get the hang of it it's kind of fun. Cheers, Wendell At 04:02 AM 5/25/2005, you wrote: Wendell wrote: ====================================================================== Wendell Piez mailto:wapiez@xxxxxxxxxxxxxxxx Mulberry Technologies, Inc. http://www.mulberrytech.com 17 West Jefferson Street Direct Phone: 301/315-9635 Suite 207 Phone: 301/315-9631 Rockville, MD 20850 Fax: 301/315-8285 ---------------------------------------------------------------------- Mulberry Technologies: A Consultancy Specializing in SGML and XML ======================================================================
|
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








