[Home] [By Thread] [By Date] [Recent Entries]
Jakob,
Mike suggested using a processor that supports intersection, which is an excellent approach. If you must use unextended XSLT 1.0, keys can help. Associate the nodes you want (in your illustration the "X" nodes) with their "owner" using its generated id; then when processing you can grab all the X nodes with their owners. For the illustrated case the key declaration would look something like: <xsl:key name="X-by-owner" match="X" use="generate-id((ancestor::sub|ancestor::chap)[last()])"/> which assigns to each X a key value representing the unique id of the closest sub or chap ancestor. Then when you match "chap" you can select="key("X-by-owner", generate-id())" and get back just the X nodes you want. Setting up that key to your particular criteria can be a bit tricky, and will exercise your XPath skills. Good luck, Wendell At 03:16 AM 3/10/2004, you wrote: Hi, ====================================================================== 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 ====================================================================== XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|

Cart



