Re: XML & XSL: Entities
| From: | Christian Stocker | Date: | Sun, 03 Oct 2004 18:59:42 +0000 |
| Subject: | Re: XML & XSL: Entities | ||
| References: | 1 | Groups: | php.xml.dev |
| Request: | Send a blank email to php-xml-dev+get-476@lists.php.net to get a copy of this message | ||
On 3.10.2004 16:12 Uhr, Vivian Steller wrote:
Entities like 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">They are not ommitted, but expanded.<xsl:output method="html" omit-xml-declaration="no"/> <xsl:template match="/"> <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 within DOMDocuments, or do we really have to write a whole DTD for each document to use those entities?There are no standard entities in XML, therefore you always have to include the correct DTD.
Entities and Encodings are very tricky in DOM, arent't them... ?No, it's quite logical once you got the idea ;) chregu
Any suggestions are apreciated. thanks in advance vivi-- christian stocker | Bitflux GmbH | schoeneggstrasse 5 | ch-8004 zurich phone +41 1 240 56 70 | mobile +41 76 561 88 60 | fax +41 1 240 56 71 http://www.bitflux.ch | chregu@bitflux.ch | gnupg-keyid 0x5CE1DECB