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) {
588 htmlDocContentDumpFormatOutput(buf, cur, NULL, format);
603 * @cur: the document
611 htmlDocDumpMemory(xmlDocPtr cur, xmlChar**mem, int *size) {
612 htmlDocDumpMemoryFormat(cur, mem, size, 1);
622 void xmlNsListDumpOutput(xmlOutputBufferPtr buf, xmlNsPtr cur);
637 xmlDtdPtr cur = doc->intSubset;
639 if (cur == NULL) {
644 xmlOutputBufferWriteString(buf, (const char *)cur->name);
645 if (cur->ExternalID != NULL) {
647 xmlBufferWriteQuotedString(buf->buffer, cur->ExternalID);
648 if (cur->SystemID != NULL) {
650 xmlBufferWriteQuotedString(buf->buffer, cur->SystemID);
652 } else if (cur->SystemID != NULL) {
654 xmlBufferWriteQuotedString(buf->buffer, cur->SystemID);
663 * @cur: the attribute pointer
669 htmlAttrDumpOutput(xmlOutputBufferPtr buf, xmlDocPtr doc, xmlAttrPtr cur,
679 if (cur == NULL) {
683 if ((cur->ns != NULL) && (cur->ns->prefix != NULL)) {
684 xmlOutputBufferWriteString(buf, (const char *)cur->ns->prefix);
687 xmlOutputBufferWriteString(buf, (const char *)cur->name);
688 if ((cur->children != NULL) && (!htmlIsBooleanAttr(cur->name))) {
689 value = xmlNodeListGetString(doc, cur->children, 0);
692 if ((cur->ns == NULL) && (cur->parent != NULL) &&
693 (cur->parent->ns == NULL) &&
694 ((!xmlStrcasecmp(cur->name, BAD_CAST "href")) ||
695 (!xmlStrcasecmp(cur->name, BAD_CAST "action")) ||
696 (!xmlStrcasecmp(cur->name, BAD_CAST "src")) ||
697 ((!xmlStrcasecmp(cur->name, BAD_CAST "name")) &&
698 (!xmlStrcasecmp(cur->parent->name, BAD_CAST "a"))))) {
725 * @cur: the first attribute pointer
731 htmlAttrListDumpOutput(xmlOutputBufferPtr buf, xmlDocPtr doc, xmlAttrPtr cur, const char *encoding) {
732 if (cur == NULL) {
735 while (cur != NULL) {
736 htmlAttrDumpOutput(buf, doc, cur, encoding);
737 cur = cur->next;
747 * @cur: the first node
755 xmlNodePtr cur, const char *encoding, int format) {
756 if (cur == NULL) {
759 while (cur != NULL) {
760 htmlNodeDumpFormatOutput(buf, doc, cur, encoding, format);
761 cur = cur->next;
769 * @cur: the current node
777 xmlNodePtr cur, const char *encoding, int format) {
782 if ((cur == NULL) || (buf == NULL)) {
788 if (cur->type == XML_DTD_NODE)
790 if ((cur->type == XML_HTML_DOCUMENT_NODE) ||
791 (cur->type == XML_DOCUMENT_NODE)){
792 htmlDocContentDumpOutput(buf, (xmlDocPtr) cur, encoding);
795 if (cur->type == XML_ATTRIBUTE_NODE) {
796 htmlAttrDumpOutput(buf, doc, (xmlAttrPtr) cur, encoding);
799 if (cur->type == HTML_TEXT_NODE) {
800 if (cur->content != NULL) {
801 if (((cur->name == (const xmlChar *)xmlStringText) ||
802 (cur->name != (const xmlChar *)xmlStringTextNoenc)) &&
803 ((cur->parent == NULL) ||
804 ((xmlStrcasecmp(cur->parent->name, BAD_CAST "script")) &&
805 (xmlStrcasecmp(cur->parent->name, BAD_CAST "style"))))) {
808 buffer = xmlEncodeEntitiesReentrant(doc, cur->content);
814 xmlOutputBufferWriteString(buf, (const char *)cur->content);
819 if (cur->type == HTML_COMMENT_NODE) {
820 if (cur->content != NULL) {
822 xmlOutputBufferWriteString(buf, (const char *)cur->content);
827 if (cur->type == HTML_PI_NODE) {
828 if (cur->name == NULL)
831 xmlOutputBufferWriteString(buf, (const char *)cur->name);
832 if (cur->content != NULL) {
834 xmlOutputBufferWriteString(buf, (const char *)cur->content);
839 if (cur->type == HTML_ENTITY_REF_NODE) {
841 xmlOutputBufferWriteString(buf, (const char *)cur->name);
845 if (cur->type == HTML_PRESERVE_NODE) {
846 if (cur->content != NULL) {
847 xmlOutputBufferWriteString(buf, (const char *)cur->content);
855 if (cur->ns == NULL)
856 info = htmlTagLookup(cur->name);
861 if ((cur->ns != NULL) && (cur->ns->prefix != NULL)) {
862 xmlOutputBufferWriteString(buf, (const char *)cur->ns->prefix);
865 xmlOutputBufferWriteString(buf, (const char *)cur->name);
866 if (cur->nsDef)
867 xmlNsListDumpOutput(buf, cur->nsDef);
868 if (cur->properties != NULL)
869 htmlAttrListDumpOutput(buf, doc, cur->properties, encoding);
873 if ((format) && (!info->isinline) && (cur->next != NULL)) {
874 if ((cur->next->type != HTML_TEXT_NODE) &&
875 (cur->next->type != HTML_ENTITY_REF_NODE) &&
876 (cur->parent != NULL) &&
877 (cur->parent->name != NULL) &&
878 (cur->parent->name[0] != 'p')) /* p, pre, param */
883 if (((cur->type == XML_ELEMENT_NODE) || (cur->content == NULL)) &&
884 (cur->children == NULL)) {
891 if ((cur->ns != NULL) && (cur->ns->prefix != NULL)) {
892 xmlOutputBufferWriteString(buf, (const char *)cur->ns->prefix);
895 xmlOutputBufferWriteString(buf, (const char *)cur->name);
898 if ((format) && (cur->next != NULL) &&
900 if ((cur->next->type != HTML_TEXT_NODE) &&
901 (cur->next->type != HTML_ENTITY_REF_NODE) &&
902 (cur->parent != NULL) &&
903 (cur->parent->name != NULL) &&
904 (cur->parent->name[0] != 'p')) /* p, pre, param */
910 if ((cur->type != XML_ELEMENT_NODE) &&
911 (cur->content != NULL)) {
917 xmlOutputBufferWriteString(buf, (const char *) cur->content);
919 if (cur->children != NULL) {
921 (cur->children->type != HTML_TEXT_NODE) &&
922 (cur->children->type != HTML_ENTITY_REF_NODE) &&
923 (cur->children != cur->last) &&
924 (cur->name != NULL) &&
925 (cur->name[0] != 'p')) /* p, pre, param */
927 htmlNodeListDumpOutput(buf, doc, cur->children, encoding, format);
929 (cur->last->type != HTML_TEXT_NODE) &&
930 (cur->last->type != HTML_ENTITY_REF_NODE) &&
931 (cur->children != cur->last) &&
932 (cur->name != NULL) &&
933 (cur->name[0] != 'p')) /* p, pre, param */
937 if ((cur->ns != NULL) && (cur->ns->prefix != NULL)) {
938 xmlOutputBufferWriteString(buf, (const char *)cur->ns->prefix);
941 xmlOutputBufferWriteString(buf, (const char *)cur->name);
944 (cur->next != NULL)) {
945 if ((cur->next->type != HTML_TEXT_NODE) &&
946 (cur->next->type != HTML_ENTITY_REF_NODE) &&
947 (cur->parent != NULL) &&
948 (cur->parent->name != NULL) &&
949 (cur->parent->name[0] != 'p')) /* p, pre, param */
958 * @cur: the current node
966 xmlNodePtr cur, const char *encoding) {
967 htmlNodeDumpFormatOutput(buf, doc, cur, encoding, 1);
973 * @cur: the document
980 htmlDocContentDumpFormatOutput(xmlOutputBufferPtr buf, xmlDocPtr cur,
986 if ((buf == NULL) || (cur == NULL))
992 type = cur->type;
993 cur->type = XML_HTML_DOCUMENT_NODE;
994 if (cur->intSubset != NULL) {
995 htmlDtdDumpOutput(buf, cur, NULL);
997 if (cur->children != NULL) {
998 htmlNodeListDumpOutput(buf, cur, cur->children, encoding, format);
1001 cur->type = (xmlElementType) type;
1007 * @cur: the document
1013 htmlDocContentDumpOutput(xmlOutputBufferPtr buf, xmlDocPtr cur,
1015 htmlDocContentDumpFormatOutput(buf, cur, encoding, 1);
1027 * @cur: the document
1034 htmlDocDump(FILE *f, xmlDocPtr cur) {
1042 if ((cur == NULL) || (f == NULL)) {
1046 encoding = (const char *) htmlGetMetaEncoding(cur);
1052 if (enc != cur->charset) {
1053 if (cur->charset != XML_CHAR_ENCODING_UTF8) {
1078 htmlDocContentDumpOutput(buf, cur, NULL);
1087 * @cur: the document
1094 htmlSaveFile(const char *filename, xmlDocPtr cur) {
1100 if ((cur == NULL) || (filename == NULL))
1105 encoding = (const char *) htmlGetMetaEncoding(cur);
1111 if (enc != cur->charset) {
1112 if (cur->charset != XML_CHAR_ENCODING_UTF8) {
1136 buf = xmlOutputBufferCreateFilename(filename, handler, cur->compression);
1139 htmlDocContentDumpOutput(buf, cur, NULL);
1148 * @cur: the document
1157 htmlSaveFileFormat(const char *filename, xmlDocPtr cur,
1163 if ((cur == NULL) || (filename == NULL))
1172 if (enc != cur->charset) {
1173 if (cur->charset != XML_CHAR_ENCODING_UTF8) {
1184 htmlSetMetaEncoding(cur, (const xmlChar *) encoding);
1186 htmlSetMetaEncoding(cur, (const xmlChar *) "UTF-8");
1203 htmlDocContentDumpFormatOutput(buf, cur, encoding, format);
1212 * @cur: the document
1221 htmlSaveFileEnc(const char *filename, xmlDocPtr cur, const char *encoding) {
1222 return(htmlSaveFileFormat(filename, cur, encoding, 1));