Hello everyone,
I'm trying to use XSLT to create Edge Side Includes html blocks.
Here is a sample XSLT
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:esi="http://www.edge-delivery.org/esi/1.0"
exclude-result-prefixes="xsl esi">
<xsl:output method="html"
media-type="text/html"
version="1.0"
encoding="UTF-8"
indent="no"
omit-xml-declaration="yes"/>
<xsl:template match="/">
<esi:vars>
<xsl:text>some text goes here</xsl:text>
</esi:vars>
</xsl:template>
</xsl:stylesheet>
While the transformation works per-se, the output is this:
<esi:vars xmlns:esi="http://www.edge-delivery.org/esi/1.0">some text goes here</esi:vars>
problem is, the xmlns:esi attribute horribly breaks ESI execution. If I remove the attribute manually (eg: open the HTML and delete it, saving the code block again) everything works fine.
Question: How can I remove the xmlns:esi from the HTML output? I tried including it in exclude-results-prefixes, but didn't work.
Sample output that WILL work:
<esi:vars>some text goes here</esi:vars>