Community Tip - If community subscription notifications are filling up your inbox you can set up a daily digest and get all your notifications in a single email.
X
There can only be one axis specifier ("parent::", "preceding-sibling::", etc.) per step and it must be followed by a node test. So, your case would be something like:
Note that this would be true if *any* of the parent's preceding siblings are a "volume" element. To check if just the immediately preceding sibling is a volume:
On Tue, Jul 27, 2010 at 5:46 PM, Jarrett, John T (US SSA) <-> wrote: > This is what I’m trying to do: > > > > <xsl:if test="name(parent:receding-sibling)='volume"> > > > > Or > > > > <xsl:if test="parent:receding-sibling::volume"> > > > > Some of these XPath chapters show 3 in a row, but the parser just goes > Pffft. > > > > Test if the parent’s preceding sibling is <volume>. > > > > The parent tag varies, but will either have <volume> right above it or it > won’t. > > > > I’ve written it a hundred ways wrong and now my eyes are blurred from > banging my head on my desk. > > > > Can’t even run a good test to find it. > > > > <xsl:value-of select="name(parent:receding-sibling)"/"> > > > > Adding ::node() just throws a parser error. > > > > Thanks…hope it is just another can’t see the forest for the trees…what am I > missing? > > > > > > John T. Jarrett CDT > > Senior Tech Writer, Integrated Logistics Support,Land & Armaments/Global > Tactical Systems > > > > T832.673.2147 | M 832.363.7234 | F 832.673.2376| x1147 | > - > > BAE Systems, 5000 I-10 West, Sealy, Texas USA 77474 > > www.baesystems.com > > > > > > ----------