[xml] invalid SAX context in xmlParseReference()



hi,

in xmlParseReference(), we should give sax handlers valid context (held in userData).

--- parser.c
+++ parser.c
@@ -5254,14 +5254,14 @@
                    if (ent->etype == XML_INTERNAL_GENERAL_ENTITY) {
                        ctxt->depth++;
                        ret = xmlParseBalancedChunkMemory(ctxt->myDoc,
-                                          ctxt->sax, NULL, ctxt->depth,
+                                          ctxt->sax, ctxt->userData, ctxt->depth,
                                           value, &list);
                        ctxt->depth--;
                    } else if (ent->etype ==
                               XML_EXTERNAL_GENERAL_PARSED_ENTITY) {
                        ctxt->depth++;
                        ret = xmlParseExternalEntityPrivate(ctxt->myDoc, ctxt,
-                                  ctxt->sax, NULL, ctxt->depth,
+                                  ctxt->sax, ctxt->userData, ctxt->depth,
                                   ent->URI, ent->ExternalID, &list);
                        ctxt->depth--;
                    } else {

but this breaks "make tests". does anybody can see why ?

Testing dtd12
6c6
< <doc>&WhatHeSaid;</doc>
---
<doc>He said &quot;Yes&quot;&YN;&WhatHeSaid;</doc>
6c6
< <doc>He said &quot;Yes&quot;&YN;&WhatHeSaid;</doc>
---
<doc>He said &quot;Yes&quot;&quot;Yes&quot;&YN;He said &quot;Yes&quot;&YN;&WhatHeSaid;</doc>


Testing ent7
8c8
< <item><para>'they called me &sampleEnt;'</para></item>
---
<item><para>'they called me the hyacinth girl&sampleEnt;'</para></item>
8c8
< <item><para>'they called me the hyacinth girl&sampleEnt;'</para></item>
---
<item><para>'they called me the hyacinth girlthe hyacinth girl&sampleEnt;'</para></item>
Testing ent8
9c9
<    <Content>&test1;&test2;</Content>
---
   <Content>test 1&test1;test 2&test2;</Content>
9c9
<    <Content>test 1&test1;test 2&test2;</Content>
---
   <Content>test 1test 1&test1;test 2test 2&test2;</Content>




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