Thank you for your answers! I managed to solve my problem with the last aalbetski's sollution. Since I'm still relative new to xml/xsl (etc.) issues I had more complex sollution before these ones. Again it seems that the simpliest ones are the best ones as well. I have still something here to digest but any way I can now do what I wanted. Thanks again.And you were right boen_robot. Child is not a gender but I tried to create something similar to my code and I guess this was the bad addition to my example:) I just tried to add more variants to my example to emphasize the importance of the issue that the type is unknown and can vary.