XML & XSL: Entities

From: Date: Sun, 03 Oct 2004 14:12:27 +0000
Subject: XML & XSL: Entities
Groups: php.xml.dev 
Request: Send a blank email to php-xml-dev+get-473@lists.php.net to get a copy of this message
Entities like &nbsp; a.o. are ommitted while XSL processing: <?xml version="1.0"?> <!DOCTYPE stylesheet SYSTEM "./DTD/entities.dtd"> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output method="html" omit-xml-declaration="no"/> <xsl:template match="/"> &nbsp; <xsl:apply-templates/> </xsl:template> </xsl:stylesheet> output is: (html source) Test [including whitespaces] How to prevent them from being ignored? Other question: is there a possibility to automatically resolve standard entities like &nbsp; within DOMDocuments, or do we really have to write a whole DTD for each document to use those entities? Entities and Encodings are very tricky in DOM, arent't them... ? Any suggestions are apreciated. thanks in advance vivi

« previous php.xml.dev (#473) next »