Re: [xsl] Testing for value of a preceding "cousin"

Subject: Re: [xsl] Testing for value of a preceding "cousin"
From: Charles Muller <cmuller-lst@xxxxxxxxxxxxxxx>
Date: Thu, 10 Feb 2011 18:32:56 +0900
On 02/10/2011 03:37 PM, Brandon Ibach wrote:

You need to use the ancestor axis to look up the tree, rather than
searching from the root down, which will always return true, as long
as there's a journal title somewhere in the document.  Also, it may
have just been a typo in your example, but you were missing the "@"
before "level".

<xsl:when test="ancestor::monogr[1]/title[@level='j']">...</xsl:when>

Very nice. Much appreciated.


Chuck

-------------------

A. Charles Muller

University of Tokyo
Graduate School of Humanities and Sociology, Faculty of Letters
Center for Evolving Humanities
7-3-1 HongE
, BunkyE
-ku
Tokyo 113-0033, Japan

Web Site: Resources for East Asian Language and Thought
http://www.acmuller.net

<acmuller[at]jj.em-net.ne.jp>

Mobile Phone: 090-9310-1787

Current Thread