Re: [xml] htmlDocDumpMemory() vs xmlDocDumpMemory()

Rush Manbert wrote:
Hi Julien,
Rush, have you specified a doctype in your html file? Have you checked
how other browsers behave?

Here is a sample of rendered output, using htmlDocDumpMemory():

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html xmlns=""; lang="en-US" xml:lang="en-US">

Like Julian said, the doctype is going to be an issue.
Are you specifying 'html' as the output method in your XSL? If so,
that's the likely culprit.
Instead, try setting up your <xsl:output> (or exsl:document) to generate
"real" XHTML:

  <xsl:output method="xml" version="1.0" encoding="utf-8"
     omit-xml-declaration="no" media-type="application/xhtml+xml"
     doctype-public="-//W3C//DTD XHTML 1.1//EN"

This should (hopefully) avoid any quirks mode in browsers.

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