I've made a simple version of my template here to highlight the problem
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" >
<xsl:output method="html" omit-xml-declaration="yes" indent="yes" encoding="utf-8" />
<xsl:param name="html-content-type" />
<xsl:variable name="availableloops" select="'ProductRelatedGroups,RelatedProducts'" />
<xsl:template match="/Template">
<xsl:for-each select="loop[@name='ProductRelatedGroups']/item">
<xsl:for-each select="./loop[@name='RelatedProducts']/item">
<Link Name="MyLink" Href="http://dynamicweb.dk"></Link>
</xsl:for-each>
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>
this will result in unclosed Link tag like this:
<Link Name="MyLink"Href="http://dynamicweb.dk">
But if I change the tag name from Link to fx. String, it outputs the close tag nicely:
<String Name="MyLink"Href="http://dynamicweb.dk"></String>
And to make it even wireder, i have an Ecom productlist where I do the same inside the product loop, and here it works nicely.
Does anyone have any idea of whats is wrong?