Lines Matching refs:cur
621 xhtmlNodeDumpOutput(xmlSaveCtxtPtr ctxt, xmlNodePtr cur);
623 static void xmlNodeListDumpOutput(xmlSaveCtxtPtr ctxt, xmlNodePtr cur);
624 static void xmlNodeDumpOutputInternal(xmlSaveCtxtPtr ctxt, xmlNodePtr cur);
625 void xmlNsListDumpOutput(xmlOutputBufferPtr buf, xmlNsPtr cur);
626 static int xmlDocContentDumpOutput(xmlSaveCtxtPtr ctxt, xmlDocPtr cur);
661 xmlNsDumpOutput(xmlOutputBufferPtr buf, xmlNsPtr cur, xmlSaveCtxtPtr ctxt) { in xmlNsDumpOutput() argument
662 if ((cur == NULL) || (buf == NULL)) return; in xmlNsDumpOutput()
663 if ((cur->type == XML_LOCAL_NAMESPACE) && (cur->href != NULL)) { in xmlNsDumpOutput()
664 if (xmlStrEqual(cur->prefix, BAD_CAST "xml")) in xmlNsDumpOutput()
673 if (cur->prefix != NULL) { in xmlNsDumpOutput()
675 xmlOutputBufferWriteString(buf, (const char *)cur->prefix); in xmlNsDumpOutput()
679 xmlBufWriteQuotedString(buf->buffer, cur->href); in xmlNsDumpOutput()
692 xmlNsDumpOutputCtxt(xmlSaveCtxtPtr ctxt, xmlNsPtr cur) { in xmlNsDumpOutputCtxt() argument
693 xmlNsDumpOutput(ctxt->buf, cur, ctxt); in xmlNsDumpOutputCtxt()
705 xmlNsListDumpOutputCtxt(xmlSaveCtxtPtr ctxt, xmlNsPtr cur) { in xmlNsListDumpOutputCtxt() argument
706 while (cur != NULL) { in xmlNsListDumpOutputCtxt()
707 xmlNsDumpOutput(ctxt->buf, cur, ctxt); in xmlNsListDumpOutputCtxt()
708 cur = cur->next; in xmlNsListDumpOutputCtxt()
721 xmlNsListDumpOutput(xmlOutputBufferPtr buf, xmlNsPtr cur) { in xmlNsListDumpOutput() argument
722 while (cur != NULL) { in xmlNsListDumpOutput()
723 xmlNsDumpOutput(buf, cur, NULL); in xmlNsListDumpOutput()
724 cur = cur->next; in xmlNsListDumpOutput()
793 xmlAttrDumpOutput(xmlSaveCtxtPtr ctxt, xmlAttrPtr cur) { in xmlAttrDumpOutput() argument
796 if (cur == NULL) return; in xmlAttrDumpOutput()
803 if ((cur->ns != NULL) && (cur->ns->prefix != NULL)) { in xmlAttrDumpOutput()
804 xmlOutputBufferWriteString(buf, (const char *)cur->ns->prefix); in xmlAttrDumpOutput()
807 xmlOutputBufferWriteString(buf, (const char *)cur->name); in xmlAttrDumpOutput()
809 xmlAttrSerializeContent(buf, cur); in xmlAttrDumpOutput()
823 xmlAttrListDumpOutput(xmlSaveCtxtPtr ctxt, xmlAttrPtr cur) { in xmlAttrListDumpOutput() argument
824 if (cur == NULL) return; in xmlAttrListDumpOutput()
825 while (cur != NULL) { in xmlAttrListDumpOutput()
826 xmlAttrDumpOutput(ctxt, cur); in xmlAttrListDumpOutput()
827 cur = cur->next; in xmlAttrListDumpOutput()
840 xmlNodeListDumpOutput(xmlSaveCtxtPtr ctxt, xmlNodePtr cur) { in xmlNodeListDumpOutput() argument
843 if (cur == NULL) return; in xmlNodeListDumpOutput()
845 while (cur != NULL) { in xmlNodeListDumpOutput()
847 ((cur->type == XML_ELEMENT_NODE) || in xmlNodeListDumpOutput()
848 (cur->type == XML_COMMENT_NODE) || in xmlNodeListDumpOutput()
849 (cur->type == XML_PI_NODE))) in xmlNodeListDumpOutput()
854 xmlNodeDumpOutputInternal(ctxt, cur); in xmlNodeListDumpOutput()
858 cur = cur->next; in xmlNodeListDumpOutput()
870 htmlNodeDumpOutputInternal(xmlSaveCtxtPtr ctxt, xmlNodePtr cur) { in htmlNodeDumpOutputInternal() argument
880 doc = cur->doc; in htmlNodeDumpOutputInternal()
905 htmlNodeDumpFormatOutput(buf, doc, cur, in htmlNodeDumpOutputInternal()
908 htmlNodeDumpFormatOutput(buf, doc, cur, in htmlNodeDumpOutputInternal()
929 xmlNodeDumpOutputInternal(xmlSaveCtxtPtr ctxt, xmlNodePtr cur) { in xmlNodeDumpOutputInternal() argument
935 if (cur == NULL) return; in xmlNodeDumpOutputInternal()
937 if (cur->type == XML_XINCLUDE_START) in xmlNodeDumpOutputInternal()
939 if (cur->type == XML_XINCLUDE_END) in xmlNodeDumpOutputInternal()
941 if ((cur->type == XML_DOCUMENT_NODE) || in xmlNodeDumpOutputInternal()
942 (cur->type == XML_HTML_DOCUMENT_NODE)) { in xmlNodeDumpOutputInternal()
943 xmlDocContentDumpOutput(ctxt, (xmlDocPtr) cur); in xmlNodeDumpOutputInternal()
948 xhtmlNodeDumpOutput(ctxt, cur); in xmlNodeDumpOutputInternal()
951 if (((cur->type != XML_NAMESPACE_DECL) && (cur->doc != NULL) && in xmlNodeDumpOutputInternal()
952 (cur->doc->type == XML_HTML_DOCUMENT_NODE) && in xmlNodeDumpOutputInternal()
955 htmlNodeDumpOutputInternal(ctxt, cur); in xmlNodeDumpOutputInternal()
959 if (cur->type == XML_DTD_NODE) { in xmlNodeDumpOutputInternal()
960 xmlDtdDumpOutput(ctxt, (xmlDtdPtr) cur); in xmlNodeDumpOutputInternal()
963 if (cur->type == XML_DOCUMENT_FRAG_NODE) { in xmlNodeDumpOutputInternal()
964 xmlNodeListDumpOutput(ctxt, cur->children); in xmlNodeDumpOutputInternal()
967 if (cur->type == XML_ELEMENT_DECL) { in xmlNodeDumpOutputInternal()
968 xmlBufDumpElementDecl(buf->buffer, (xmlElementPtr) cur); in xmlNodeDumpOutputInternal()
971 if (cur->type == XML_ATTRIBUTE_DECL) { in xmlNodeDumpOutputInternal()
972 xmlBufDumpAttributeDecl(buf->buffer, (xmlAttributePtr) cur); in xmlNodeDumpOutputInternal()
975 if (cur->type == XML_ENTITY_DECL) { in xmlNodeDumpOutputInternal()
976 xmlBufDumpEntityDecl(buf->buffer, (xmlEntityPtr) cur); in xmlNodeDumpOutputInternal()
979 if (cur->type == XML_TEXT_NODE) { in xmlNodeDumpOutputInternal()
980 if (cur->content != NULL) { in xmlNodeDumpOutputInternal()
981 if (cur->name != xmlStringTextNoenc) { in xmlNodeDumpOutputInternal()
982 xmlOutputBufferWriteEscape(buf, cur->content, ctxt->escape); in xmlNodeDumpOutputInternal()
987 xmlOutputBufferWriteString(buf, (const char *) cur->content); in xmlNodeDumpOutputInternal()
993 if (cur->type == XML_PI_NODE) { in xmlNodeDumpOutputInternal()
994 if (cur->content != NULL) { in xmlNodeDumpOutputInternal()
996 xmlOutputBufferWriteString(buf, (const char *)cur->name); in xmlNodeDumpOutputInternal()
997 if (cur->content != NULL) { in xmlNodeDumpOutputInternal()
1002 xmlOutputBufferWriteString(buf, (const char *)cur->content); in xmlNodeDumpOutputInternal()
1007 xmlOutputBufferWriteString(buf, (const char *)cur->name); in xmlNodeDumpOutputInternal()
1014 if (cur->type == XML_COMMENT_NODE) { in xmlNodeDumpOutputInternal()
1015 if (cur->content != NULL) { in xmlNodeDumpOutputInternal()
1017 xmlOutputBufferWriteString(buf, (const char *)cur->content); in xmlNodeDumpOutputInternal()
1022 if (cur->type == XML_ENTITY_REF_NODE) { in xmlNodeDumpOutputInternal()
1024 xmlOutputBufferWriteString(buf, (const char *)cur->name); in xmlNodeDumpOutputInternal()
1028 if (cur->type == XML_CDATA_SECTION_NODE) { in xmlNodeDumpOutputInternal()
1029 if (cur->content == NULL || *cur->content == '\0') { in xmlNodeDumpOutputInternal()
1032 start = end = cur->content; in xmlNodeDumpOutputInternal()
1052 if (cur->type == XML_ATTRIBUTE_NODE) { in xmlNodeDumpOutputInternal()
1053 xmlAttrDumpOutput(ctxt, (xmlAttrPtr) cur); in xmlNodeDumpOutputInternal()
1056 if (cur->type == XML_NAMESPACE_DECL) { in xmlNodeDumpOutputInternal()
1057 xmlNsDumpOutputCtxt(ctxt, (xmlNsPtr) cur); in xmlNodeDumpOutputInternal()
1063 tmp = cur->children; in xmlNodeDumpOutputInternal()
1075 if ((cur->ns != NULL) && (cur->ns->prefix != NULL)) { in xmlNodeDumpOutputInternal()
1076 xmlOutputBufferWriteString(buf, (const char *)cur->ns->prefix); in xmlNodeDumpOutputInternal()
1080 xmlOutputBufferWriteString(buf, (const char *)cur->name); in xmlNodeDumpOutputInternal()
1081 if (cur->nsDef) in xmlNodeDumpOutputInternal()
1082 xmlNsListDumpOutputCtxt(ctxt, cur->nsDef); in xmlNodeDumpOutputInternal()
1083 if (cur->properties != NULL) in xmlNodeDumpOutputInternal()
1084 xmlAttrListDumpOutput(ctxt, cur->properties); in xmlNodeDumpOutputInternal()
1086 if (((cur->type == XML_ELEMENT_NODE) || (cur->content == NULL)) && in xmlNodeDumpOutputInternal()
1087 (cur->children == NULL) && ((ctxt->options & XML_SAVE_NO_EMPTY) == 0)) { in xmlNodeDumpOutputInternal()
1097 if ((cur->type != XML_ELEMENT_NODE) && (cur->content != NULL)) { in xmlNodeDumpOutputInternal()
1098 xmlOutputBufferWriteEscape(buf, cur->content, ctxt->escape); in xmlNodeDumpOutputInternal()
1100 if (cur->children != NULL) { in xmlNodeDumpOutputInternal()
1103 xmlNodeListDumpOutput(ctxt, cur->children); in xmlNodeDumpOutputInternal()
1112 if ((cur->ns != NULL) && (cur->ns->prefix != NULL)) { in xmlNodeDumpOutputInternal()
1113 xmlOutputBufferWriteString(buf, (const char *)cur->ns->prefix); in xmlNodeDumpOutputInternal()
1117 xmlOutputBufferWriteString(buf, (const char *)cur->name); in xmlNodeDumpOutputInternal()
1131 xmlDocContentDumpOutput(xmlSaveCtxtPtr ctxt, xmlDocPtr cur) { in xmlDocContentDumpOutput() argument
1136 const xmlChar *oldenc = cur->encoding; in xmlDocContentDumpOutput()
1147 if ((cur->type != XML_HTML_DOCUMENT_NODE) && in xmlDocContentDumpOutput()
1148 (cur->type != XML_DOCUMENT_NODE)) in xmlDocContentDumpOutput()
1152 cur->encoding = BAD_CAST ctxt->encoding; in xmlDocContentDumpOutput()
1153 } else if (cur->encoding != NULL) { in xmlDocContentDumpOutput()
1154 encoding = cur->encoding; in xmlDocContentDumpOutput()
1157 if (((cur->type == XML_HTML_DOCUMENT_NODE) && in xmlDocContentDumpOutput()
1163 htmlSetMetaEncoding(cur, (const xmlChar *) encoding); in xmlDocContentDumpOutput()
1165 encoding = htmlGetMetaEncoding(cur); in xmlDocContentDumpOutput()
1171 cur->encoding = oldenc; in xmlDocContentDumpOutput()
1176 htmlDocContentDumpFormatOutput(buf, cur, in xmlDocContentDumpOutput()
1179 htmlDocContentDumpFormatOutput(buf, cur, in xmlDocContentDumpOutput()
1182 cur->encoding = oldenc; in xmlDocContentDumpOutput()
1187 } else if ((cur->type == XML_DOCUMENT_NODE) || in xmlDocContentDumpOutput()
1203 cur->encoding = oldenc; in xmlDocContentDumpOutput()
1220 if (cur->version != NULL) in xmlDocContentDumpOutput()
1221 xmlBufWriteQuotedString(buf->buffer, cur->version); in xmlDocContentDumpOutput()
1228 switch (cur->standalone) { in xmlDocContentDumpOutput()
1243 dtd = xmlGetIntSubset(cur); in xmlDocContentDumpOutput()
1250 if (cur->children != NULL) { in xmlDocContentDumpOutput()
1251 xmlNodePtr child = cur->children; in xmlDocContentDumpOutput()
1275 cur->encoding = oldenc; in xmlDocContentDumpOutput()
1360 xhtmlAttrListDumpOutput(xmlSaveCtxtPtr ctxt, xmlAttrPtr cur) { in xhtmlAttrListDumpOutput() argument
1368 if (cur == NULL) return; in xhtmlAttrListDumpOutput()
1370 parent = cur->parent; in xhtmlAttrListDumpOutput()
1371 while (cur != NULL) { in xhtmlAttrListDumpOutput()
1372 if ((cur->ns == NULL) && (xmlStrEqual(cur->name, BAD_CAST "id"))) in xhtmlAttrListDumpOutput()
1373 id = cur; in xhtmlAttrListDumpOutput()
1375 if ((cur->ns == NULL) && (xmlStrEqual(cur->name, BAD_CAST "name"))) in xhtmlAttrListDumpOutput()
1376 name = cur; in xhtmlAttrListDumpOutput()
1378 if ((cur->ns == NULL) && (xmlStrEqual(cur->name, BAD_CAST "lang"))) in xhtmlAttrListDumpOutput()
1379 lang = cur; in xhtmlAttrListDumpOutput()
1381 if ((cur->ns != NULL) && (xmlStrEqual(cur->name, BAD_CAST "lang")) && in xhtmlAttrListDumpOutput()
1382 (xmlStrEqual(cur->ns->prefix, BAD_CAST "xml"))) in xhtmlAttrListDumpOutput()
1383 xml_lang = cur; in xhtmlAttrListDumpOutput()
1384 else if ((cur->ns == NULL) && in xhtmlAttrListDumpOutput()
1385 ((cur->children == NULL) || in xhtmlAttrListDumpOutput()
1386 (cur->children->content == NULL) || in xhtmlAttrListDumpOutput()
1387 (cur->children->content[0] == 0)) && in xhtmlAttrListDumpOutput()
1388 (htmlIsBooleanAttr(cur->name))) { in xhtmlAttrListDumpOutput()
1389 if (cur->children != NULL) in xhtmlAttrListDumpOutput()
1390 xmlFreeNode(cur->children); in xhtmlAttrListDumpOutput()
1391 cur->children = xmlNewText(cur->name); in xhtmlAttrListDumpOutput()
1392 if (cur->children != NULL) in xhtmlAttrListDumpOutput()
1393 cur->children->parent = (xmlNodePtr) cur; in xhtmlAttrListDumpOutput()
1395 xmlAttrDumpOutput(ctxt, cur); in xhtmlAttrListDumpOutput()
1396 cur = cur->next; in xhtmlAttrListDumpOutput()
1446 xhtmlNodeListDumpOutput(xmlSaveCtxtPtr ctxt, xmlNodePtr cur) { in xhtmlNodeListDumpOutput() argument
1449 if (cur == NULL) return; in xhtmlNodeListDumpOutput()
1451 while (cur != NULL) { in xhtmlNodeListDumpOutput()
1453 (cur->type == XML_ELEMENT_NODE)) in xhtmlNodeListDumpOutput()
1458 xhtmlNodeDumpOutput(ctxt, cur); in xhtmlNodeListDumpOutput()
1462 cur = cur->next; in xhtmlNodeListDumpOutput()
1478 xhtmlNodeDumpOutput(xmlSaveCtxtPtr ctxt, xmlNodePtr cur) { in xhtmlNodeDumpOutput() argument
1484 if (cur == NULL) return; in xhtmlNodeDumpOutput()
1485 if ((cur->type == XML_DOCUMENT_NODE) || in xhtmlNodeDumpOutput()
1486 (cur->type == XML_HTML_DOCUMENT_NODE)) { in xhtmlNodeDumpOutput()
1487 xmlDocContentDumpOutput(ctxt, (xmlDocPtr) cur); in xhtmlNodeDumpOutput()
1490 if (cur->type == XML_XINCLUDE_START) in xhtmlNodeDumpOutput()
1492 if (cur->type == XML_XINCLUDE_END) in xhtmlNodeDumpOutput()
1494 if (cur->type == XML_NAMESPACE_DECL) { in xhtmlNodeDumpOutput()
1495 xmlNsDumpOutputCtxt(ctxt, (xmlNsPtr) cur); in xhtmlNodeDumpOutput()
1498 if (cur->type == XML_DTD_NODE) { in xhtmlNodeDumpOutput()
1499 xmlDtdDumpOutput(ctxt, (xmlDtdPtr) cur); in xhtmlNodeDumpOutput()
1502 if (cur->type == XML_DOCUMENT_FRAG_NODE) { in xhtmlNodeDumpOutput()
1503 xhtmlNodeListDumpOutput(ctxt, cur->children); in xhtmlNodeDumpOutput()
1507 if (cur->type == XML_ELEMENT_DECL) { in xhtmlNodeDumpOutput()
1508 xmlBufDumpElementDecl(buf->buffer, (xmlElementPtr) cur); in xhtmlNodeDumpOutput()
1511 if (cur->type == XML_ATTRIBUTE_DECL) { in xhtmlNodeDumpOutput()
1512 xmlBufDumpAttributeDecl(buf->buffer, (xmlAttributePtr) cur); in xhtmlNodeDumpOutput()
1515 if (cur->type == XML_ENTITY_DECL) { in xhtmlNodeDumpOutput()
1516 xmlBufDumpEntityDecl(buf->buffer, (xmlEntityPtr) cur); in xhtmlNodeDumpOutput()
1519 if (cur->type == XML_TEXT_NODE) { in xhtmlNodeDumpOutput()
1520 if (cur->content != NULL) { in xhtmlNodeDumpOutput()
1521 if ((cur->name == xmlStringText) || in xhtmlNodeDumpOutput()
1522 (cur->name != xmlStringTextNoenc)) { in xhtmlNodeDumpOutput()
1523 xmlOutputBufferWriteEscape(buf, cur->content, ctxt->escape); in xhtmlNodeDumpOutput()
1528 xmlOutputBufferWriteString(buf, (const char *) cur->content); in xhtmlNodeDumpOutput()
1534 if (cur->type == XML_PI_NODE) { in xhtmlNodeDumpOutput()
1535 if (cur->content != NULL) { in xhtmlNodeDumpOutput()
1537 xmlOutputBufferWriteString(buf, (const char *)cur->name); in xhtmlNodeDumpOutput()
1538 if (cur->content != NULL) { in xhtmlNodeDumpOutput()
1540 xmlOutputBufferWriteString(buf, (const char *)cur->content); in xhtmlNodeDumpOutput()
1545 xmlOutputBufferWriteString(buf, (const char *)cur->name); in xhtmlNodeDumpOutput()
1550 if (cur->type == XML_COMMENT_NODE) { in xhtmlNodeDumpOutput()
1551 if (cur->content != NULL) { in xhtmlNodeDumpOutput()
1553 xmlOutputBufferWriteString(buf, (const char *)cur->content); in xhtmlNodeDumpOutput()
1558 if (cur->type == XML_ENTITY_REF_NODE) { in xhtmlNodeDumpOutput()
1560 xmlOutputBufferWriteString(buf, (const char *)cur->name); in xhtmlNodeDumpOutput()
1564 if (cur->type == XML_CDATA_SECTION_NODE) { in xhtmlNodeDumpOutput()
1565 if (cur->content == NULL || *cur->content == '\0') { in xhtmlNodeDumpOutput()
1568 start = end = cur->content; in xhtmlNodeDumpOutput()
1587 if (cur->type == XML_ATTRIBUTE_NODE) { in xhtmlNodeDumpOutput()
1588 xmlAttrDumpOutput(ctxt, (xmlAttrPtr) cur); in xhtmlNodeDumpOutput()
1594 tmp = cur->children; in xhtmlNodeDumpOutput()
1605 if ((cur->ns != NULL) && (cur->ns->prefix != NULL)) { in xhtmlNodeDumpOutput()
1606 xmlOutputBufferWriteString(buf, (const char *)cur->ns->prefix); in xhtmlNodeDumpOutput()
1610 xmlOutputBufferWriteString(buf, (const char *)cur->name); in xhtmlNodeDumpOutput()
1611 if (cur->nsDef) in xhtmlNodeDumpOutput()
1612 xmlNsListDumpOutputCtxt(ctxt, cur->nsDef); in xhtmlNodeDumpOutput()
1613 if ((xmlStrEqual(cur->name, BAD_CAST "html") && in xhtmlNodeDumpOutput()
1614 (cur->ns == NULL) && (cur->nsDef == NULL))) { in xhtmlNodeDumpOutput()
1621 if (cur->properties != NULL) in xhtmlNodeDumpOutput()
1622 xhtmlAttrListDumpOutput(ctxt, cur->properties); in xhtmlNodeDumpOutput()
1624 if ((cur->type == XML_ELEMENT_NODE) && in xhtmlNodeDumpOutput()
1625 (cur->parent != NULL) && in xhtmlNodeDumpOutput()
1626 (cur->parent->parent == (xmlNodePtr) cur->doc) && in xhtmlNodeDumpOutput()
1627 xmlStrEqual(cur->name, BAD_CAST"head") && in xhtmlNodeDumpOutput()
1628 xmlStrEqual(cur->parent->name, BAD_CAST"html")) { in xhtmlNodeDumpOutput()
1630 tmp = cur->children; in xhtmlNodeDumpOutput()
1650 if ((cur->type == XML_ELEMENT_NODE) && (cur->children == NULL)) { in xhtmlNodeDumpOutput()
1651 if (((cur->ns == NULL) || (cur->ns->prefix == NULL)) && in xhtmlNodeDumpOutput()
1652 ((xhtmlIsEmpty(cur) == 1) && (addmeta == 0))) { in xhtmlNodeDumpOutput()
1684 if ((cur->ns != NULL) && (cur->ns->prefix != NULL)) { in xhtmlNodeDumpOutput()
1685 xmlOutputBufferWriteString(buf, (const char *)cur->ns->prefix); in xhtmlNodeDumpOutput()
1688 xmlOutputBufferWriteString(buf, (const char *)cur->name); in xhtmlNodeDumpOutput()
1711 if ((cur->type != XML_ELEMENT_NODE) && (cur->content != NULL)) { in xhtmlNodeDumpOutput()
1712 xmlOutputBufferWriteEscape(buf, cur->content, ctxt->escape); in xhtmlNodeDumpOutput()
1723 if ((cur->type == XML_ELEMENT_NODE) && in xhtmlNodeDumpOutput()
1724 ((xmlStrEqual(cur->name, BAD_CAST "script")) || in xhtmlNodeDumpOutput()
1725 (xmlStrEqual(cur->name, BAD_CAST "style"))) && in xhtmlNodeDumpOutput()
1726 ((cur->ns == NULL) || in xhtmlNodeDumpOutput()
1727 (xmlStrEqual(cur->ns->href, XHTML_NS_NAME)))) { in xhtmlNodeDumpOutput()
1728 xmlNodePtr child = cur->children; in xhtmlNodeDumpOutput()
1787 if (cur->children != NULL) { in xhtmlNodeDumpOutput()
1793 xhtmlNodeListDumpOutput(ctxt, cur->children); in xhtmlNodeDumpOutput()
1803 if ((cur->ns != NULL) && (cur->ns->prefix != NULL)) { in xhtmlNodeDumpOutput()
1804 xmlOutputBufferWriteString(buf, (const char *)cur->ns->prefix); in xhtmlNodeDumpOutput()
1808 xmlOutputBufferWriteString(buf, (const char *)cur->name); in xhtmlNodeDumpOutput()
2078 xmlChar *base, *cur; in xmlBufAttrSerializeTxtContent() local
2082 base = cur = (xmlChar *) string; in xmlBufAttrSerializeTxtContent()
2083 while (*cur != 0) { in xmlBufAttrSerializeTxtContent()
2084 if (*cur == '\n') { in xmlBufAttrSerializeTxtContent()
2085 if (base != cur) in xmlBufAttrSerializeTxtContent()
2086 xmlBufAdd(buf, base, cur - base); in xmlBufAttrSerializeTxtContent()
2088 cur++; in xmlBufAttrSerializeTxtContent()
2089 base = cur; in xmlBufAttrSerializeTxtContent()
2090 } else if (*cur == '\r') { in xmlBufAttrSerializeTxtContent()
2091 if (base != cur) in xmlBufAttrSerializeTxtContent()
2092 xmlBufAdd(buf, base, cur - base); in xmlBufAttrSerializeTxtContent()
2094 cur++; in xmlBufAttrSerializeTxtContent()
2095 base = cur; in xmlBufAttrSerializeTxtContent()
2096 } else if (*cur == '\t') { in xmlBufAttrSerializeTxtContent()
2097 if (base != cur) in xmlBufAttrSerializeTxtContent()
2098 xmlBufAdd(buf, base, cur - base); in xmlBufAttrSerializeTxtContent()
2100 cur++; in xmlBufAttrSerializeTxtContent()
2101 base = cur; in xmlBufAttrSerializeTxtContent()
2102 } else if (*cur == '"') { in xmlBufAttrSerializeTxtContent()
2103 if (base != cur) in xmlBufAttrSerializeTxtContent()
2104 xmlBufAdd(buf, base, cur - base); in xmlBufAttrSerializeTxtContent()
2106 cur++; in xmlBufAttrSerializeTxtContent()
2107 base = cur; in xmlBufAttrSerializeTxtContent()
2108 } else if (*cur == '<') { in xmlBufAttrSerializeTxtContent()
2109 if (base != cur) in xmlBufAttrSerializeTxtContent()
2110 xmlBufAdd(buf, base, cur - base); in xmlBufAttrSerializeTxtContent()
2112 cur++; in xmlBufAttrSerializeTxtContent()
2113 base = cur; in xmlBufAttrSerializeTxtContent()
2114 } else if (*cur == '>') { in xmlBufAttrSerializeTxtContent()
2115 if (base != cur) in xmlBufAttrSerializeTxtContent()
2116 xmlBufAdd(buf, base, cur - base); in xmlBufAttrSerializeTxtContent()
2118 cur++; in xmlBufAttrSerializeTxtContent()
2119 base = cur; in xmlBufAttrSerializeTxtContent()
2120 } else if (*cur == '&') { in xmlBufAttrSerializeTxtContent()
2121 if (base != cur) in xmlBufAttrSerializeTxtContent()
2122 xmlBufAdd(buf, base, cur - base); in xmlBufAttrSerializeTxtContent()
2124 cur++; in xmlBufAttrSerializeTxtContent()
2125 base = cur; in xmlBufAttrSerializeTxtContent()
2126 } else if ((*cur >= 0x80) && (cur[1] != 0) && in xmlBufAttrSerializeTxtContent()
2134 if (base != cur) in xmlBufAttrSerializeTxtContent()
2135 xmlBufAdd(buf, base, cur - base); in xmlBufAttrSerializeTxtContent()
2136 if (*cur < 0xC0) { in xmlBufAttrSerializeTxtContent()
2138 xmlSerializeHexCharRef(tmp, *cur); in xmlBufAttrSerializeTxtContent()
2140 cur++; in xmlBufAttrSerializeTxtContent()
2141 base = cur; in xmlBufAttrSerializeTxtContent()
2143 } else if (*cur < 0xE0) { in xmlBufAttrSerializeTxtContent()
2144 val = (cur[0]) & 0x1F; in xmlBufAttrSerializeTxtContent()
2146 val |= (cur[1]) & 0x3F; in xmlBufAttrSerializeTxtContent()
2148 } else if ((*cur < 0xF0) && (cur [2] != 0)) { in xmlBufAttrSerializeTxtContent()
2149 val = (cur[0]) & 0x0F; in xmlBufAttrSerializeTxtContent()
2151 val |= (cur[1]) & 0x3F; in xmlBufAttrSerializeTxtContent()
2153 val |= (cur[2]) & 0x3F; in xmlBufAttrSerializeTxtContent()
2155 } else if ((*cur < 0xF8) && (cur [2] != 0) && (cur[3] != 0)) { in xmlBufAttrSerializeTxtContent()
2156 val = (cur[0]) & 0x07; in xmlBufAttrSerializeTxtContent()
2158 val |= (cur[1]) & 0x3F; in xmlBufAttrSerializeTxtContent()
2160 val |= (cur[2]) & 0x3F; in xmlBufAttrSerializeTxtContent()
2162 val |= (cur[3]) & 0x3F; in xmlBufAttrSerializeTxtContent()
2167 xmlSerializeHexCharRef(tmp, *cur); in xmlBufAttrSerializeTxtContent()
2169 cur++; in xmlBufAttrSerializeTxtContent()
2170 base = cur; in xmlBufAttrSerializeTxtContent()
2179 cur += l; in xmlBufAttrSerializeTxtContent()
2180 base = cur; in xmlBufAttrSerializeTxtContent()
2182 cur++; in xmlBufAttrSerializeTxtContent()
2185 if (base != cur) in xmlBufAttrSerializeTxtContent()
2186 xmlBufAdd(buf, base, cur - base); in xmlBufAttrSerializeTxtContent()
2230 xmlNodeDump(xmlBufferPtr buf, xmlDocPtr doc, xmlNodePtr cur, int level, in xmlNodeDump() argument
2236 if ((buf == NULL) || (cur == NULL)) in xmlNodeDump()
2241 ret = xmlBufNodeDump(buffer, doc, cur, level, format); in xmlNodeDump()
2265 xmlBufNodeDump(xmlBufPtr buf, xmlDocPtr doc, xmlNodePtr cur, int level, in xmlBufNodeDump() argument
2275 if (cur == NULL) { in xmlBufNodeDump()
2305 xmlNodeDumpOutput(outbuf, doc, cur, level, format, NULL); in xmlBufNodeDump()
2321 xmlElemDump(FILE * f, xmlDocPtr doc, xmlNodePtr cur) in xmlElemDump() argument
2327 if (cur == NULL) { in xmlElemDump()
2346 htmlNodeDumpOutput(outbuf, doc, cur, NULL); in xmlElemDump()
2348 xmlSaveErr(XML_ERR_INTERNAL_ERROR, cur, "HTML support not compiled in\n"); in xmlElemDump()
2351 xmlNodeDumpOutput(outbuf, doc, cur, 0, 1, NULL); in xmlElemDump()
2375 xmlNodeDumpOutput(xmlOutputBufferPtr buf, xmlDocPtr doc, xmlNodePtr cur, in xmlNodeDumpOutput() argument
2386 if ((buf == NULL) || (cur == NULL)) return; in xmlNodeDumpOutput()
2409 xhtmlNodeDumpOutput(&ctxt, cur); in xmlNodeDumpOutput()
2412 xmlNodeDumpOutputInternal(&ctxt, cur); in xmlNodeDumpOutput()
2516 xmlDocDumpMemory(xmlDocPtr cur, xmlChar**mem, int *size) { in xmlDocDumpMemory() argument
2517 xmlDocDumpFormatMemoryEnc(cur, mem, size, NULL, 0); in xmlDocDumpMemory()
2534 xmlDocDumpFormatMemory(xmlDocPtr cur, xmlChar**mem, int *size, int format) { in xmlDocDumpFormatMemory() argument
2535 xmlDocDumpFormatMemoryEnc(cur, mem, size, NULL, format); in xmlDocDumpFormatMemory()
2570 xmlDocFormatDump(FILE *f, xmlDocPtr cur, int format) { in xmlDocFormatDump() argument
2577 if (cur == NULL) { in xmlDocFormatDump()
2584 encoding = (const char *) cur->encoding; in xmlDocFormatDump()
2589 xmlFree((char *) cur->encoding); in xmlDocFormatDump()
2590 cur->encoding = NULL; in xmlDocFormatDump()
2597 ctxt.doc = cur; in xmlDocFormatDump()
2604 xmlDocContentDumpOutput(&ctxt, cur); in xmlDocFormatDump()
2620 xmlDocDump(FILE *f, xmlDocPtr cur) { in xmlDocDump() argument
2621 return(xmlDocFormatDump (f, cur, 0)); in xmlDocDump()
2637 xmlSaveFileTo(xmlOutputBufferPtr buf, xmlDocPtr cur, const char *encoding) { in xmlSaveFileTo() argument
2642 if (cur == NULL) { in xmlSaveFileTo()
2647 ctxt.doc = cur; in xmlSaveFileTo()
2654 xmlDocContentDumpOutput(&ctxt, cur); in xmlSaveFileTo()
2673 xmlSaveFormatFileTo(xmlOutputBufferPtr buf, xmlDocPtr cur, in xmlSaveFormatFileTo() argument
2680 if ((cur == NULL) || in xmlSaveFormatFileTo()
2681 ((cur->type != XML_DOCUMENT_NODE) && in xmlSaveFormatFileTo()
2682 (cur->type != XML_HTML_DOCUMENT_NODE))) { in xmlSaveFormatFileTo()
2687 ctxt.doc = cur; in xmlSaveFormatFileTo()
2694 xmlDocContentDumpOutput(&ctxt, cur); in xmlSaveFormatFileTo()
2713 xmlSaveFormatFileEnc( const char * filename, xmlDocPtr cur, in xmlSaveFormatFileEnc() argument
2720 if (cur == NULL) in xmlSaveFormatFileEnc()
2724 encoding = (const char *) cur->encoding; in xmlSaveFormatFileEnc()
2734 if (cur->compression < 0) cur->compression = xmlGetCompressMode(); in xmlSaveFormatFileEnc()
2739 buf = xmlOutputBufferCreateFilename(filename, handler, cur->compression); in xmlSaveFormatFileEnc()
2742 ctxt.doc = cur; in xmlSaveFormatFileEnc()
2750 xmlDocContentDumpOutput(&ctxt, cur); in xmlSaveFormatFileEnc()
2768 xmlSaveFileEnc(const char *filename, xmlDocPtr cur, const char *encoding) { in xmlSaveFileEnc() argument
2769 return ( xmlSaveFormatFileEnc( filename, cur, encoding, 0 ) ); in xmlSaveFileEnc()
2787 xmlSaveFormatFile(const char *filename, xmlDocPtr cur, int format) { in xmlSaveFormatFile() argument
2788 return ( xmlSaveFormatFileEnc( filename, cur, NULL, format ) ); in xmlSaveFormatFile()
2802 xmlSaveFile(const char *filename, xmlDocPtr cur) { in xmlSaveFile() argument
2803 return(xmlSaveFormatFileEnc(filename, cur, NULL, 0)); in xmlSaveFile()