I'm trying to start using EXSLT.
Here's my base XSL.
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:exsl="http://exslt.org/common"
extension-element-prefixes="exsl"
version="1.0">
<xsl:import href="exsl.xsl" />
<xsl:output method="html" doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd" doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN" indent="yes"/>
<xsl:variable name="main" select="/data"/>
<xsl:template match="/data">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
HTML STARTS
<br/>
<xsl:variable name="metadata" select="document('metadata.xml')"/>
Straight Value of<br/>
<xsl:value-of select="$metadata"/>
Node-set value of <br/>
<xsl:value-of select="exsl:node-set($metadata)/email"/>
<xsl:for-each select="$metadata/Data">
<xsl:variable name="node" select="."/>
<xsl:value-of select="$node"/>
Test<br/>
</xsl:for-each>
</html>
</xsl:template>
</xsl:stylesheet>
I've downloaded the common module from the EXSLT website. (http://www.exslt.org/exsl/index.html)
The structure of this module is:
base.css exsl.xsl /functions/node-set/base.css /functions/node-set/exsl.node-set.xml /functions/object-type/base.css /functions/object-type/exsl.object-type.xml /elements/document/base.css /elements/document/exsl.document.xml (+ some htmls in each folder).
I extract this and place it in the same directory as my base XSL, so that exsl.xsl and my base xsl are in the same folder.
The exsl.xsl sayss
<?xml version="1.0" encoding="utf-8"?>
<stylesheet xmlns="http://www.w3.org/1999/XSL/Transform" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:exsl="http://exslt.org/exsl" version="1.1" extension-element-prefixes="exsl" exsl:doc="http://www.exslt.org/exsl">
<import href="node-set/exsl.node-set.xsl"/>
<import href="object-type/exsl.object-type.xsl"/>
</stylesheet>
Now this seems wrong in itself as it's not pointing to the functions folder first. However, even if I add function:
<import href="functions/node-set/exsl.node-set.xsl"/>
<import href="functions/object-type/exsl.object-type.xsl"/>
I get a 'Local file not found' error on XMLSpy.
Any idea how I get this started?