msxml3: Use expected/actual sequence concept for reader tests including attributes tests.
This commit is contained in:
parent
8a8ba19eaf
commit
bcd858547b
|
@ -371,7 +371,7 @@ static BSTR find_element_uri(saxlocator *locator, const xmlChar *uri)
|
||||||
/* used to localize version dependent error check behaviour */
|
/* used to localize version dependent error check behaviour */
|
||||||
static inline BOOL sax_callback_failed(saxlocator *This, HRESULT hr)
|
static inline BOOL sax_callback_failed(saxlocator *This, HRESULT hr)
|
||||||
{
|
{
|
||||||
return This->saxreader->version >= MSXML6 ? FAILED(hr) : hr != S_OK;
|
return This->saxreader->version >= MSXML4 ? FAILED(hr) : hr != S_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* index value -1 means it tries to loop for a first time */
|
/* index value -1 means it tries to loop for a first time */
|
||||||
|
@ -1158,7 +1158,7 @@ static void libxmlStartDocument(void *ctx)
|
||||||
saxlocator *This = ctx;
|
saxlocator *This = ctx;
|
||||||
HRESULT hr;
|
HRESULT hr;
|
||||||
|
|
||||||
if(This->saxreader->version >= MSXML6)
|
if (This->saxreader->version >= MSXML4)
|
||||||
{
|
{
|
||||||
const xmlChar *p = This->pParserCtxt->input->cur-1;
|
const xmlChar *p = This->pParserCtxt->input->cur-1;
|
||||||
update_position(This, FALSE);
|
update_position(This, FALSE);
|
||||||
|
@ -1190,7 +1190,7 @@ static void libxmlEndDocument(void *ctx)
|
||||||
saxlocator *This = ctx;
|
saxlocator *This = ctx;
|
||||||
HRESULT hr;
|
HRESULT hr;
|
||||||
|
|
||||||
if(This->saxreader->version >= MSXML6) {
|
if (This->saxreader->version >= MSXML4) {
|
||||||
update_position(This, FALSE);
|
update_position(This, FALSE);
|
||||||
if(This->column > 1)
|
if(This->column > 1)
|
||||||
This->line++;
|
This->line++;
|
||||||
|
@ -1232,7 +1232,7 @@ static void libxmlStartElementNS(
|
||||||
update_position(This, TRUE);
|
update_position(This, TRUE);
|
||||||
if(*(This->pParserCtxt->input->cur) == '/')
|
if(*(This->pParserCtxt->input->cur) == '/')
|
||||||
This->column++;
|
This->column++;
|
||||||
if(This->saxreader->version < MSXML6)
|
if(This->saxreader->version < MSXML4)
|
||||||
This->column++;
|
This->column++;
|
||||||
|
|
||||||
element = alloc_element_entry(localname, prefix, nb_namespaces, namespaces);
|
element = alloc_element_entry(localname, prefix, nb_namespaces, namespaces);
|
||||||
|
@ -1301,7 +1301,8 @@ static void libxmlEndElementNS(
|
||||||
|
|
||||||
update_position(This, FALSE);
|
update_position(This, FALSE);
|
||||||
p = This->pParserCtxt->input->cur;
|
p = This->pParserCtxt->input->cur;
|
||||||
if(This->saxreader->version >= MSXML6)
|
|
||||||
|
if (This->saxreader->version >= MSXML4)
|
||||||
{
|
{
|
||||||
p--;
|
p--;
|
||||||
while(p>This->pParserCtxt->input->base && *p!='>')
|
while(p>This->pParserCtxt->input->base && *p!='>')
|
||||||
|
@ -1418,7 +1419,7 @@ static void libxmlCharacters(
|
||||||
end++;
|
end++;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(This->saxreader->version >= MSXML6)
|
if (This->saxreader->version >= MSXML4)
|
||||||
{
|
{
|
||||||
xmlChar *p;
|
xmlChar *p;
|
||||||
|
|
||||||
|
@ -1454,7 +1455,7 @@ static void libxmlCharacters(
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(This->saxreader->version < MSXML6)
|
if (This->saxreader->version < MSXML4)
|
||||||
This->column += end-cur;
|
This->column += end-cur;
|
||||||
|
|
||||||
if(lastEvent)
|
if(lastEvent)
|
||||||
|
@ -2022,7 +2023,7 @@ static HRESULT SAXLocator_create(saxreader *reader, saxlocator **ppsaxlocator, B
|
||||||
locator->pParserCtxt = NULL;
|
locator->pParserCtxt = NULL;
|
||||||
locator->publicId = NULL;
|
locator->publicId = NULL;
|
||||||
locator->systemId = NULL;
|
locator->systemId = NULL;
|
||||||
locator->line = (reader->version>=MSXML6 ? 1 : 0);
|
locator->line = reader->version < MSXML4 ? 0 : 1;
|
||||||
locator->column = 0;
|
locator->column = 0;
|
||||||
locator->ret = S_OK;
|
locator->ret = S_OK;
|
||||||
if (locator->saxreader->version >= MSXML6)
|
if (locator->saxreader->version >= MSXML6)
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue