XSLT does not have loops. I am also not sure what you expect the "current page url" to be. You can however pass parameters to an XSLT stylesheet thus you can define a global parameter
Code:
<xsl:param name="cp"/>
in your stylesheet, set it with the API your XSLT processor exposes to your environment, pass in what you regard as the current page url and then use that parameter in XPath expressions e.g.
Code:
<xsl:template match="sitemap">
<xsl:value-of select="navlink[linkpath = $cp]/following-sibling::navlink[1]/linkpath"/>
</xsl:template>
will output the linkpath of the first navlink sibling of that navlink element where linkpath is equal to the parameter.