Created
June 7, 2012 10:32
-
-
Save nickdunn/2888094 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<xsl:stylesheet version="1.0" | |
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" | |
xmlns:my_function="http://example.com"> | |
<!-- | |
Note the function declaration above. | |
While the namespace URI is from the function's extension, I've made up the prefix 'my_function' just for use in this doc. | |
--> | |
<xsl:output method="xml" | |
doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN" | |
doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd" | |
omit-xml-declaration="yes" | |
encoding="UTF-8" | |
indent="yes" /> | |
<!-- include the stream, this does all sorts of awesome --> | |
<xsl:include href='efm://functions' /> | |
<xsl:template match="/"> | |
<xsl:variable name='name' select="'I am a boring string.'" /> | |
<p><xsl:value-of select='my_function:hello($name)' /></p> | |
</xsl:template> | |
</xsl:stylesheet> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Brilliant! Appreciate for getting this working.