MCPcopy Create free account
hub / github.com/Kitware/VTK / htmlDtdDumpOutput

Function htmlDtdDumpOutput

ThirdParty/libxml2/vtklibxml2/HTMLtree.c:617–641  ·  view source on GitHub ↗

* htmlDtdDumpOutput: * @buf: the HTML buffer output * @doc: the document * @encoding: the encoding string * * TODO: check whether encoding is needed * * Dump the HTML document DTD, if any. */

Source from the content-addressed store, hash-verified

615 * Dump the HTML document DTD, if any.
616 */
617static void
618htmlDtdDumpOutput(xmlOutputBufferPtr buf, xmlDocPtr doc,
619 const char *encoding ATTRIBUTE_UNUSED) {
620 xmlDtdPtr cur = doc->intSubset;
621
622 if (cur == NULL) {
623 htmlSaveErr(XML_SAVE_NO_DOCTYPE, (xmlNodePtr) doc, NULL);
624 return;
625 }
626 xmlOutputBufferWriteString(buf, "<!DOCTYPE ");
627 xmlOutputBufferWriteString(buf, (const char *)cur->name);
628 if (cur->ExternalID != NULL) {
629 xmlOutputBufferWriteString(buf, " PUBLIC ");
630 xmlOutputBufferWriteQuotedString(buf, cur->ExternalID);
631 if (cur->SystemID != NULL) {
632 xmlOutputBufferWriteString(buf, " ");
633 xmlOutputBufferWriteQuotedString(buf, cur->SystemID);
634 }
635 } else if (cur->SystemID != NULL &&
636 xmlStrcmp(cur->SystemID, BAD_CAST "about:legacy-compat")) {
637 xmlOutputBufferWriteString(buf, " SYSTEM ");
638 xmlOutputBufferWriteQuotedString(buf, cur->SystemID);
639 }
640 xmlOutputBufferWriteString(buf, ">\n");
641}
642
643/**
644 * htmlAttrDumpOutput:

Callers 1

htmlNodeDumpFormatOutputFunction · 0.85

Calls 4

htmlSaveErrFunction · 0.85
xmlStrcmpFunction · 0.85

Tested by

no test coverage detected