ePublisher Platform XSLT Extensions
XPathNodeIterator MakeEmptyElement (object input)
 
Converts a non-empty XML node to an empty node.
Parameters:
input
The input node set.
Returns:
A node set containing a single empty node.
<img src="blue.jpg">
</img>
becomes:
<img src="blue.jpg" />
Insure <img> element is emitted as an empty XML node for proper display in HTML browsers.
<xsl:variable name="VarImageElementAsXML">
<xsl:element name = "img" >
< xsl:attribute name = "src" >
< xsl:value-of select = "'blue.jpg'" />
</ xsl:attribute>
</xsl:element>
</xsl:variable>
<xsl:variable name = "VarImageElement" select="msxsl:node-set($VarImageElementAsXML)/*" />
<xsl:value-of select = "wwexsldoc:MakeEmeptyElement($VarImageElement)" />