Home | History | Annotate | Download | only in src

Lines Matching refs:cur

49     htmlNodePtr cur;
55 cur = doc->children;
60 while (cur != NULL) {
61 if ((cur->type == XML_ELEMENT_NODE) && (cur->name != NULL)) {
62 if (xmlStrEqual(cur->name, BAD_CAST"html"))
64 if (xmlStrEqual(cur->name, BAD_CAST"head"))
66 if (xmlStrEqual(cur->name, BAD_CAST"meta"))
69 cur = cur->next;
71 if (cur == NULL)
73 cur = cur->children;
78 while (cur != NULL) {
79 if ((cur->type == XML_ELEMENT_NODE) && (cur->name != NULL)) {
80 if (xmlStrEqual(cur->name, BAD_CAST"head"))
82 if (xmlStrEqual(cur->name, BAD_CAST"meta"))
85 cur = cur->next;
87 if (cur == NULL)
90 cur = cur->children;
96 while (cur != NULL) {
97 if ((cur->type == XML_ELEMENT_NODE) && (cur->name != NULL)) {
98 if (xmlStrEqual(cur->name, BAD_CAST"meta")) {
99 xmlAttrPtr attr = cur->properties;
123 cur = cur->next;
163 htmlNodePtr cur, meta = NULL, head = NULL;
181 cur = doc->children;
186 while (cur != NULL) {
187 if ((cur->type == XML_ELEMENT_NODE) && (cur->name != NULL)) {
188 if (xmlStrcasecmp(cur->name, BAD_CAST"html") == 0)
190 if (xmlStrcasecmp(cur->name, BAD_CAST"head") == 0)
192 if (xmlStrcasecmp(cur->name, BAD_CAST"meta") == 0)
195 cur = cur->next;
197 if (cur == NULL)
199 cur = cur->children;
204 while (cur != NULL) {
205 if ((cur->type == XML_ELEMENT_NODE) && (cur->name != NULL)) {
206 if (xmlStrcasecmp(cur->name, BAD_CAST"head") == 0)
208 if (xmlStrcasecmp(cur->name, BAD_CAST"meta") == 0) {
209 head = cur->parent;
213 cur = cur->next;
215 if (cur == NULL)
218 head = cur;
219 if (cur->children == NULL)
221 cur = cur->children;
228 while (cur != NULL) {
229 if ((cur->type == XML_ELEMENT_NODE) && (cur->name != NULL)) {
230 if (xmlStrcasecmp(cur->name, BAD_CAST"meta") == 0) {
231 xmlAttrPtr attr = cur->properties;
257 meta = cur;
263 cur = cur->next;
389 htmlNodeDumpFormat(xmlBufferPtr buf, xmlDocPtr doc, xmlNodePtr cur,
396 * @cur: the current node
404 htmlNodeDumpFormat(xmlBufferPtr buf, xmlDocPtr doc, xmlNodePtr cur,
410 if (cur == NULL) {
430 htmlNodeDumpFormatOutput(outbuf, doc, cur, NULL, format);
440 * @cur: the current node
448 htmlNodeDump(xmlBufferPtr buf, xmlDocPtr doc, xmlNodePtr cur) {
451 return(htmlNodeDumpFormat(buf, doc, cur, 1));
458 * @cur: the current node
470 xmlNodePtr cur, const char *encoding, int format) {
502 htmlNodeDumpFormatOutput(buf, doc, cur, encoding, format);
512 * @cur: the current node
518 htmlNodeDumpFile(FILE *out, xmlDocPtr doc, xmlNodePtr cur) {
519 htmlNodeDumpFileFormat(out, doc, cur, NULL, 1);
524 * @cur: the document
533 htmlDocDumpMemoryFormat(xmlDocPtr cur, xmlChar**mem, int *size, int format) {
542 if (cur == NULL) {
548 encoding = (const char *) htmlGetMetaEncoding(cur);
554 if (enc != cur->charset) {
555 if (cur->charset != XML_CHAR_ENCODING_UTF8) {
590 htmlDocContentDumpFormatOutput(buf, cur, NULL, format);
605 * @cur: the document
613 htmlDocDumpMemory(xmlDocPtr cur, xmlChar**mem, int *size) {
614 htmlDocDumpMemoryFormat(cur, mem, size, 1);
624 void xmlNsListDumpOutput(xmlOutputBufferPtr buf, xmlNsPtr cur);
639 xmlDtdPtr cur = doc->intSubset;
641 if (cur == NULL) {
646 xmlOutputBufferWriteString(buf, (const char *)cur->name);
647 if (cur->ExternalID != NULL) {
649 xmlBufferWriteQuotedString(buf->buffer, cur->ExternalID);
650 if (cur->SystemID != NULL) {
652 xmlBufferWriteQuotedString(buf->buffer, cur->SystemID);
654 } else if (cur->SystemID != NULL) {
656 xmlBufferWriteQuotedString(buf->buffer, cur->SystemID);
665 * @cur: the attribute pointer
671 htmlAttrDumpOutput(xmlOutputBufferPtr buf, xmlDocPtr doc, xmlAttrPtr cur,
681 if (cur == NULL) {
685 if ((cur->ns != NULL) && (cur->ns->prefix != NULL)) {
686 xmlOutputBufferWriteString(buf, (const char *)cur->ns->prefix);
689 xmlOutputBufferWriteString(buf, (const char *)cur->name);
690 if ((cur->children != NULL) && (!htmlIsBooleanAttr(cur->name))) {
691 value = xmlNodeListGetString(doc, cur->children, 0);
694 if ((cur->ns == NULL) && (cur->parent != NULL) &&
695 (cur->parent->ns == NULL) &&
696 ((!xmlStrcasecmp(cur->name, BAD_CAST "href")) ||
697 (!xmlStrcasecmp(cur->name, BAD_CAST "action")) ||
698 (!xmlStrcasecmp(cur->name, BAD_CAST "src")) ||
699 ((!xmlStrcasecmp(cur->name, BAD_CAST "name")) &&
700 (!xmlStrcasecmp(cur->parent->name, BAD_CAST "a"))))) {
727 * @cur: the first attribute pointer
733 htmlAttrListDumpOutput(xmlOutputBufferPtr buf, xmlDocPtr doc, xmlAttrPtr cur, const char *encoding) {
734 if (cur == NULL) {
737 while (cur != NULL) {
738 htmlAttrDumpOutput(buf, doc, cur, encoding);
739 cur = cur->next;
749 * @cur: the first node
757 xmlNodePtr cur, const char *encoding, int format) {
758 if (cur == NULL) {
761 while (cur != NULL) {
762 htmlNodeDumpFormatOutput(buf, doc, cur, encoding, format);
763 cur = cur->next;
771 * @cur: the current node
779 xmlNodePtr cur, const char *encoding, int format) {
784 if ((cur == NULL) || (buf == NULL)) {
790 if (cur->type == XML_DTD_NODE)
792 if ((cur->type == XML_HTML_DOCUMENT_NODE) ||
793 (cur->type == XML_DOCUMENT_NODE)){
794 htmlDocContentDumpOutput(buf, (xmlDocPtr) cur, encoding);
797 if (cur->type == XML_ATTRIBUTE_NODE) {
798 htmlAttrDumpOutput(buf, doc, (xmlAttrPtr) cur, encoding);
801 if (cur->type == HTML_TEXT_NODE) {
802 if (cur->content != NULL) {
803 if (((cur->name == (const xmlChar *)xmlStringText) ||
804 (cur->name != (const xmlChar *)xmlStringTextNoenc)) &&
805 ((cur->parent == NULL) ||
806 ((xmlStrcasecmp(cur->parent->name, BAD_CAST "script")) &&
807 (xmlStrcasecmp(cur->parent->name, BAD_CAST "style"))))) {
810 buffer = xmlEncodeEntitiesReentrant(doc, cur->content);
816 xmlOutputBufferWriteString(buf, (const char *)cur->content);
821 if (cur->type == HTML_COMMENT_NODE) {
822 if (cur->content != NULL) {
824 xmlOutputBufferWriteString(buf, (const char *)cur->content);
829 if (cur->type == HTML_PI_NODE) {
830 if (cur->name == NULL)
833 xmlOutputBufferWriteString(buf, (const char *)cur->name);
834 if (cur->content != NULL) {
836 xmlOutputBufferWriteString(buf, (const char *)cur->content);
841 if (cur->type == HTML_ENTITY_REF_NODE) {
843 xmlOutputBufferWriteString(buf, (const char *)cur->name);
847 if (cur->type == HTML_PRESERVE_NODE) {
848 if (cur->content != NULL) {
849 xmlOutputBufferWriteString(buf, (const char *)cur->content);
857 if (cur->ns == NULL)
858 info = htmlTagLookup(cur->name);
863 if ((cur->ns != NULL) && (cur->ns->prefix != NULL)) {
864 xmlOutputBufferWriteString(buf, (const char *)cur->ns->prefix);
867 xmlOutputBufferWriteString(buf, (const char *)cur->name);
868 if (cur->nsDef)
869 xmlNsListDumpOutput(buf, cur->nsDef);
870 if (cur->properties != NULL)
871 htmlAttrListDumpOutput(buf, doc, cur->properties, encoding);
875 if ((format) && (!info->isinline) && (cur->next != NULL)) {
876 if ((cur->next->type != HTML_TEXT_NODE) &&
877 (cur->next->type != HTML_ENTITY_REF_NODE) &&
878 (cur->parent != NULL) &&
879 (cur->parent->name != NULL) &&
880 (cur->parent->name[0] != 'p')) /* p, pre, param */
885 if (((cur->type == XML_ELEMENT_NODE) || (cur->content == NULL)) &&
886 (cur->children == NULL)) {
893 if ((cur->ns != NULL) && (cur->ns->prefix != NULL)) {
894 xmlOutputBufferWriteString(buf, (const char *)cur->ns->prefix);
897 xmlOutputBufferWriteString(buf, (const char *)cur->name);
900 if ((format) && (cur->next != NULL) &&
902 if ((cur->next->type != HTML_TEXT_NODE) &&
903 (cur->next->type != HTML_ENTITY_REF_NODE) &&
904 (cur->parent != NULL) &&
905 (cur->parent->name != NULL) &&
906 (cur->parent->name[0] != 'p')) /* p, pre, param */
912 if ((cur->type != XML_ELEMENT_NODE) &&
913 (cur->content != NULL)) {
919 xmlOutputBufferWriteString(buf, (const char *) cur->content);
921 if (cur->children != NULL) {
923 (cur->children->type != HTML_TEXT_NODE) &&
924 (cur->children->type != HTML_ENTITY_REF_NODE) &&
925 (cur->children != cur->last) &&
926 (cur->name != NULL) &&
927 (cur->name[0] != 'p')) /* p, pre, param */
929 htmlNodeListDumpOutput(buf, doc, cur->children, encoding, format);
931 (cur->last->type != HTML_TEXT_NODE) &&
932 (cur->last->type != HTML_ENTITY_REF_NODE) &&
933 (cur->children != cur->last) &&
934 (cur->name != NULL) &&
935 (cur->name[0] != 'p')) /* p, pre, param */
939 if ((cur->ns != NULL) && (cur->ns->prefix != NULL)) {
940 xmlOutputBufferWriteString(buf, (const char *)cur->ns->prefix);
943 xmlOutputBufferWriteString(buf, (const char *)cur->name);
946 (cur->next != NULL)) {
947 if ((cur->next->type != HTML_TEXT_NODE) &&
948 (cur->next->type != HTML_ENTITY_REF_NODE) &&
949 (cur->parent != NULL) &&
950 (cur->parent->name != NULL) &&
951 (cur->parent->name[0] != 'p')) /* p, pre, param */
960 * @cur: the current node
968 xmlNodePtr cur, const char *encoding) {
969 htmlNodeDumpFormatOutput(buf, doc, cur, encoding, 1);
975 * @cur: the document
982 htmlDocContentDumpFormatOutput(xmlOutputBufferPtr buf, xmlDocPtr cur,
988 if ((buf == NULL) || (cur == NULL))
994 type = cur->type;
995 cur->type = XML_HTML_DOCUMENT_NODE;
996 if (cur->intSubset != NULL) {
997 htmlDtdDumpOutput(buf, cur, NULL);
999 if (cur->children != NULL) {
1000 htmlNodeListDumpOutput(buf, cur, cur->children, encoding, format);
1003 cur->type = (xmlElementType) type;
1009 * @cur: the document
1015 htmlDocContentDumpOutput(xmlOutputBufferPtr buf, xmlDocPtr cur,
1017 htmlDocContentDumpFormatOutput(buf, cur, encoding, 1);
1029 * @cur: the document
1036 htmlDocDump(FILE *f, xmlDocPtr cur) {
1044 if ((cur == NULL) || (f == NULL)) {
1048 encoding = (const char *) htmlGetMetaEncoding(cur);
1054 if (enc != cur->charset) {
1055 if (cur->charset != XML_CHAR_ENCODING_UTF8) {
1080 htmlDocContentDumpOutput(buf, cur, NULL);
1089 * @cur: the document
1096 htmlSaveFile(const char *filename, xmlDocPtr cur) {
1102 if ((cur == NULL) || (filename == NULL))
1107 encoding = (const char *) htmlGetMetaEncoding(cur);
1113 if (enc != cur->charset) {
1114 if (cur->charset != XML_CHAR_ENCODING_UTF8) {
1138 buf = xmlOutputBufferCreateFilename(filename, handler, cur->compression);
1141 htmlDocContentDumpOutput(buf, cur, NULL);
1150 * @cur: the document
1159 htmlSaveFileFormat(const char *filename, xmlDocPtr cur,
1165 if ((cur == NULL) || (filename == NULL))
1174 if (enc != cur->charset) {
1175 if (cur->charset != XML_CHAR_ENCODING_UTF8) {
1186 htmlSetMetaEncoding(cur, (const xmlChar *) encoding);
1188 htmlSetMetaEncoding(cur, (const xmlChar *) "UTF-8");
1205 htmlDocContentDumpFormatOutput(buf, cur, encoding, format);
1214 * @cur: the document
1223 htmlSaveFileEnc(const char *filename, xmlDocPtr cur, const char *encoding) {
1224 return(htmlSaveFileFormat(filename, cur, encoding, 1));