Re: [xslt] Suppress <!DOCTYPE for html output



On Tue, Aug 28, 2001 at 06:06:09PM -0500, Tom Moog wrote:
> 
> Is there a clever way to suppress the <!DOCTYPE...> when
> generating html output ?

  xsltSaveResultTo() call
     htmlDocContentDumpOutput() from libxml to save the result
itself calls
       htmlDocContentDumpFormatOutput() which does
           
  if (cur->intSubset != NULL) {
      htmlDtdDumpOutput(buf, cur, NULL);
  }

Removing the internal subset from the result document should then work

    xmlDtdPtr oldDtd;

    ...
    oldDtd = res->intSubset;
    res->intSubset = NULL;
    xsltSaveResultTo(buf ,res, style)
    res->intSubset = oldDtd;
    ...

Daniel

-- 
Daniel Veillard      | Red Hat Network http://redhat.com/products/network/
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]