Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
7a00f31e
Commit
7a00f31e
authored
Nov 16, 2012
by
Nikolay Sivov
Committed by
Alexandre Julliard
Nov 16, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msxml3: Stub support for external entity resolver.
parent
a644bad2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
32 additions
and
26 deletions
+32
-26
saxreader.c
dlls/msxml3/saxreader.c
+23
-26
saxreader.c
dlls/msxml3/tests/saxreader.c
+9
-0
No files found.
dlls/msxml3/saxreader.c
View file @
7a00f31e
...
...
@@ -168,6 +168,7 @@ enum saxhandler_type
SAXContentHandler
=
0
,
SAXDeclHandler
,
SAXDTDHandler
,
SAXEntityResolver
,
SAXErrorHandler
,
SAXLexicalHandler
,
SAXHandler_Last
...
...
@@ -197,10 +198,17 @@ struct saxlexicalhandler_iface
IVBSAXLexicalHandler
*
vbhandler
;
};
struct
saxentityresolver_iface
{
ISAXEntityResolver
*
handler
;
IVBSAXEntityResolver
*
vbhandler
;
};
struct
saxhandler_iface
{
union
{
struct
saxcontenthandler_iface
content
;
struct
saxentityresolver_iface
entityresolver
;
struct
saxerrorhandler_iface
error
;
struct
saxlexicalhandler_iface
lexical
;
struct
saxanyhandler_iface
anyhandler
;
...
...
@@ -1843,6 +1851,12 @@ static void libxmlCDataBlock(void *ctx, const xmlChar *value, int len)
This
->
column
+=
4
+
end
-
cur
;
}
static
xmlParserInputPtr
libxmlresolveentity
(
void
*
ctx
,
const
xmlChar
*
publicid
,
const
xmlChar
*
systemid
)
{
FIXME
(
"entity resolving not implemented, %s, %s
\n
"
,
publicid
,
systemid
);
return
xmlSAX2ResolveEntity
(
ctx
,
publicid
,
systemid
);
}
/*** IVBSAXLocator interface ***/
/*** IUnknown methods ***/
static
HRESULT
WINAPI
ivbsaxlocator_QueryInterface
(
IVBSAXLocator
*
iface
,
REFIID
riid
,
void
**
ppvObject
)
...
...
@@ -2377,24 +2391,6 @@ static HRESULT internal_parseStream(saxreader *This, ISequentialStream *stream,
return
hr
;
}
static
HRESULT
internal_getEntityResolver
(
saxreader
*
This
,
void
*
pEntityResolver
,
BOOL
vbInterface
)
{
FIXME
(
"(%p)->(%p) stub
\n
"
,
This
,
pEntityResolver
);
return
E_NOTIMPL
;
}
static
HRESULT
internal_putEntityResolver
(
saxreader
*
This
,
void
*
pEntityResolver
,
BOOL
vbInterface
)
{
FIXME
(
"(%p)->(%p) stub
\n
"
,
This
,
pEntityResolver
);
return
E_NOTIMPL
;
}
static
HRESULT
internal_parse
(
saxreader
*
This
,
VARIANT
varInput
,
...
...
@@ -2877,18 +2873,18 @@ static HRESULT WINAPI saxxmlreader_putProperty(
static
HRESULT
WINAPI
saxxmlreader_get_entityResolver
(
IVBSAXXMLReader
*
iface
,
IVBSAXEntityResolver
**
pEntityR
esolver
)
IVBSAXEntityResolver
**
r
esolver
)
{
saxreader
*
This
=
impl_from_IVBSAXXMLReader
(
iface
);
return
internal_getEntityResolver
(
This
,
pEntityResolver
,
TRUE
);
return
saxreader_get_handler
(
This
,
SAXEntityResolver
,
TRUE
,
(
void
**
)
resolver
);
}
static
HRESULT
WINAPI
saxxmlreader_put_entityResolver
(
IVBSAXXMLReader
*
iface
,
IVBSAXEntityResolver
*
pEntityR
esolver
)
IVBSAXEntityResolver
*
r
esolver
)
{
saxreader
*
This
=
impl_from_IVBSAXXMLReader
(
iface
);
return
internal_putEntityResolver
(
This
,
pEntityR
esolver
,
TRUE
);
return
saxreader_put_handler
(
This
,
SAXEntityResolver
,
r
esolver
,
TRUE
);
}
static
HRESULT
WINAPI
saxxmlreader_get_contentHandler
(
...
...
@@ -3084,18 +3080,18 @@ static HRESULT WINAPI isaxxmlreader_putProperty(
static
HRESULT
WINAPI
isaxxmlreader_getEntityResolver
(
ISAXXMLReader
*
iface
,
ISAXEntityResolver
**
ppEntityR
esolver
)
ISAXEntityResolver
**
r
esolver
)
{
saxreader
*
This
=
impl_from_ISAXXMLReader
(
iface
);
return
internal_getEntityResolver
(
This
,
ppEntityResolver
,
FALSE
);
return
saxreader_get_handler
(
This
,
SAXEntityResolver
,
FALSE
,
(
void
**
)
resolver
);
}
static
HRESULT
WINAPI
isaxxmlreader_putEntityResolver
(
ISAXXMLReader
*
iface
,
ISAXEntityResolver
*
pEntityR
esolver
)
ISAXEntityResolver
*
r
esolver
)
{
saxreader
*
This
=
impl_from_ISAXXMLReader
(
iface
);
return
internal_putEntityResolver
(
This
,
pEntityR
esolver
,
FALSE
);
return
saxreader_put_handler
(
This
,
SAXEntityResolver
,
r
esolver
,
FALSE
);
}
static
HRESULT
WINAPI
isaxxmlreader_getContentHandler
(
...
...
@@ -3264,6 +3260,7 @@ HRESULT SAXXMLReader_create(MSXML_VERSION version, IUnknown *outer, LPVOID *ppOb
reader
->
sax
.
error
=
libxmlFatalError
;
reader
->
sax
.
fatalError
=
libxmlFatalError
;
reader
->
sax
.
cdataBlock
=
libxmlCDataBlock
;
reader
->
sax
.
resolveEntity
=
libxmlresolveentity
;
*
ppObj
=
&
reader
->
IVBSAXXMLReader_iface
;
...
...
dlls/msxml3/tests/saxreader.c
View file @
7a00f31e
...
...
@@ -1903,6 +1903,7 @@ static void test_saxreader(void)
while
(
table
->
clsid
)
{
struct
call_entry
*
test_seq
;
ISAXEntityResolver
*
resolver
;
BSTR
str
;
if
(
!
is_clsid_supported
(
table
->
clsid
,
reader_support_data
))
...
...
@@ -2220,6 +2221,14 @@ static void test_saxreader(void)
EXPECT_HR
(
hr
,
S_OK
);
ok_sequence
(
sequences
,
CONTENT_HANDLER_INDEX
,
test_seq
,
"attribute value normalization"
,
TRUE
);
resolver
=
(
void
*
)
0xdeadbeef
;
hr
=
ISAXXMLReader_getEntityResolver
(
reader
,
&
resolver
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
ok
(
resolver
==
NULL
,
"got %p
\n
"
,
resolver
);
hr
=
ISAXXMLReader_putEntityResolver
(
reader
,
NULL
);
ok
(
hr
==
S_OK
||
broken
(
hr
==
E_FAIL
),
"got 0x%08x
\n
"
,
hr
);
ISAXXMLReader_Release
(
reader
);
table
++
;
}
...
...
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