Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
3697bd9a
Commit
3697bd9a
authored
Mar 08, 2017
by
Nikolay Sivov
Committed by
Alexandre Julliard
Mar 08, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
xmllite/reader: Return empty string for namespace uri for some nodes.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
63c489fa
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
31 additions
and
1 deletion
+31
-1
reader.c
dlls/xmllite/reader.c
+9
-0
reader.c
dlls/xmllite/tests/reader.c
+22
-1
No files found.
dlls/xmllite/reader.c
View file @
3697bd9a
...
...
@@ -3011,6 +3011,15 @@ static HRESULT WINAPI xmlreader_GetNamespaceUri(IXmlReader* iface, const WCHAR *
}
}
break
;
case
XmlNodeType_Text
:
case
XmlNodeType_CDATA
:
case
XmlNodeType_ProcessingInstruction
:
case
XmlNodeType_Comment
:
case
XmlNodeType_Whitespace
:
case
XmlNodeType_XmlDeclaration
:
*
uri
=
emptyW
;
*
len
=
0
;
break
;
default:
FIXME
(
"Unhandled node type %d
\n
"
,
nodetype
);
return
E_NOTIMPL
;
...
...
dlls/xmllite/tests/reader.c
View file @
3697bd9a
...
...
@@ -2116,6 +2116,18 @@ static void test_namespaceuri(void)
{
"defns a"
,
"ns r"
,
"defns a"
}},
{
"<a><b><c/></b></a>"
,
{
""
,
""
,
""
,
""
,
""
}},
{
"<a>text</a>"
,
{
""
,
""
,
""
}},
{
"<a>
\r\n
</a>"
,
{
""
,
""
,
""
}},
{
"<a><![CDATA[data]]></a>"
,
{
""
,
""
,
""
}},
{
"<?xml version=
\"
1.0
\"
?><a/>"
,
{
""
,
""
}},
{
"<a><?pi ?></a>"
,
{
""
,
""
,
""
}},
{
"<a><!-- comment --></a>"
,
{
""
,
""
,
""
}},
};
IXmlReader
*
reader
;
XmlNodeType
type
;
...
...
@@ -2137,13 +2149,22 @@ static void test_namespaceuri(void)
const
WCHAR
*
uri
,
*
local
;
WCHAR
*
uriW
;
ok
(
type
==
XmlNodeType_Element
||
type
==
XmlNodeType_EndElement
,
"Unexpected node type %d.
\n
"
,
type
);
ok
(
type
==
XmlNodeType_Element
||
type
==
XmlNodeType_Text
||
type
==
XmlNodeType_CDATA
||
type
==
XmlNodeType_ProcessingInstruction
||
type
==
XmlNodeType_Comment
||
type
==
XmlNodeType_Whitespace
||
type
==
XmlNodeType_EndElement
||
type
==
XmlNodeType_XmlDeclaration
,
"Unexpected node type %d.
\n
"
,
type
);
hr
=
IXmlReader_GetLocalName
(
reader
,
&
local
,
NULL
);
ok
(
hr
==
S_OK
,
"S_OK, got %08x
\n
"
,
hr
);
uri
=
NULL
;
hr
=
IXmlReader_GetNamespaceUri
(
reader
,
&
uri
,
NULL
);
ok
(
hr
==
S_OK
,
"S_OK, got %08x
\n
"
,
hr
);
ok
(
uri
!=
NULL
,
"Unexpected NULL uri pointer
\n
"
);
uriW
=
a2w
(
uri_tests
[
i
].
uri
[
j
]);
ok
(
!
lstrcmpW
(
uriW
,
uri
),
"%s: uri %s
\n
"
,
wine_dbgstr_w
(
local
),
wine_dbgstr_w
(
uri
));
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment