thanks for your help.
I was puzzeld about the xpath expression because in the program I use it is a legal xpath expression if the debugger is in the top template. But on the next template the debugger says: "Error in xpath expression...." I seem to fail to understand important things in xpath.
In order to find a solution to my question, I tried out to find an xpath expression which finds out if the current node has any siblings:
I have the following input:
- <artikel>
-
<Lemma>Lemma</Lemma>
-
<Variante code="1">V1</Variante>
-
<Variante code="2">V2</Variante>
-
<Variante code="3">V3</Variante>
-
<Grammatik>gramma</Grammatik>
-
</artikel>
I ask - once the current node is <Variante/> -:
count(parent::*/*[name()='Variante'])
this gives me as I had hoped "3" as answer.
But if I write instead
count(parent::*/*[name()=local-name()])
I get 5 as answer:
although xpath: local-name() gives me 'Variante' as name:
Why should I get a different answer? I seem to fail to understand important parts in XPATH.