• Home
  • Raw
  • Download

Lines Matching refs:cur

51     htmlNodePtr cur;  in htmlGetMetaEncoding()  local
57 cur = doc->children; in htmlGetMetaEncoding()
62 while (cur != NULL) { in htmlGetMetaEncoding()
63 if ((cur->type == XML_ELEMENT_NODE) && (cur->name != NULL)) { in htmlGetMetaEncoding()
64 if (xmlStrEqual(cur->name, BAD_CAST"html")) in htmlGetMetaEncoding()
66 if (xmlStrEqual(cur->name, BAD_CAST"head")) in htmlGetMetaEncoding()
68 if (xmlStrEqual(cur->name, BAD_CAST"meta")) in htmlGetMetaEncoding()
71 cur = cur->next; in htmlGetMetaEncoding()
73 if (cur == NULL) in htmlGetMetaEncoding()
75 cur = cur->children; in htmlGetMetaEncoding()
80 while (cur != NULL) { in htmlGetMetaEncoding()
81 if ((cur->type == XML_ELEMENT_NODE) && (cur->name != NULL)) { in htmlGetMetaEncoding()
82 if (xmlStrEqual(cur->name, BAD_CAST"head")) in htmlGetMetaEncoding()
84 if (xmlStrEqual(cur->name, BAD_CAST"meta")) in htmlGetMetaEncoding()
87 cur = cur->next; in htmlGetMetaEncoding()
89 if (cur == NULL) in htmlGetMetaEncoding()
92 cur = cur->children; in htmlGetMetaEncoding()
98 while (cur != NULL) { in htmlGetMetaEncoding()
99 if ((cur->type == XML_ELEMENT_NODE) && (cur->name != NULL)) { in htmlGetMetaEncoding()
100 if (xmlStrEqual(cur->name, BAD_CAST"meta")) { in htmlGetMetaEncoding()
101 xmlAttrPtr attr = cur->properties; in htmlGetMetaEncoding()
125 cur = cur->next; in htmlGetMetaEncoding()
165 htmlNodePtr cur, meta = NULL, head = NULL; in htmlSetMetaEncoding() local
184 cur = doc->children; in htmlSetMetaEncoding()
189 while (cur != NULL) { in htmlSetMetaEncoding()
190 if ((cur->type == XML_ELEMENT_NODE) && (cur->name != NULL)) { in htmlSetMetaEncoding()
191 if (xmlStrcasecmp(cur->name, BAD_CAST"html") == 0) in htmlSetMetaEncoding()
193 if (xmlStrcasecmp(cur->name, BAD_CAST"head") == 0) in htmlSetMetaEncoding()
195 if (xmlStrcasecmp(cur->name, BAD_CAST"meta") == 0) in htmlSetMetaEncoding()
198 cur = cur->next; in htmlSetMetaEncoding()
200 if (cur == NULL) in htmlSetMetaEncoding()
202 cur = cur->children; in htmlSetMetaEncoding()
207 while (cur != NULL) { in htmlSetMetaEncoding()
208 if ((cur->type == XML_ELEMENT_NODE) && (cur->name != NULL)) { in htmlSetMetaEncoding()
209 if (xmlStrcasecmp(cur->name, BAD_CAST"head") == 0) in htmlSetMetaEncoding()
211 if (xmlStrcasecmp(cur->name, BAD_CAST"meta") == 0) { in htmlSetMetaEncoding()
212 head = cur->parent; in htmlSetMetaEncoding()
216 cur = cur->next; in htmlSetMetaEncoding()
218 if (cur == NULL) in htmlSetMetaEncoding()
221 head = cur; in htmlSetMetaEncoding()
222 if (cur->children == NULL) in htmlSetMetaEncoding()
224 cur = cur->children; in htmlSetMetaEncoding()
231 while (cur != NULL) { in htmlSetMetaEncoding()
232 if ((cur->type == XML_ELEMENT_NODE) && (cur->name != NULL)) { in htmlSetMetaEncoding()
233 if (xmlStrcasecmp(cur->name, BAD_CAST"meta") == 0) { in htmlSetMetaEncoding()
234 xmlAttrPtr attr = cur->properties; in htmlSetMetaEncoding()
260 meta = cur; in htmlSetMetaEncoding()
266 cur = cur->next; in htmlSetMetaEncoding()
408 htmlBufNodeDumpFormat(xmlBufPtr buf, xmlDocPtr doc, xmlNodePtr cur, in htmlBufNodeDumpFormat() argument
414 if (cur == NULL) { in htmlBufNodeDumpFormat()
434 htmlNodeDumpFormatOutput(outbuf, doc, cur, NULL, format); in htmlBufNodeDumpFormat()
452 htmlNodeDump(xmlBufferPtr buf, xmlDocPtr doc, xmlNodePtr cur) { in htmlNodeDump() argument
456 if ((buf == NULL) || (cur == NULL)) in htmlNodeDump()
464 ret = htmlBufNodeDumpFormat(buffer, doc, cur, 1); in htmlNodeDump()
489 xmlNodePtr cur, const char *encoding, int format) { in htmlNodeDumpFileFormat() argument
521 htmlNodeDumpFormatOutput(buf, doc, cur, encoding, format); in htmlNodeDumpFileFormat()
537 htmlNodeDumpFile(FILE *out, xmlDocPtr doc, xmlNodePtr cur) { in htmlNodeDumpFile() argument
538 htmlNodeDumpFileFormat(out, doc, cur, NULL, 1); in htmlNodeDumpFile()
552 htmlDocDumpMemoryFormat(xmlDocPtr cur, xmlChar**mem, int *size, int format) { in htmlDocDumpMemoryFormat() argument
561 if (cur == NULL) { in htmlDocDumpMemoryFormat()
567 encoding = (const char *) htmlGetMetaEncoding(cur); in htmlDocDumpMemoryFormat()
596 htmlDocContentDumpFormatOutput(buf, cur, NULL, format); in htmlDocDumpMemoryFormat()
619 htmlDocDumpMemory(xmlDocPtr cur, xmlChar**mem, int *size) { in htmlDocDumpMemory() argument
620 htmlDocDumpMemoryFormat(cur, mem, size, 1); in htmlDocDumpMemory()
630 void xmlNsListDumpOutput(xmlOutputBufferPtr buf, xmlNsPtr cur);
645 xmlDtdPtr cur = doc->intSubset; in htmlDtdDumpOutput() local
647 if (cur == NULL) { in htmlDtdDumpOutput()
652 xmlOutputBufferWriteString(buf, (const char *)cur->name); in htmlDtdDumpOutput()
653 if (cur->ExternalID != NULL) { in htmlDtdDumpOutput()
655 xmlBufWriteQuotedString(buf->buffer, cur->ExternalID); in htmlDtdDumpOutput()
656 if (cur->SystemID != NULL) { in htmlDtdDumpOutput()
658 xmlBufWriteQuotedString(buf->buffer, cur->SystemID); in htmlDtdDumpOutput()
660 } else if (cur->SystemID != NULL && in htmlDtdDumpOutput()
661 xmlStrcmp(cur->SystemID, BAD_CAST "about:legacy-compat")) { in htmlDtdDumpOutput()
663 xmlBufWriteQuotedString(buf->buffer, cur->SystemID); in htmlDtdDumpOutput()
678 htmlAttrDumpOutput(xmlOutputBufferPtr buf, xmlDocPtr doc, xmlAttrPtr cur, in htmlAttrDumpOutput() argument
689 if (cur == NULL) { in htmlAttrDumpOutput()
693 if ((cur->ns != NULL) && (cur->ns->prefix != NULL)) { in htmlAttrDumpOutput()
694 xmlOutputBufferWriteString(buf, (const char *)cur->ns->prefix); in htmlAttrDumpOutput()
697 xmlOutputBufferWriteString(buf, (const char *)cur->name); in htmlAttrDumpOutput()
698 if ((cur->children != NULL) && (!htmlIsBooleanAttr(cur->name))) { in htmlAttrDumpOutput()
699 value = xmlNodeListGetString(doc, cur->children, 0); in htmlAttrDumpOutput()
702 if ((cur->ns == NULL) && (cur->parent != NULL) && in htmlAttrDumpOutput()
703 (cur->parent->ns == NULL) && in htmlAttrDumpOutput()
704 ((!xmlStrcasecmp(cur->name, BAD_CAST "href")) || in htmlAttrDumpOutput()
705 (!xmlStrcasecmp(cur->name, BAD_CAST "action")) || in htmlAttrDumpOutput()
706 (!xmlStrcasecmp(cur->name, BAD_CAST "src")) || in htmlAttrDumpOutput()
707 ((!xmlStrcasecmp(cur->name, BAD_CAST "name")) && in htmlAttrDumpOutput()
708 (!xmlStrcasecmp(cur->parent->name, BAD_CAST "a"))))) { in htmlAttrDumpOutput()
772 htmlAttrListDumpOutput(xmlOutputBufferPtr buf, xmlDocPtr doc, xmlAttrPtr cur, const char *encoding)… in htmlAttrListDumpOutput() argument
773 if (cur == NULL) { in htmlAttrListDumpOutput()
776 while (cur != NULL) { in htmlAttrListDumpOutput()
777 htmlAttrDumpOutput(buf, doc, cur, encoding); in htmlAttrListDumpOutput()
778 cur = cur->next; in htmlAttrListDumpOutput()
796 xmlNodePtr cur, const char *encoding, int format) { in htmlNodeListDumpOutput() argument
797 if (cur == NULL) { in htmlNodeListDumpOutput()
800 while (cur != NULL) { in htmlNodeListDumpOutput()
801 htmlNodeDumpFormatOutput(buf, doc, cur, encoding, format); in htmlNodeListDumpOutput()
802 cur = cur->next; in htmlNodeListDumpOutput()
818 xmlNodePtr cur, const char *encoding, int format) { in htmlNodeDumpFormatOutput() argument
823 if ((cur == NULL) || (buf == NULL)) { in htmlNodeDumpFormatOutput()
829 if (cur->type == XML_DTD_NODE) in htmlNodeDumpFormatOutput()
831 if ((cur->type == XML_HTML_DOCUMENT_NODE) || in htmlNodeDumpFormatOutput()
832 (cur->type == XML_DOCUMENT_NODE)){ in htmlNodeDumpFormatOutput()
833 htmlDocContentDumpOutput(buf, (xmlDocPtr) cur, encoding); in htmlNodeDumpFormatOutput()
836 if (cur->type == XML_ATTRIBUTE_NODE) { in htmlNodeDumpFormatOutput()
837 htmlAttrDumpOutput(buf, doc, (xmlAttrPtr) cur, encoding); in htmlNodeDumpFormatOutput()
840 if (cur->type == HTML_TEXT_NODE) { in htmlNodeDumpFormatOutput()
841 if (cur->content != NULL) { in htmlNodeDumpFormatOutput()
842 if (((cur->name == (const xmlChar *)xmlStringText) || in htmlNodeDumpFormatOutput()
843 (cur->name != (const xmlChar *)xmlStringTextNoenc)) && in htmlNodeDumpFormatOutput()
844 ((cur->parent == NULL) || in htmlNodeDumpFormatOutput()
845 ((xmlStrcasecmp(cur->parent->name, BAD_CAST "script")) && in htmlNodeDumpFormatOutput()
846 (xmlStrcasecmp(cur->parent->name, BAD_CAST "style"))))) { in htmlNodeDumpFormatOutput()
849 buffer = xmlEncodeEntitiesReentrant(doc, cur->content); in htmlNodeDumpFormatOutput()
855 xmlOutputBufferWriteString(buf, (const char *)cur->content); in htmlNodeDumpFormatOutput()
860 if (cur->type == HTML_COMMENT_NODE) { in htmlNodeDumpFormatOutput()
861 if (cur->content != NULL) { in htmlNodeDumpFormatOutput()
863 xmlOutputBufferWriteString(buf, (const char *)cur->content); in htmlNodeDumpFormatOutput()
868 if (cur->type == HTML_PI_NODE) { in htmlNodeDumpFormatOutput()
869 if (cur->name == NULL) in htmlNodeDumpFormatOutput()
872 xmlOutputBufferWriteString(buf, (const char *)cur->name); in htmlNodeDumpFormatOutput()
873 if (cur->content != NULL) { in htmlNodeDumpFormatOutput()
875 xmlOutputBufferWriteString(buf, (const char *)cur->content); in htmlNodeDumpFormatOutput()
880 if (cur->type == HTML_ENTITY_REF_NODE) { in htmlNodeDumpFormatOutput()
882 xmlOutputBufferWriteString(buf, (const char *)cur->name); in htmlNodeDumpFormatOutput()
886 if (cur->type == HTML_PRESERVE_NODE) { in htmlNodeDumpFormatOutput()
887 if (cur->content != NULL) { in htmlNodeDumpFormatOutput()
888 xmlOutputBufferWriteString(buf, (const char *)cur->content); in htmlNodeDumpFormatOutput()
896 if (cur->ns == NULL) in htmlNodeDumpFormatOutput()
897 info = htmlTagLookup(cur->name); in htmlNodeDumpFormatOutput()
902 if ((cur->ns != NULL) && (cur->ns->prefix != NULL)) { in htmlNodeDumpFormatOutput()
903 xmlOutputBufferWriteString(buf, (const char *)cur->ns->prefix); in htmlNodeDumpFormatOutput()
906 xmlOutputBufferWriteString(buf, (const char *)cur->name); in htmlNodeDumpFormatOutput()
907 if (cur->nsDef) in htmlNodeDumpFormatOutput()
908 xmlNsListDumpOutput(buf, cur->nsDef); in htmlNodeDumpFormatOutput()
909 if (cur->properties != NULL) in htmlNodeDumpFormatOutput()
910 htmlAttrListDumpOutput(buf, doc, cur->properties, encoding); in htmlNodeDumpFormatOutput()
914 if ((format) && (!info->isinline) && (cur->next != NULL)) { in htmlNodeDumpFormatOutput()
915 if ((cur->next->type != HTML_TEXT_NODE) && in htmlNodeDumpFormatOutput()
916 (cur->next->type != HTML_ENTITY_REF_NODE) && in htmlNodeDumpFormatOutput()
917 (cur->parent != NULL) && in htmlNodeDumpFormatOutput()
918 (cur->parent->name != NULL) && in htmlNodeDumpFormatOutput()
919 (cur->parent->name[0] != 'p')) /* p, pre, param */ in htmlNodeDumpFormatOutput()
924 if (((cur->type == XML_ELEMENT_NODE) || (cur->content == NULL)) && in htmlNodeDumpFormatOutput()
925 (cur->children == NULL)) { in htmlNodeDumpFormatOutput()
932 if ((cur->ns != NULL) && (cur->ns->prefix != NULL)) { in htmlNodeDumpFormatOutput()
933 xmlOutputBufferWriteString(buf, (const char *)cur->ns->prefix); in htmlNodeDumpFormatOutput()
936 xmlOutputBufferWriteString(buf, (const char *)cur->name); in htmlNodeDumpFormatOutput()
939 if ((format) && (cur->next != NULL) && in htmlNodeDumpFormatOutput()
941 if ((cur->next->type != HTML_TEXT_NODE) && in htmlNodeDumpFormatOutput()
942 (cur->next->type != HTML_ENTITY_REF_NODE) && in htmlNodeDumpFormatOutput()
943 (cur->parent != NULL) && in htmlNodeDumpFormatOutput()
944 (cur->parent->name != NULL) && in htmlNodeDumpFormatOutput()
945 (cur->parent->name[0] != 'p')) /* p, pre, param */ in htmlNodeDumpFormatOutput()
951 if ((cur->type != XML_ELEMENT_NODE) && in htmlNodeDumpFormatOutput()
952 (cur->content != NULL)) { in htmlNodeDumpFormatOutput()
958 xmlOutputBufferWriteString(buf, (const char *) cur->content); in htmlNodeDumpFormatOutput()
960 if (cur->children != NULL) { in htmlNodeDumpFormatOutput()
962 (cur->children->type != HTML_TEXT_NODE) && in htmlNodeDumpFormatOutput()
963 (cur->children->type != HTML_ENTITY_REF_NODE) && in htmlNodeDumpFormatOutput()
964 (cur->children != cur->last) && in htmlNodeDumpFormatOutput()
965 (cur->name != NULL) && in htmlNodeDumpFormatOutput()
966 (cur->name[0] != 'p')) /* p, pre, param */ in htmlNodeDumpFormatOutput()
968 htmlNodeListDumpOutput(buf, doc, cur->children, encoding, format); in htmlNodeDumpFormatOutput()
970 (cur->last->type != HTML_TEXT_NODE) && in htmlNodeDumpFormatOutput()
971 (cur->last->type != HTML_ENTITY_REF_NODE) && in htmlNodeDumpFormatOutput()
972 (cur->children != cur->last) && in htmlNodeDumpFormatOutput()
973 (cur->name != NULL) && in htmlNodeDumpFormatOutput()
974 (cur->name[0] != 'p')) /* p, pre, param */ in htmlNodeDumpFormatOutput()
978 if ((cur->ns != NULL) && (cur->ns->prefix != NULL)) { in htmlNodeDumpFormatOutput()
979 xmlOutputBufferWriteString(buf, (const char *)cur->ns->prefix); in htmlNodeDumpFormatOutput()
982 xmlOutputBufferWriteString(buf, (const char *)cur->name); in htmlNodeDumpFormatOutput()
985 (cur->next != NULL)) { in htmlNodeDumpFormatOutput()
986 if ((cur->next->type != HTML_TEXT_NODE) && in htmlNodeDumpFormatOutput()
987 (cur->next->type != HTML_ENTITY_REF_NODE) && in htmlNodeDumpFormatOutput()
988 (cur->parent != NULL) && in htmlNodeDumpFormatOutput()
989 (cur->parent->name != NULL) && in htmlNodeDumpFormatOutput()
990 (cur->parent->name[0] != 'p')) /* p, pre, param */ in htmlNodeDumpFormatOutput()
1007 xmlNodePtr cur, const char *encoding) { in htmlNodeDumpOutput() argument
1008 htmlNodeDumpFormatOutput(buf, doc, cur, encoding, 1); in htmlNodeDumpOutput()
1021 htmlDocContentDumpFormatOutput(xmlOutputBufferPtr buf, xmlDocPtr cur, in htmlDocContentDumpFormatOutput() argument
1027 if ((buf == NULL) || (cur == NULL)) in htmlDocContentDumpFormatOutput()
1033 type = cur->type; in htmlDocContentDumpFormatOutput()
1034 cur->type = XML_HTML_DOCUMENT_NODE; in htmlDocContentDumpFormatOutput()
1035 if (cur->intSubset != NULL) { in htmlDocContentDumpFormatOutput()
1036 htmlDtdDumpOutput(buf, cur, NULL); in htmlDocContentDumpFormatOutput()
1038 if (cur->children != NULL) { in htmlDocContentDumpFormatOutput()
1039 htmlNodeListDumpOutput(buf, cur, cur->children, encoding, format); in htmlDocContentDumpFormatOutput()
1042 cur->type = (xmlElementType) type; in htmlDocContentDumpFormatOutput()
1054 htmlDocContentDumpOutput(xmlOutputBufferPtr buf, xmlDocPtr cur, in htmlDocContentDumpOutput() argument
1056 htmlDocContentDumpFormatOutput(buf, cur, encoding, 1); in htmlDocContentDumpOutput()
1075 htmlDocDump(FILE *f, xmlDocPtr cur) { in htmlDocDump() argument
1083 if ((cur == NULL) || (f == NULL)) { in htmlDocDump()
1087 encoding = (const char *) htmlGetMetaEncoding(cur); in htmlDocDump()
1110 htmlDocContentDumpOutput(buf, cur, NULL); in htmlDocDump()
1126 htmlSaveFile(const char *filename, xmlDocPtr cur) { in htmlSaveFile() argument
1132 if ((cur == NULL) || (filename == NULL)) in htmlSaveFile()
1137 encoding = (const char *) htmlGetMetaEncoding(cur); in htmlSaveFile()
1161 buf = xmlOutputBufferCreateFilename(filename, handler, cur->compression); in htmlSaveFile()
1164 htmlDocContentDumpOutput(buf, cur, NULL); in htmlSaveFile()
1182 htmlSaveFileFormat(const char *filename, xmlDocPtr cur, in htmlSaveFileFormat() argument
1188 if ((cur == NULL) || (filename == NULL)) in htmlSaveFileFormat()
1202 htmlSetMetaEncoding(cur, (const xmlChar *) encoding); in htmlSaveFileFormat()
1204 htmlSetMetaEncoding(cur, (const xmlChar *) "UTF-8"); in htmlSaveFileFormat()
1221 htmlDocContentDumpFormatOutput(buf, cur, encoding, format); in htmlSaveFileFormat()
1239 htmlSaveFileEnc(const char *filename, xmlDocPtr cur, const char *encoding) { in htmlSaveFileEnc() argument
1240 return(htmlSaveFileFormat(filename, cur, encoding, 1)); in htmlSaveFileEnc()