Re: [xml] Adding an entity in a textnode



On Tue, Dec 10, 2002 at 04:37:58PM +0100, christoph riedl wrote:
I'm building up a xmldoc from scratch. Then I create a text node with the
following content: "german umlaut ü". When I then dumpmem the whole thing,
the result lookes like "german umlaut ü".

  you need to create an entity reference node, no idea how to do it
from php.

The whole project is intended for generating html files in the end (after an
additional processing via sxlt). So a textnode containing an entity would be
perfectely ok.

  no, because the XSLT processing model forces to replace entities references
with their value. So this won't work though the XSLT chain anyway.
Don't use ü but the character it represent in UNICODE. And remember 
libxml2/libxslt uses UTF8 so you must use that encoding.
  http://xmlsoft.org/encoding.html

Daniel

-- 
Daniel Veillard      | Red Hat Network https://rhn.redhat.com/
veillard redhat com  | libxml GNOME XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]