René Nyffenegger's collection of things on the web | |
René Nyffenegger on Oracle - Most wanted - Feedback
- Follow @renenyffenegger
|
XSL: Writing <foo> (Not nested tags) | ||
An XSL file is not well formed if it contains tags that don't nest. With
<xsl:text disable-output-escaping="yes">, it is possible to circumvent that:
The XML File:
<?xml version="1.0"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:template match="/"> <xsl:text disable-output-escaping="yes"> <foo> </xsl:text> </xsl:template> </xsl:stylesheet>
The XSL File:
<?xml version="1.0"?> <something> <or something="different"> </or> </something>
The output (whitespaces manually modified):
<?xml version="1.0" encoding="UTF-8"?> <foo> |