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
2a5b3755
Commit
2a5b3755
authored
Aug 30, 2010
by
Nikolay Sivov
Committed by
Alexandre Julliard
Aug 30, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msxml3: Dump namespace aliases passed with SelectionNamespaces property.
parent
fd350842
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
38 additions
and
17 deletions
+38
-17
domdoc.c
dlls/msxml3/domdoc.c
+21
-12
domdoc.c
dlls/msxml3/tests/domdoc.c
+17
-5
No files found.
dlls/msxml3/domdoc.c
View file @
2a5b3755
...
...
@@ -58,10 +58,11 @@ WINE_DEFAULT_DEBUG_CHANNEL(msxml);
#define XML_SAVE_AS_XML 32
#define XML_SAVE_AS_HTML 64
static
const
WCHAR
SZ_PROPERTY_SELECTION_LANGUAGE
[]
=
{
'S'
,
'e'
,
'l'
,
'e'
,
'c'
,
't'
,
'i'
,
'o'
,
'n'
,
'L'
,
'a'
,
'n'
,
'g'
,
'u'
,
'a'
,
'g'
,
'e'
,
0
};
static
const
WCHAR
SZ_PROPERTY_PROHIBIT_DTD
[]
=
{
'P'
,
'r'
,
'o'
,
'h'
,
'i'
,
'b'
,
'i'
,
't'
,
'D'
,
'T'
,
'D'
,
0
};
static
const
WCHAR
SZ_VALUE_XPATH
[]
=
{
'X'
,
'P'
,
'a'
,
't'
,
'h'
,
0
};
static
const
WCHAR
SZ_VALUE_XSLPATTERN
[]
=
{
'X'
,
'S'
,
'L'
,
'P'
,
'a'
,
't'
,
't'
,
'e'
,
'r'
,
'n'
,
0
};
static
const
WCHAR
PropertySelectionLanguageW
[]
=
{
'S'
,
'e'
,
'l'
,
'e'
,
'c'
,
't'
,
'i'
,
'o'
,
'n'
,
'L'
,
'a'
,
'n'
,
'g'
,
'u'
,
'a'
,
'g'
,
'e'
,
0
};
static
const
WCHAR
PropertySelectionNamespacesW
[]
=
{
'S'
,
'e'
,
'l'
,
'e'
,
'c'
,
't'
,
'i'
,
'o'
,
'n'
,
'N'
,
'a'
,
'm'
,
'e'
,
's'
,
'p'
,
'a'
,
'c'
,
'e'
,
's'
,
0
};
static
const
WCHAR
PropertyProhibitDTDW
[]
=
{
'P'
,
'r'
,
'o'
,
'h'
,
'i'
,
'b'
,
'i'
,
't'
,
'D'
,
'T'
,
'D'
,
0
};
static
const
WCHAR
PropValueXPathW
[]
=
{
'X'
,
'P'
,
'a'
,
't'
,
'h'
,
0
};
static
const
WCHAR
PropValueXSLPatternW
[]
=
{
'X'
,
'S'
,
'L'
,
'P'
,
'a'
,
't'
,
't'
,
'e'
,
'r'
,
'n'
,
0
};
typedef
struct
_domdoc
{
...
...
@@ -1736,9 +1737,9 @@ static HRESULT WINAPI domdoc_loadXML(
{
domdoc
*
This
=
impl_from_IXMLDOMDocument3
(
iface
);
xmlDocPtr
xmldoc
=
NULL
;
HRESULT
hr
=
S_FALSE
,
hr2
;
char
*
str
;
int
len
;
HRESULT
hr
=
S_FALSE
,
hr2
;
TRACE
(
"(%p)->(%s %p)
\n
"
,
This
,
debugstr_w
(
bstrXML
),
isSuccessful
);
...
...
@@ -1758,6 +1759,7 @@ static HRESULT WINAPI domdoc_loadXML(
{
hr
=
This
->
error
=
S_OK
;
*
isSuccessful
=
VARIANT_TRUE
;
TRACE
(
"parsed document %p
\n
"
,
xmldoc
);
}
}
}
...
...
@@ -2043,7 +2045,7 @@ static HRESULT WINAPI domdoc_setProperty(
TRACE
(
"(%p)->(%s)
\n
"
,
This
,
debugstr_w
(
p
));
if
(
lstrcmpiW
(
p
,
SZ_PROPERTY_SELECTION_LANGUAGE
)
==
0
)
if
(
lstrcmpiW
(
p
,
PropertySelectionLanguageW
)
==
0
)
{
VARIANT
varStr
;
HRESULT
hr
;
...
...
@@ -2060,9 +2062,9 @@ static HRESULT WINAPI domdoc_setProperty(
bstr
=
V_BSTR
(
&
var
);
hr
=
S_OK
;
if
(
lstrcmpiW
(
bstr
,
SZ_VALUE_XPATH
)
==
0
)
if
(
lstrcmpiW
(
bstr
,
PropValueXPathW
)
==
0
)
This
->
bUseXPath
=
TRUE
;
else
if
(
lstrcmpiW
(
bstr
,
SZ_VALUE_XSLPATTERN
)
==
0
)
else
if
(
lstrcmpiW
(
bstr
,
PropValueXSLPatternW
)
==
0
)
This
->
bUseXPath
=
FALSE
;
else
hr
=
E_FAIL
;
...
...
@@ -2070,12 +2072,18 @@ static HRESULT WINAPI domdoc_setProperty(
VariantClear
(
&
varStr
);
return
hr
;
}
else
if
(
lstrcmpiW
(
p
,
SZ_PROPERTY_PROHIBIT_DTD
)
==
0
)
else
if
(
lstrcmpiW
(
p
,
PropertyProhibitDTDW
)
==
0
)
{
/* Ignore */
FIXME
(
"Ignoring property ProhibitDTD, value %d
\n
"
,
V_BOOL
(
&
var
));
return
S_OK
;
}
else
if
(
lstrcmpiW
(
p
,
PropertySelectionNamespacesW
)
==
0
)
{
if
(
V_VT
(
&
var
)
==
VT_BSTR
)
FIXME
(
"Unsupported SelectionNamespaces: %s
\n
"
,
wine_dbgstr_w
(
V_BSTR
(
&
var
)));
return
E_FAIL
;
}
FIXME
(
"Unknown property %s
\n
"
,
wine_dbgstr_w
(
p
));
return
E_FAIL
;
...
...
@@ -2092,13 +2100,14 @@ static HRESULT WINAPI domdoc_getProperty(
if
(
var
==
NULL
)
return
E_INVALIDARG
;
if
(
lstrcmpiW
(
p
,
SZ_PROPERTY_SELECTION_LANGUAGE
)
==
0
)
if
(
lstrcmpiW
(
p
,
PropertySelectionLanguageW
)
==
0
)
{
V_VT
(
var
)
=
VT_BSTR
;
if
(
This
->
bUseXPath
)
V_BSTR
(
var
)
=
SysAllocString
(
SZ_VALUE_XPATH
);
V_BSTR
(
var
)
=
SysAllocString
(
PropValueXPathW
);
else
V_BSTR
(
var
)
=
SysAllocString
(
SZ_VALUE_XSLPATTERN
);
V_BSTR
(
var
)
=
SysAllocString
(
PropValueXSLPatternW
);
return
S_OK
;
}
...
...
dlls/msxml3/tests/domdoc.c
View file @
2a5b3755
...
...
@@ -2868,14 +2868,15 @@ static void test_XMLHTTP(void)
static
void
test_IXMLDOMDocument2
(
void
)
{
HRESULT
r
;
VARIANT_BOOL
b
;
BSTR
str
;
IXMLDOMDocument
*
doc
;
static
const
WCHAR
emptyW
[]
=
{
0
};
IXMLDOMDocument2
*
doc2
;
IXMLDOMDocument
*
doc
;
IDispatchEx
*
dispex
;
VARIANT_BOOL
b
;
VARIANT
var
;
int
ref
;
HRESULT
r
;
LONG
ref
;
BSTR
str
;
r
=
CoCreateInstance
(
&
CLSID_DOMDocument
,
NULL
,
CLSCTX_INPROC_SERVER
,
&
IID_IXMLDOMDocument
,
(
LPVOID
*
)
&
doc
);
...
...
@@ -2928,6 +2929,17 @@ static void test_IXMLDOMDocument2(void)
ole_check
(
IXMLDOMDocument2_setProperty
(
doc2
,
_bstr_
(
"SelectionLanguage"
),
_variantbstr_
(
"XPath"
)));
ole_check
(
IXMLDOMDocument2_setProperty
(
doc2
,
_bstr_
(
"SelectionLanguage"
),
_variantbstr_
(
"XSLPattern"
)));
V_VT
(
&
var
)
=
VT_BSTR
;
V_BSTR
(
&
var
)
=
SysAllocString
(
emptyW
);
r
=
IXMLDOMDocument2_setProperty
(
doc2
,
_bstr_
(
"SelectionNamespaces"
),
var
);
todo_wine
ok
(
r
==
S_OK
,
"got 0x%08x
\n
"
,
r
);
VariantClear
(
&
var
);
V_VT
(
&
var
)
=
VT_I2
;
V_I2
(
&
var
)
=
0
;
r
=
IXMLDOMDocument2_setProperty
(
doc2
,
_bstr_
(
"SelectionNamespaces"
),
var
);
ok
(
r
==
E_FAIL
,
"got 0x%08x
\n
"
,
r
);
/* contrary to what MSDN claims you can switch back from XPath to XSLPattern */
ole_check
(
IXMLDOMDocument2_getProperty
(
doc2
,
_bstr_
(
"SelectionLanguage"
),
&
var
));
expect_eq
(
V_VT
(
&
var
),
VT_BSTR
,
int
,
"%x"
);
...
...
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