XSLT is extensible via functions and actions (elements).
You designate the namespaces that are extensions via the 'extension-element-prefixes' attribute:
<xsl:transform version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
extension-element-prefixes="d c"
xmlns:d="http://exslt.org/dates-and-times"
xmlns:c="http://exslt.org/common"
>
<xsl:template match="/">
<c:document href="output-{d:year()}-{d:day-in-year()}.xml">
<date><xsl:value-of select="d:date()"/></date>
</c:document>
</xsl:template>
</xsl:transform>
See www.exslt.org for a list of "standard" extensions.