Find out if siebling with specific name exists

I am a real newbie to XSLT, and probably this question is a piece of cake for you.

I have the following XML :

When I’m “positioned” in the element. How do I find out of there is any element present ?


Hello Nietzer,

I don’t really get your question … Perhaps you are mistaking sibling nodes with child nodes.

Sibling nodes of a node are the “brothers” & “sisters” nodes of the node.

So, as “complexType” is a child node of the “element” node, your XSL template could be :

<xsl:template match=“element[@name = ‘ReferenceDetails’]”>

<xsl:when test=“complexType”>



Here you go.

If you have any question, feel free to ask.

Bertrand Martel
Software AG France