Lines Matching refs:cur
592 xhtmlNodeDumpOutput(xmlSaveCtxtPtr ctxt, xmlNodePtr cur);
594 static void xmlNodeListDumpOutput(xmlSaveCtxtPtr ctxt, xmlNodePtr cur);
595 static void xmlNodeDumpOutputInternal(xmlSaveCtxtPtr ctxt, xmlNodePtr cur);
596 void xmlNsListDumpOutput(xmlOutputBufferPtr buf, xmlNsPtr cur);
597 static int xmlDocContentDumpOutput(xmlSaveCtxtPtr ctxt, xmlDocPtr cur);
632 xmlNsDumpOutput(xmlOutputBufferPtr buf, xmlNsPtr cur, xmlSaveCtxtPtr ctxt) { in xmlNsDumpOutput() argument
633 if ((cur == NULL) || (buf == NULL)) return; in xmlNsDumpOutput()
634 if ((cur->type == XML_LOCAL_NAMESPACE) && (cur->href != NULL)) { in xmlNsDumpOutput()
635 if (xmlStrEqual(cur->prefix, BAD_CAST "xml")) in xmlNsDumpOutput()
644 if (cur->prefix != NULL) { in xmlNsDumpOutput()
646 xmlOutputBufferWriteString(buf, (const char *)cur->prefix); in xmlNsDumpOutput()
650 xmlBufWriteQuotedString(buf->buffer, cur->href); in xmlNsDumpOutput()
663 xmlNsDumpOutputCtxt(xmlSaveCtxtPtr ctxt, xmlNsPtr cur) { in xmlNsDumpOutputCtxt() argument
664 xmlNsDumpOutput(ctxt->buf, cur, ctxt); in xmlNsDumpOutputCtxt()
676 xmlNsListDumpOutputCtxt(xmlSaveCtxtPtr ctxt, xmlNsPtr cur) { in xmlNsListDumpOutputCtxt() argument
677 while (cur != NULL) { in xmlNsListDumpOutputCtxt()
678 xmlNsDumpOutput(ctxt->buf, cur, ctxt); in xmlNsListDumpOutputCtxt()
679 cur = cur->next; in xmlNsListDumpOutputCtxt()
692 xmlNsListDumpOutput(xmlOutputBufferPtr buf, xmlNsPtr cur) { in xmlNsListDumpOutput() argument
693 while (cur != NULL) { in xmlNsListDumpOutput()
694 xmlNsDumpOutput(buf, cur, NULL); in xmlNsListDumpOutput()
695 cur = cur->next; in xmlNsListDumpOutput()
764 xmlAttrDumpOutput(xmlSaveCtxtPtr ctxt, xmlAttrPtr cur) { in xmlAttrDumpOutput() argument
767 if (cur == NULL) return; in xmlAttrDumpOutput()
774 if ((cur->ns != NULL) && (cur->ns->prefix != NULL)) { in xmlAttrDumpOutput()
775 xmlOutputBufferWriteString(buf, (const char *)cur->ns->prefix); in xmlAttrDumpOutput()
778 xmlOutputBufferWriteString(buf, (const char *)cur->name); in xmlAttrDumpOutput()
780 xmlAttrSerializeContent(buf, cur); in xmlAttrDumpOutput()
794 xmlAttrListDumpOutput(xmlSaveCtxtPtr ctxt, xmlAttrPtr cur) { in xmlAttrListDumpOutput() argument
795 if (cur == NULL) return; in xmlAttrListDumpOutput()
796 while (cur != NULL) { in xmlAttrListDumpOutput()
797 xmlAttrDumpOutput(ctxt, cur); in xmlAttrListDumpOutput()
798 cur = cur->next; in xmlAttrListDumpOutput()
811 xmlNodeListDumpOutput(xmlSaveCtxtPtr ctxt, xmlNodePtr cur) { in xmlNodeListDumpOutput() argument
814 if (cur == NULL) return; in xmlNodeListDumpOutput()
816 while (cur != NULL) { in xmlNodeListDumpOutput()
818 ((cur->type == XML_ELEMENT_NODE) || in xmlNodeListDumpOutput()
819 (cur->type == XML_COMMENT_NODE) || in xmlNodeListDumpOutput()
820 (cur->type == XML_PI_NODE))) in xmlNodeListDumpOutput()
825 xmlNodeDumpOutputInternal(ctxt, cur); in xmlNodeListDumpOutput()
829 cur = cur->next; in xmlNodeListDumpOutput()
841 htmlNodeDumpOutputInternal(xmlSaveCtxtPtr ctxt, xmlNodePtr cur) { in htmlNodeDumpOutputInternal() argument
851 doc = cur->doc; in htmlNodeDumpOutputInternal()
876 htmlNodeDumpFormatOutput(buf, doc, cur, in htmlNodeDumpOutputInternal()
879 htmlNodeDumpFormatOutput(buf, doc, cur, in htmlNodeDumpOutputInternal()
900 xmlNodeDumpOutputInternal(xmlSaveCtxtPtr ctxt, xmlNodePtr cur) { in xmlNodeDumpOutputInternal() argument
906 if (cur == NULL) return; in xmlNodeDumpOutputInternal()
908 if (cur->type == XML_XINCLUDE_START) in xmlNodeDumpOutputInternal()
910 if (cur->type == XML_XINCLUDE_END) in xmlNodeDumpOutputInternal()
912 if ((cur->type == XML_DOCUMENT_NODE) || in xmlNodeDumpOutputInternal()
913 (cur->type == XML_HTML_DOCUMENT_NODE)) { in xmlNodeDumpOutputInternal()
914 xmlDocContentDumpOutput(ctxt, (xmlDocPtr) cur); in xmlNodeDumpOutputInternal()
919 xhtmlNodeDumpOutput(ctxt, cur); in xmlNodeDumpOutputInternal()
922 if (((cur->type != XML_NAMESPACE_DECL) && (cur->doc != NULL) && in xmlNodeDumpOutputInternal()
923 (cur->doc->type == XML_HTML_DOCUMENT_NODE) && in xmlNodeDumpOutputInternal()
926 htmlNodeDumpOutputInternal(ctxt, cur); in xmlNodeDumpOutputInternal()
930 if (cur->type == XML_DTD_NODE) { in xmlNodeDumpOutputInternal()
931 xmlDtdDumpOutput(ctxt, (xmlDtdPtr) cur); in xmlNodeDumpOutputInternal()
934 if (cur->type == XML_DOCUMENT_FRAG_NODE) { in xmlNodeDumpOutputInternal()
935 xmlNodeListDumpOutput(ctxt, cur->children); in xmlNodeDumpOutputInternal()
938 if (cur->type == XML_ELEMENT_DECL) { in xmlNodeDumpOutputInternal()
939 xmlBufDumpElementDecl(buf->buffer, (xmlElementPtr) cur); in xmlNodeDumpOutputInternal()
942 if (cur->type == XML_ATTRIBUTE_DECL) { in xmlNodeDumpOutputInternal()
943 xmlBufDumpAttributeDecl(buf->buffer, (xmlAttributePtr) cur); in xmlNodeDumpOutputInternal()
946 if (cur->type == XML_ENTITY_DECL) { in xmlNodeDumpOutputInternal()
947 xmlBufDumpEntityDecl(buf->buffer, (xmlEntityPtr) cur); in xmlNodeDumpOutputInternal()
950 if (cur->type == XML_TEXT_NODE) { in xmlNodeDumpOutputInternal()
951 if (cur->content != NULL) { in xmlNodeDumpOutputInternal()
952 if (cur->name != xmlStringTextNoenc) { in xmlNodeDumpOutputInternal()
953 xmlOutputBufferWriteEscape(buf, cur->content, ctxt->escape); in xmlNodeDumpOutputInternal()
958 xmlOutputBufferWriteString(buf, (const char *) cur->content); in xmlNodeDumpOutputInternal()
964 if (cur->type == XML_PI_NODE) { in xmlNodeDumpOutputInternal()
965 if (cur->content != NULL) { in xmlNodeDumpOutputInternal()
967 xmlOutputBufferWriteString(buf, (const char *)cur->name); in xmlNodeDumpOutputInternal()
968 if (cur->content != NULL) { in xmlNodeDumpOutputInternal()
973 xmlOutputBufferWriteString(buf, (const char *)cur->content); in xmlNodeDumpOutputInternal()
978 xmlOutputBufferWriteString(buf, (const char *)cur->name); in xmlNodeDumpOutputInternal()
985 if (cur->type == XML_COMMENT_NODE) { in xmlNodeDumpOutputInternal()
986 if (cur->content != NULL) { in xmlNodeDumpOutputInternal()
988 xmlOutputBufferWriteString(buf, (const char *)cur->content); in xmlNodeDumpOutputInternal()
993 if (cur->type == XML_ENTITY_REF_NODE) { in xmlNodeDumpOutputInternal()
995 xmlOutputBufferWriteString(buf, (const char *)cur->name); in xmlNodeDumpOutputInternal()
999 if (cur->type == XML_CDATA_SECTION_NODE) { in xmlNodeDumpOutputInternal()
1000 if (cur->content == NULL || *cur->content == '\0') { in xmlNodeDumpOutputInternal()
1003 start = end = cur->content; in xmlNodeDumpOutputInternal()
1023 if (cur->type == XML_ATTRIBUTE_NODE) { in xmlNodeDumpOutputInternal()
1024 xmlAttrDumpOutput(ctxt, (xmlAttrPtr) cur); in xmlNodeDumpOutputInternal()
1027 if (cur->type == XML_NAMESPACE_DECL) { in xmlNodeDumpOutputInternal()
1028 xmlNsDumpOutputCtxt(ctxt, (xmlNsPtr) cur); in xmlNodeDumpOutputInternal()
1034 tmp = cur->children; in xmlNodeDumpOutputInternal()
1046 if ((cur->ns != NULL) && (cur->ns->prefix != NULL)) { in xmlNodeDumpOutputInternal()
1047 xmlOutputBufferWriteString(buf, (const char *)cur->ns->prefix); in xmlNodeDumpOutputInternal()
1051 xmlOutputBufferWriteString(buf, (const char *)cur->name); in xmlNodeDumpOutputInternal()
1052 if (cur->nsDef) in xmlNodeDumpOutputInternal()
1053 xmlNsListDumpOutputCtxt(ctxt, cur->nsDef); in xmlNodeDumpOutputInternal()
1054 if (cur->properties != NULL) in xmlNodeDumpOutputInternal()
1055 xmlAttrListDumpOutput(ctxt, cur->properties); in xmlNodeDumpOutputInternal()
1057 if (((cur->type == XML_ELEMENT_NODE) || (cur->content == NULL)) && in xmlNodeDumpOutputInternal()
1058 (cur->children == NULL) && ((ctxt->options & XML_SAVE_NO_EMPTY) == 0)) { in xmlNodeDumpOutputInternal()
1068 if ((cur->type != XML_ELEMENT_NODE) && (cur->content != NULL)) { in xmlNodeDumpOutputInternal()
1069 xmlOutputBufferWriteEscape(buf, cur->content, ctxt->escape); in xmlNodeDumpOutputInternal()
1071 if (cur->children != NULL) { in xmlNodeDumpOutputInternal()
1074 xmlNodeListDumpOutput(ctxt, cur->children); in xmlNodeDumpOutputInternal()
1083 if ((cur->ns != NULL) && (cur->ns->prefix != NULL)) { in xmlNodeDumpOutputInternal()
1084 xmlOutputBufferWriteString(buf, (const char *)cur->ns->prefix); in xmlNodeDumpOutputInternal()
1088 xmlOutputBufferWriteString(buf, (const char *)cur->name); in xmlNodeDumpOutputInternal()
1102 xmlDocContentDumpOutput(xmlSaveCtxtPtr ctxt, xmlDocPtr cur) { in xmlDocContentDumpOutput() argument
1107 const xmlChar *oldenc = cur->encoding; in xmlDocContentDumpOutput()
1118 if ((cur->type != XML_HTML_DOCUMENT_NODE) && in xmlDocContentDumpOutput()
1119 (cur->type != XML_DOCUMENT_NODE)) in xmlDocContentDumpOutput()
1123 cur->encoding = BAD_CAST ctxt->encoding; in xmlDocContentDumpOutput()
1124 } else if (cur->encoding != NULL) { in xmlDocContentDumpOutput()
1125 encoding = cur->encoding; in xmlDocContentDumpOutput()
1126 } else if (cur->charset != XML_CHAR_ENCODING_UTF8) { in xmlDocContentDumpOutput()
1128 xmlGetCharEncodingName((xmlCharEncoding) cur->charset); in xmlDocContentDumpOutput()
1131 if (((cur->type == XML_HTML_DOCUMENT_NODE) && in xmlDocContentDumpOutput()
1137 htmlSetMetaEncoding(cur, (const xmlChar *) encoding); in xmlDocContentDumpOutput()
1139 encoding = htmlGetMetaEncoding(cur); in xmlDocContentDumpOutput()
1145 cur->encoding = oldenc; in xmlDocContentDumpOutput()
1150 htmlDocContentDumpFormatOutput(buf, cur, in xmlDocContentDumpOutput()
1153 htmlDocContentDumpFormatOutput(buf, cur, in xmlDocContentDumpOutput()
1156 cur->encoding = oldenc; in xmlDocContentDumpOutput()
1161 } else if ((cur->type == XML_DOCUMENT_NODE) || in xmlDocContentDumpOutput()
1177 cur->encoding = oldenc; in xmlDocContentDumpOutput()
1194 if (cur->version != NULL) in xmlDocContentDumpOutput()
1195 xmlBufWriteQuotedString(buf->buffer, cur->version); in xmlDocContentDumpOutput()
1202 switch (cur->standalone) { in xmlDocContentDumpOutput()
1217 dtd = xmlGetIntSubset(cur); in xmlDocContentDumpOutput()
1224 if (cur->children != NULL) { in xmlDocContentDumpOutput()
1225 xmlNodePtr child = cur->children; in xmlDocContentDumpOutput()
1249 cur->encoding = oldenc; in xmlDocContentDumpOutput()
1334 xhtmlAttrListDumpOutput(xmlSaveCtxtPtr ctxt, xmlAttrPtr cur) { in xhtmlAttrListDumpOutput() argument
1342 if (cur == NULL) return; in xhtmlAttrListDumpOutput()
1344 parent = cur->parent; in xhtmlAttrListDumpOutput()
1345 while (cur != NULL) { in xhtmlAttrListDumpOutput()
1346 if ((cur->ns == NULL) && (xmlStrEqual(cur->name, BAD_CAST "id"))) in xhtmlAttrListDumpOutput()
1347 id = cur; in xhtmlAttrListDumpOutput()
1349 if ((cur->ns == NULL) && (xmlStrEqual(cur->name, BAD_CAST "name"))) in xhtmlAttrListDumpOutput()
1350 name = cur; in xhtmlAttrListDumpOutput()
1352 if ((cur->ns == NULL) && (xmlStrEqual(cur->name, BAD_CAST "lang"))) in xhtmlAttrListDumpOutput()
1353 lang = cur; in xhtmlAttrListDumpOutput()
1355 if ((cur->ns != NULL) && (xmlStrEqual(cur->name, BAD_CAST "lang")) && in xhtmlAttrListDumpOutput()
1356 (xmlStrEqual(cur->ns->prefix, BAD_CAST "xml"))) in xhtmlAttrListDumpOutput()
1357 xml_lang = cur; in xhtmlAttrListDumpOutput()
1358 else if ((cur->ns == NULL) && in xhtmlAttrListDumpOutput()
1359 ((cur->children == NULL) || in xhtmlAttrListDumpOutput()
1360 (cur->children->content == NULL) || in xhtmlAttrListDumpOutput()
1361 (cur->children->content[0] == 0)) && in xhtmlAttrListDumpOutput()
1362 (htmlIsBooleanAttr(cur->name))) { in xhtmlAttrListDumpOutput()
1363 if (cur->children != NULL) in xhtmlAttrListDumpOutput()
1364 xmlFreeNode(cur->children); in xhtmlAttrListDumpOutput()
1365 cur->children = xmlNewText(cur->name); in xhtmlAttrListDumpOutput()
1366 if (cur->children != NULL) in xhtmlAttrListDumpOutput()
1367 cur->children->parent = (xmlNodePtr) cur; in xhtmlAttrListDumpOutput()
1369 xmlAttrDumpOutput(ctxt, cur); in xhtmlAttrListDumpOutput()
1370 cur = cur->next; in xhtmlAttrListDumpOutput()
1420 xhtmlNodeListDumpOutput(xmlSaveCtxtPtr ctxt, xmlNodePtr cur) { in xhtmlNodeListDumpOutput() argument
1423 if (cur == NULL) return; in xhtmlNodeListDumpOutput()
1425 while (cur != NULL) { in xhtmlNodeListDumpOutput()
1427 (cur->type == XML_ELEMENT_NODE)) in xhtmlNodeListDumpOutput()
1432 xhtmlNodeDumpOutput(ctxt, cur); in xhtmlNodeListDumpOutput()
1436 cur = cur->next; in xhtmlNodeListDumpOutput()
1452 xhtmlNodeDumpOutput(xmlSaveCtxtPtr ctxt, xmlNodePtr cur) { in xhtmlNodeDumpOutput() argument
1458 if (cur == NULL) return; in xhtmlNodeDumpOutput()
1459 if ((cur->type == XML_DOCUMENT_NODE) || in xhtmlNodeDumpOutput()
1460 (cur->type == XML_HTML_DOCUMENT_NODE)) { in xhtmlNodeDumpOutput()
1461 xmlDocContentDumpOutput(ctxt, (xmlDocPtr) cur); in xhtmlNodeDumpOutput()
1464 if (cur->type == XML_XINCLUDE_START) in xhtmlNodeDumpOutput()
1466 if (cur->type == XML_XINCLUDE_END) in xhtmlNodeDumpOutput()
1468 if (cur->type == XML_NAMESPACE_DECL) { in xhtmlNodeDumpOutput()
1469 xmlNsDumpOutputCtxt(ctxt, (xmlNsPtr) cur); in xhtmlNodeDumpOutput()
1472 if (cur->type == XML_DTD_NODE) { in xhtmlNodeDumpOutput()
1473 xmlDtdDumpOutput(ctxt, (xmlDtdPtr) cur); in xhtmlNodeDumpOutput()
1476 if (cur->type == XML_DOCUMENT_FRAG_NODE) { in xhtmlNodeDumpOutput()
1477 xhtmlNodeListDumpOutput(ctxt, cur->children); in xhtmlNodeDumpOutput()
1481 if (cur->type == XML_ELEMENT_DECL) { in xhtmlNodeDumpOutput()
1482 xmlBufDumpElementDecl(buf->buffer, (xmlElementPtr) cur); in xhtmlNodeDumpOutput()
1485 if (cur->type == XML_ATTRIBUTE_DECL) { in xhtmlNodeDumpOutput()
1486 xmlBufDumpAttributeDecl(buf->buffer, (xmlAttributePtr) cur); in xhtmlNodeDumpOutput()
1489 if (cur->type == XML_ENTITY_DECL) { in xhtmlNodeDumpOutput()
1490 xmlBufDumpEntityDecl(buf->buffer, (xmlEntityPtr) cur); in xhtmlNodeDumpOutput()
1493 if (cur->type == XML_TEXT_NODE) { in xhtmlNodeDumpOutput()
1494 if (cur->content != NULL) { in xhtmlNodeDumpOutput()
1495 if ((cur->name == xmlStringText) || in xhtmlNodeDumpOutput()
1496 (cur->name != xmlStringTextNoenc)) { in xhtmlNodeDumpOutput()
1497 xmlOutputBufferWriteEscape(buf, cur->content, ctxt->escape); in xhtmlNodeDumpOutput()
1502 xmlOutputBufferWriteString(buf, (const char *) cur->content); in xhtmlNodeDumpOutput()
1508 if (cur->type == XML_PI_NODE) { in xhtmlNodeDumpOutput()
1509 if (cur->content != NULL) { in xhtmlNodeDumpOutput()
1511 xmlOutputBufferWriteString(buf, (const char *)cur->name); in xhtmlNodeDumpOutput()
1512 if (cur->content != NULL) { in xhtmlNodeDumpOutput()
1514 xmlOutputBufferWriteString(buf, (const char *)cur->content); in xhtmlNodeDumpOutput()
1519 xmlOutputBufferWriteString(buf, (const char *)cur->name); in xhtmlNodeDumpOutput()
1524 if (cur->type == XML_COMMENT_NODE) { in xhtmlNodeDumpOutput()
1525 if (cur->content != NULL) { in xhtmlNodeDumpOutput()
1527 xmlOutputBufferWriteString(buf, (const char *)cur->content); in xhtmlNodeDumpOutput()
1532 if (cur->type == XML_ENTITY_REF_NODE) { in xhtmlNodeDumpOutput()
1534 xmlOutputBufferWriteString(buf, (const char *)cur->name); in xhtmlNodeDumpOutput()
1538 if (cur->type == XML_CDATA_SECTION_NODE) { in xhtmlNodeDumpOutput()
1539 if (cur->content == NULL || *cur->content == '\0') { in xhtmlNodeDumpOutput()
1542 start = end = cur->content; in xhtmlNodeDumpOutput()
1561 if (cur->type == XML_ATTRIBUTE_NODE) { in xhtmlNodeDumpOutput()
1562 xmlAttrDumpOutput(ctxt, (xmlAttrPtr) cur); in xhtmlNodeDumpOutput()
1568 tmp = cur->children; in xhtmlNodeDumpOutput()
1579 if ((cur->ns != NULL) && (cur->ns->prefix != NULL)) { in xhtmlNodeDumpOutput()
1580 xmlOutputBufferWriteString(buf, (const char *)cur->ns->prefix); in xhtmlNodeDumpOutput()
1584 xmlOutputBufferWriteString(buf, (const char *)cur->name); in xhtmlNodeDumpOutput()
1585 if (cur->nsDef) in xhtmlNodeDumpOutput()
1586 xmlNsListDumpOutputCtxt(ctxt, cur->nsDef); in xhtmlNodeDumpOutput()
1587 if ((xmlStrEqual(cur->name, BAD_CAST "html") && in xhtmlNodeDumpOutput()
1588 (cur->ns == NULL) && (cur->nsDef == NULL))) { in xhtmlNodeDumpOutput()
1595 if (cur->properties != NULL) in xhtmlNodeDumpOutput()
1596 xhtmlAttrListDumpOutput(ctxt, cur->properties); in xhtmlNodeDumpOutput()
1598 if ((cur->type == XML_ELEMENT_NODE) && in xhtmlNodeDumpOutput()
1599 (cur->parent != NULL) && in xhtmlNodeDumpOutput()
1600 (cur->parent->parent == (xmlNodePtr) cur->doc) && in xhtmlNodeDumpOutput()
1601 xmlStrEqual(cur->name, BAD_CAST"head") && in xhtmlNodeDumpOutput()
1602 xmlStrEqual(cur->parent->name, BAD_CAST"html")) { in xhtmlNodeDumpOutput()
1604 tmp = cur->children; in xhtmlNodeDumpOutput()
1624 if ((cur->type == XML_ELEMENT_NODE) && (cur->children == NULL)) { in xhtmlNodeDumpOutput()
1625 if (((cur->ns == NULL) || (cur->ns->prefix == NULL)) && in xhtmlNodeDumpOutput()
1626 ((xhtmlIsEmpty(cur) == 1) && (addmeta == 0))) { in xhtmlNodeDumpOutput()
1658 if ((cur->ns != NULL) && (cur->ns->prefix != NULL)) { in xhtmlNodeDumpOutput()
1659 xmlOutputBufferWriteString(buf, (const char *)cur->ns->prefix); in xhtmlNodeDumpOutput()
1662 xmlOutputBufferWriteString(buf, (const char *)cur->name); in xhtmlNodeDumpOutput()
1685 if ((cur->type != XML_ELEMENT_NODE) && (cur->content != NULL)) { in xhtmlNodeDumpOutput()
1686 xmlOutputBufferWriteEscape(buf, cur->content, ctxt->escape); in xhtmlNodeDumpOutput()
1697 if ((cur->type == XML_ELEMENT_NODE) && in xhtmlNodeDumpOutput()
1698 ((xmlStrEqual(cur->name, BAD_CAST "script")) || in xhtmlNodeDumpOutput()
1699 (xmlStrEqual(cur->name, BAD_CAST "style"))) && in xhtmlNodeDumpOutput()
1700 ((cur->ns == NULL) || in xhtmlNodeDumpOutput()
1701 (xmlStrEqual(cur->ns->href, XHTML_NS_NAME)))) { in xhtmlNodeDumpOutput()
1702 xmlNodePtr child = cur->children; in xhtmlNodeDumpOutput()
1761 if (cur->children != NULL) { in xhtmlNodeDumpOutput()
1767 xhtmlNodeListDumpOutput(ctxt, cur->children); in xhtmlNodeDumpOutput()
1777 if ((cur->ns != NULL) && (cur->ns->prefix != NULL)) { in xhtmlNodeDumpOutput()
1778 xmlOutputBufferWriteString(buf, (const char *)cur->ns->prefix); in xhtmlNodeDumpOutput()
1782 xmlOutputBufferWriteString(buf, (const char *)cur->name); in xhtmlNodeDumpOutput()
2052 xmlChar *base, *cur; in xmlBufAttrSerializeTxtContent() local
2056 base = cur = (xmlChar *) string; in xmlBufAttrSerializeTxtContent()
2057 while (*cur != 0) { in xmlBufAttrSerializeTxtContent()
2058 if (*cur == '\n') { in xmlBufAttrSerializeTxtContent()
2059 if (base != cur) in xmlBufAttrSerializeTxtContent()
2060 xmlBufAdd(buf, base, cur - base); in xmlBufAttrSerializeTxtContent()
2062 cur++; in xmlBufAttrSerializeTxtContent()
2063 base = cur; in xmlBufAttrSerializeTxtContent()
2064 } else if (*cur == '\r') { in xmlBufAttrSerializeTxtContent()
2065 if (base != cur) in xmlBufAttrSerializeTxtContent()
2066 xmlBufAdd(buf, base, cur - base); in xmlBufAttrSerializeTxtContent()
2068 cur++; in xmlBufAttrSerializeTxtContent()
2069 base = cur; in xmlBufAttrSerializeTxtContent()
2070 } else if (*cur == '\t') { in xmlBufAttrSerializeTxtContent()
2071 if (base != cur) in xmlBufAttrSerializeTxtContent()
2072 xmlBufAdd(buf, base, cur - base); in xmlBufAttrSerializeTxtContent()
2074 cur++; in xmlBufAttrSerializeTxtContent()
2075 base = cur; in xmlBufAttrSerializeTxtContent()
2076 } else if (*cur == '"') { in xmlBufAttrSerializeTxtContent()
2077 if (base != cur) in xmlBufAttrSerializeTxtContent()
2078 xmlBufAdd(buf, base, cur - base); in xmlBufAttrSerializeTxtContent()
2080 cur++; in xmlBufAttrSerializeTxtContent()
2081 base = cur; in xmlBufAttrSerializeTxtContent()
2082 } else if (*cur == '<') { in xmlBufAttrSerializeTxtContent()
2083 if (base != cur) in xmlBufAttrSerializeTxtContent()
2084 xmlBufAdd(buf, base, cur - base); in xmlBufAttrSerializeTxtContent()
2086 cur++; in xmlBufAttrSerializeTxtContent()
2087 base = cur; in xmlBufAttrSerializeTxtContent()
2088 } else if (*cur == '>') { in xmlBufAttrSerializeTxtContent()
2089 if (base != cur) in xmlBufAttrSerializeTxtContent()
2090 xmlBufAdd(buf, base, cur - base); in xmlBufAttrSerializeTxtContent()
2092 cur++; in xmlBufAttrSerializeTxtContent()
2093 base = cur; in xmlBufAttrSerializeTxtContent()
2094 } else if (*cur == '&') { in xmlBufAttrSerializeTxtContent()
2095 if (base != cur) in xmlBufAttrSerializeTxtContent()
2096 xmlBufAdd(buf, base, cur - base); in xmlBufAttrSerializeTxtContent()
2098 cur++; in xmlBufAttrSerializeTxtContent()
2099 base = cur; in xmlBufAttrSerializeTxtContent()
2100 } else if ((*cur >= 0x80) && ((doc == NULL) || in xmlBufAttrSerializeTxtContent()
2108 if (base != cur) in xmlBufAttrSerializeTxtContent()
2109 xmlBufAdd(buf, base, cur - base); in xmlBufAttrSerializeTxtContent()
2110 if (*cur < 0xC0) { in xmlBufAttrSerializeTxtContent()
2114 xmlSerializeHexCharRef(tmp, *cur); in xmlBufAttrSerializeTxtContent()
2116 cur++; in xmlBufAttrSerializeTxtContent()
2117 base = cur; in xmlBufAttrSerializeTxtContent()
2119 } else if (*cur < 0xE0) { in xmlBufAttrSerializeTxtContent()
2120 val = (cur[0]) & 0x1F; in xmlBufAttrSerializeTxtContent()
2122 val |= (cur[1]) & 0x3F; in xmlBufAttrSerializeTxtContent()
2124 } else if (*cur < 0xF0) { in xmlBufAttrSerializeTxtContent()
2125 val = (cur[0]) & 0x0F; in xmlBufAttrSerializeTxtContent()
2127 val |= (cur[1]) & 0x3F; in xmlBufAttrSerializeTxtContent()
2129 val |= (cur[2]) & 0x3F; in xmlBufAttrSerializeTxtContent()
2131 } else if (*cur < 0xF8) { in xmlBufAttrSerializeTxtContent()
2132 val = (cur[0]) & 0x07; in xmlBufAttrSerializeTxtContent()
2134 val |= (cur[1]) & 0x3F; in xmlBufAttrSerializeTxtContent()
2136 val |= (cur[2]) & 0x3F; in xmlBufAttrSerializeTxtContent()
2138 val |= (cur[3]) & 0x3F; in xmlBufAttrSerializeTxtContent()
2146 xmlSerializeHexCharRef(tmp, *cur); in xmlBufAttrSerializeTxtContent()
2148 cur++; in xmlBufAttrSerializeTxtContent()
2149 base = cur; in xmlBufAttrSerializeTxtContent()
2158 cur += l; in xmlBufAttrSerializeTxtContent()
2159 base = cur; in xmlBufAttrSerializeTxtContent()
2161 cur++; in xmlBufAttrSerializeTxtContent()
2164 if (base != cur) in xmlBufAttrSerializeTxtContent()
2165 xmlBufAdd(buf, base, cur - base); in xmlBufAttrSerializeTxtContent()
2209 xmlNodeDump(xmlBufferPtr buf, xmlDocPtr doc, xmlNodePtr cur, int level, in xmlNodeDump() argument
2215 if ((buf == NULL) || (cur == NULL)) in xmlNodeDump()
2220 ret = xmlBufNodeDump(buffer, doc, cur, level, format); in xmlNodeDump()
2244 xmlBufNodeDump(xmlBufPtr buf, xmlDocPtr doc, xmlNodePtr cur, int level, in xmlBufNodeDump() argument
2254 if (cur == NULL) { in xmlBufNodeDump()
2284 xmlNodeDumpOutput(outbuf, doc, cur, level, format, NULL); in xmlBufNodeDump()
2300 xmlElemDump(FILE * f, xmlDocPtr doc, xmlNodePtr cur) in xmlElemDump() argument
2306 if (cur == NULL) { in xmlElemDump()
2325 htmlNodeDumpOutput(outbuf, doc, cur, NULL); in xmlElemDump()
2327 xmlSaveErr(XML_ERR_INTERNAL_ERROR, cur, "HTML support not compiled in\n"); in xmlElemDump()
2330 xmlNodeDumpOutput(outbuf, doc, cur, 0, 1, NULL); in xmlElemDump()
2354 xmlNodeDumpOutput(xmlOutputBufferPtr buf, xmlDocPtr doc, xmlNodePtr cur, in xmlNodeDumpOutput() argument
2365 if ((buf == NULL) || (cur == NULL)) return; in xmlNodeDumpOutput()
2388 xhtmlNodeDumpOutput(&ctxt, cur); in xmlNodeDumpOutput()
2391 xmlNodeDumpOutputInternal(&ctxt, cur); in xmlNodeDumpOutput()
2495 xmlDocDumpMemory(xmlDocPtr cur, xmlChar**mem, int *size) { in xmlDocDumpMemory() argument
2496 xmlDocDumpFormatMemoryEnc(cur, mem, size, NULL, 0); in xmlDocDumpMemory()
2513 xmlDocDumpFormatMemory(xmlDocPtr cur, xmlChar**mem, int *size, int format) { in xmlDocDumpFormatMemory() argument
2514 xmlDocDumpFormatMemoryEnc(cur, mem, size, NULL, format); in xmlDocDumpFormatMemory()
2549 xmlDocFormatDump(FILE *f, xmlDocPtr cur, int format) { in xmlDocFormatDump() argument
2556 if (cur == NULL) { in xmlDocFormatDump()
2563 encoding = (const char *) cur->encoding; in xmlDocFormatDump()
2568 xmlFree((char *) cur->encoding); in xmlDocFormatDump()
2569 cur->encoding = NULL; in xmlDocFormatDump()
2576 ctxt.doc = cur; in xmlDocFormatDump()
2583 xmlDocContentDumpOutput(&ctxt, cur); in xmlDocFormatDump()
2599 xmlDocDump(FILE *f, xmlDocPtr cur) { in xmlDocDump() argument
2600 return(xmlDocFormatDump (f, cur, 0)); in xmlDocDump()
2616 xmlSaveFileTo(xmlOutputBufferPtr buf, xmlDocPtr cur, const char *encoding) { in xmlSaveFileTo() argument
2621 if (cur == NULL) { in xmlSaveFileTo()
2626 ctxt.doc = cur; in xmlSaveFileTo()
2633 xmlDocContentDumpOutput(&ctxt, cur); in xmlSaveFileTo()
2652 xmlSaveFormatFileTo(xmlOutputBufferPtr buf, xmlDocPtr cur, in xmlSaveFormatFileTo() argument
2659 if ((cur == NULL) || in xmlSaveFormatFileTo()
2660 ((cur->type != XML_DOCUMENT_NODE) && in xmlSaveFormatFileTo()
2661 (cur->type != XML_HTML_DOCUMENT_NODE))) { in xmlSaveFormatFileTo()
2666 ctxt.doc = cur; in xmlSaveFormatFileTo()
2673 xmlDocContentDumpOutput(&ctxt, cur); in xmlSaveFormatFileTo()
2692 xmlSaveFormatFileEnc( const char * filename, xmlDocPtr cur, in xmlSaveFormatFileEnc() argument
2699 if (cur == NULL) in xmlSaveFormatFileEnc()
2703 encoding = (const char *) cur->encoding; in xmlSaveFormatFileEnc()
2713 if (cur->compression < 0) cur->compression = xmlGetCompressMode(); in xmlSaveFormatFileEnc()
2718 buf = xmlOutputBufferCreateFilename(filename, handler, cur->compression); in xmlSaveFormatFileEnc()
2721 ctxt.doc = cur; in xmlSaveFormatFileEnc()
2729 xmlDocContentDumpOutput(&ctxt, cur); in xmlSaveFormatFileEnc()
2747 xmlSaveFileEnc(const char *filename, xmlDocPtr cur, const char *encoding) { in xmlSaveFileEnc() argument
2748 return ( xmlSaveFormatFileEnc( filename, cur, encoding, 0 ) ); in xmlSaveFileEnc()
2766 xmlSaveFormatFile(const char *filename, xmlDocPtr cur, int format) { in xmlSaveFormatFile() argument
2767 return ( xmlSaveFormatFileEnc( filename, cur, NULL, format ) ); in xmlSaveFormatFile()
2781 xmlSaveFile(const char *filename, xmlDocPtr cur) { in xmlSaveFile() argument
2782 return(xmlSaveFormatFileEnc(filename, cur, NULL, 0)); in xmlSaveFile()