>how would one write it using a template call?
You could, if you wanted, replace
<xsl:value-of select="personals/kategorija/biedrs/niks"/>
with
<xsl:apply-templates select="personals/kategorija/biedrs/niks"/>
and
<xsl:template match="niks">
<xsl:value-of select="."/>
</xsl:template>
>Am I the only one that finds templates somewhat mysterious in their operation?
No, it's a common learning problem, especially for programmers coming from a more structured environment without previous experience of text processing. It applies also to other event-based programming models, for example GUI programming and SAX parsing applications. Programmers like to be in control, they like to call the system, not have the system call them. But event-based (or rule-based) programming is a very powerful model when you don't know in advance what the order of events is going to be, or how it might change in the future: that's why it works particularly well with semi-structured data.
Michael Kay
http://www.saxonica.com/
Author, XSLT Programmer's Reference and XPath 2.0 Programmer's Reference