[xml] xmlwriter, invalid StartElement



Hello,

Little patch to fix a xmlTextWriterStartElement after a
xmlTextWriterStartAttribute (or NS). Works well too if a text was
inserted in between (text seems to do not be in the state stack).

I'm not sure if it's correct to do so. For example if one uses tags in
an attribute value? should he use text instead?

Regards,

--Pierre

--- xmlwriter.c 2005-02-23 10:51:40.810568181 +0100
+++ xmlwrite.c.old      2005-02-23 10:50:43.485060492 +0100
@@ -931,7 +931,6 @@ xmlTextWriterStartElement(xmlTextWriterP
         p = (xmlTextWriterStackEntry *) xmlLinkGetData(lk);
         if (p != 0) {
             switch (p->state) {
-                case XML_TEXTWRITER_ATTRIBUTE:
                 case XML_TEXTWRITER_PI:
                 case XML_TEXTWRITER_PI_TEXT:
                     return -1;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]