XSLTSL seems to claim that we can use EXSLT without downloading its source:
Import or include either the main stylesheet, or the stylesheet module you wish to use, directly from the library website; http://xsltsl.sourceforge.net/modules/. The modules directory always contains the latest stable release.
I've tried this:
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:import href="http://xsltsl.sourceforge.net/modules/string.xsl"/>
<xsl:output method="text" indent="yes"/>
<xsl:template match="/">
<xsl:call-template name="str:to-upper">
<xsl:with-param name="text">hello world</xsl:with-param>
</xsl:call-template>
</xsl:template>
</xsl:stylesheet>
But its not working. I don't seem to be able to use EXSLT without downloading its source.
Is there anyway to use EXSLT without downloading its source?
You are not using the library correctly. Take a look at the instructions here.
Once you have downloaded the library, you need to:
1) Add an import to your xsl file:
2) Add a namespace:
3) Call the template like this:
This will produce
HELLO WORLD
.UPDATE:
No, you do not need to download the library locally. You can simply link to
string.xsl
using the full URL.As is explaind in Using the library, you need to download it and
import it into your xslt script.
Btw, as an alternative you can also use the xslt translate function:
It is a bit big to use in multiple places, but as long as you can place this in a template that shouldn't matter much.