[xsl] Understanding XPath contains function

Subject: [xsl] Understanding XPath contains function
From: Ferdinand Soethe <xsl-list@xxxxxxxxxx>
Date: Sun, 30 Jul 2006 14:06:40 +0200
I'm confused by the difference in results when running the following
xpath expressions against the same document:

/common/Oberbereich[6][.//@Kursart='Bildungsurlaub']

will give me Oberbereich[6] as a result as expected (because it has
child elements that have a Kursart-Attribute of that value.

While
/common/Oberbereich[6][contains(.//@Kursart,'Bildungsurlaub')]
will not give me any results where it should at least give me the same
or more results that the previous expression, should it not?

Any hints much appreciated.

--
Ferdinand Soethe

Current Thread