[xsl] favor certain elements

Subject: [xsl] favor certain elements
From: "Szabo, Patrick \(LNG-VIE\)" <patrick.szabo@xxxxxxxxxxxxx>
Date: Mon, 19 Oct 2009 16:08:19 +0200

IB4m using Saxon 9, and XSLT 2.0.



desired output:


What i want do do is to apply templates to the elements a, b, c.
The problem is that there is an element a in element1 and another in element2.
(same thing with element b)
Is there a way to favor certain elements ?!
If there is an element a in element1 and element2 i want to use the a from
element2 - if there isnB4t i want to use the a from element1.
I want to to the same thing with b but contrariwisely.

What i want is something like.

<xsl:apply-templates select="//a" fav="parent::element2"/>

I hope i explained the question sufficiently !


Patrick Szabo

Tel.: +43 (1) 534 52 - 1573
Fax: +43 (1) 534 52 - 146


LexisNexis Verlag ARD Orac GmbH & Co KG
Marxergasse 25, 1030 Wien
FN 8333f, Handelsgericht Wien

Current Thread