Re: [xml] Dumping documents with substituted entities

On Thu, May 16, 2002 at 07:21:16PM +0000, Bjorn Reese wrote:
Jørgen Frøjk Kjærsgaard {Metation} wrote:

How do I make it output the document as:


The short answer is, you don't. The above is not well-formed XML. Instead

  Sorry to contradict you Bjorn (that's exceptionnal :-) but
this is well formed.

you could embed your Javascript in a CDATA section, or, if your output is
HTML, in a SCRIPT section.

  That's one way, but the answer is that for XML '"' and &quot; in that context
are totally undistinguishable once parsed via a conformant XML parser,
and if not parsed one should not care. So yes libxml2 choose to do it
one way, the other is legal too, the point is that Jorgen is putting a
requirement which sounds illogical from an XML point of view.


Daniel Veillard      | Red Hat Network
veillard redhat com  | libxml GNOME XML XSLT toolkit | Rpmfind RPM search engine

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