Created
January 22, 2017 03:40
-
-
Save brendo/82ce88129e00aa9f0bd5070e446c2085 to your computer and use it in GitHub Desktop.
XSLT and Entities
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
<!ENTITY world "world"> | |
<!ENTITY copy "©"> |
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
<!DOCTYPE xsl:stylesheet [ | |
<!ENTITY world "world"> | |
<!ENTITY copy "©"> | |
]> | |
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> | |
<xsl:output omit-xml-declaration="no" method="html" indent='yes' /> | |
<xsl:template match="/"> | |
<xsl:text disable-output-escaping="yes"><</xsl:text>!DOCTYPE html<xsl:text disable-output-escaping="yes">> </xsl:text> | |
<head> | |
<title>Test</title> | |
</head> | |
<body> | |
<h1>Hello &world;</h1> | |
<p>Look at me using crazy entities like ©.</p> | |
</body> | |
</xsl:template> | |
</xsl:stylesheet> |
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
<!DOCTYPE xsl:stylesheet [ | |
<!ENTITY % entities SYSTEM "entities.dtd"> | |
%entities; | |
]> | |
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> | |
<xsl:output omit-xml-declaration="no" method="html" indent='yes' /> | |
<xsl:template match="/"> | |
<xsl:text disable-output-escaping="yes"><</xsl:text>!DOCTYPE html<xsl:text disable-output-escaping="yes">> </xsl:text> | |
<head> | |
<title>Test</title> | |
</head> | |
<body> | |
<h1>Hello &world;</h1> | |
<p>Look at me using crazy entities like ©.</p> | |
</body> | |
</xsl:template> | |
</xsl:stylesheet> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment