fix bug reported by Holger Rauch added the test to th regression suite

* parser.c: fix bug reported by Holger Rauch
* test/att8 result/noent/att8 result/att8 result/att8.rdr
  result/att8.sax: added the test to th regression suite
Daniel
This commit is contained in:
Daniel Veillard 2004-03-10 16:27:03 +00:00
parent b318c3b745
commit d3999c7ac6
7 changed files with 69 additions and 2 deletions

View File

@ -1,3 +1,9 @@
Wed Mar 10 17:22:48 CET 2004 Daniel Veillard <daniel@veillard.com>
* parser.c: fix bug reported by Holger Rauch
* test/att8 result/noent/att8 result/att8 result/att8.rdr
result/att8.sax: added the test to th regression suite
Wed Mar 10 19:42:22 HKT 2004 William Brack <wbrack@mmm.com.hk> Wed Mar 10 19:42:22 HKT 2004 William Brack <wbrack@mmm.com.hk>
* doc/search.php: Minor change for later verson of php requiring * doc/search.php: Minor change for later verson of php requiring

View File

@ -1844,10 +1844,12 @@ xmlParserHandlePEReference(xmlParserCtxtPtr ctxt) {
* Macro used to grow the current buffer. * Macro used to grow the current buffer.
*/ */
#define growBuffer(buffer) { \ #define growBuffer(buffer) { \
xmlChar *tmp; \
buffer##_size *= 2; \ buffer##_size *= 2; \
buffer = (xmlChar *) \ tmp = (xmlChar *) \
xmlRealloc(buffer, buffer##_size * sizeof(xmlChar)); \ xmlRealloc(buffer, buffer##_size * sizeof(xmlChar)); \
if (buffer == NULL) goto mem_error; \ if (tmp == NULL) goto mem_error; \
buffer = tmp; \
} }
/** /**
@ -7320,6 +7322,7 @@ reparse:
if (nsPush(ctxt, attname, URL) > 0) nbNs++; if (nsPush(ctxt, attname, URL) > 0) nbNs++;
if (alloc != 0) xmlFree(attvalue); if (alloc != 0) xmlFree(attvalue);
SKIP_BLANKS; SKIP_BLANKS;
if (ctxt->input->base != base) goto base_changed;
continue; continue;
} }

2
result/att8 Normal file
View File

@ -0,0 +1,2 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<ino:response xmlns:ino="http://namespaces.softwareag.com/tamino/response2" xmlns:xql="http://metalab.unc.edu/xql/" ino:sessionid="556" ino:sessionkey="1590469677"><xql:query>/bsk:DocPart[@docId='20040308152601345236' and @docPartNo=1]</xql:query><ino:message ino:returnvalue="0"><ino:messageline>XQL Request processing</ino:messageline></ino:message><xql:result><bsk:DocPart xmlns:bsk="http://www.heitec.net/sara4/tamino/basket" docId="20040308152601345236" docPartNo="1" ino:id="15290"><bsk:File name="4898WPZEO2M65" size="75195"> </bsk:File></bsk:DocPart></xql:result><ino:message ino:returnvalue="0"><ino:messageline>XQL Request processed</ino:messageline></ino:message></ino:response>

22
result/att8.rdr Normal file
View File

@ -0,0 +1,22 @@
0 1 ino:response 0 0
1 1 xql:query 0 0
2 3 #text 0 1 /bsk:DocPart[@docId='20040308152601345236' and @docPartNo=1]
1 15 xql:query 0 0
1 1 ino:message 0 0
2 1 ino:messageline 0 0
3 3 #text 0 1 XQL Request processing
2 15 ino:messageline 0 0
1 15 ino:message 0 0
1 1 xql:result 0 0
2 1 bsk:DocPart 0 0
3 1 bsk:File 0 0
4 14 #text 0 1
3 15 bsk:File 0 0
2 15 bsk:DocPart 0 0
1 15 xql:result 0 0
1 1 ino:message 0 0
2 1 ino:messageline 0 0
3 3 #text 0 1 XQL Request processed
2 15 ino:messageline 0 0
1 15 ino:message 0 0
0 15 ino:response 0 0

31
result/att8.sax Normal file
View File

@ -0,0 +1,31 @@
SAX.setDocumentLocator()
SAX.startDocument()
SAX.startElement(ino:response, xmlns:ino='http://namespaces.softwareag.com/tamino/response2', xmlns:xql='http://metalab.unc.edu/xql/', ino:sessionid='556', ino:sessionkey='1590469677')
SAX.startElement(xql:query)
SAX.characters(/bsk:DocPart[@docId=, 20)
SAX.getEntity(apos)
SAX.characters(', 1)
SAX.characters(20040308152601345236, 20)
SAX.getEntity(apos)
SAX.characters(', 1)
SAX.characters( and @docPartNo=1], 18)
SAX.endElement(xql:query)
SAX.startElement(ino:message, ino:returnvalue='0')
SAX.startElement(ino:messageline)
SAX.characters(XQL Request processing, 22)
SAX.endElement(ino:messageline)
SAX.endElement(ino:message)
SAX.startElement(xql:result)
SAX.startElement(bsk:DocPart, docId='20040308152601345236', docPartNo='1', ino:id='15290', xmlns:bsk='http://www.heitec.net/sara4/tamino/basket')
SAX.startElement(bsk:File, name='4898WPZEO2M65', size='75195')
SAX.characters( , 1)
SAX.endElement(bsk:File)
SAX.endElement(bsk:DocPart)
SAX.endElement(xql:result)
SAX.startElement(ino:message, ino:returnvalue='0')
SAX.startElement(ino:messageline)
SAX.characters(XQL Request processed, 21)
SAX.endElement(ino:messageline)
SAX.endElement(ino:message)
SAX.endElement(ino:response)
SAX.endDocument()

2
result/noent/att8 Normal file
View File

@ -0,0 +1,2 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<ino:response xmlns:ino="http://namespaces.softwareag.com/tamino/response2" xmlns:xql="http://metalab.unc.edu/xql/" ino:sessionid="556" ino:sessionkey="1590469677"><xql:query>/bsk:DocPart[@docId='20040308152601345236' and @docPartNo=1]</xql:query><ino:message ino:returnvalue="0"><ino:messageline>XQL Request processing</ino:messageline></ino:message><xql:result><bsk:DocPart xmlns:bsk="http://www.heitec.net/sara4/tamino/basket" docId="20040308152601345236" docPartNo="1" ino:id="15290"><bsk:File name="4898WPZEO2M65" size="75195"> </bsk:File></bsk:DocPart></xql:result><ino:message ino:returnvalue="0"><ino:messageline>XQL Request processed</ino:messageline></ino:message></ino:response>

1
test/att8 Normal file
View File

@ -0,0 +1 @@
<?xml version="1.0" encoding="ISO-8859-1"?><ino:response xmlns:ino="http://namespaces.softwareag.com/tamino/response2" xmlns:xql="http://metalab.unc.edu/xql/" ino:sessionid="556" ino:sessionkey="1590469677"><xql:query>/bsk:DocPart[@docId=&apos;20040308152601345236&apos; and @docPartNo=1]</xql:query><ino:message ino:returnvalue="0"><ino:messageline>XQL Request processing</ino:messageline></ino:message><xql:result><bsk:DocPart docId="20040308152601345236" docPartNo="1" ino:id="15290" xmlns:bsk="http://www.heitec.net/sara4/tamino/basket"><bsk:File name="4898WPZEO2M65" size="75195"> </bsk:File></bsk:DocPart></xql:result><ino:message ino:returnvalue="0"><ino:messageline>XQL Request processed</ino:messageline></ino:message></ino:response>