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
52c6c6a1
Commit
52c6c6a1
authored
Apr 14, 2014
by
Nikolay Sivov
Committed by
Alexandre Julliard
Apr 14, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msxml3: Fix transformation result output for stream and BSTR cases.
parent
7367c68c
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
10 additions
and
29 deletions
+10
-29
main.c
dlls/msxml3/main.c
+3
-0
msxml_private.h
dlls/msxml3/msxml_private.h
+1
-1
node.c
dlls/msxml3/node.c
+0
-0
stylesheet.c
dlls/msxml3/stylesheet.c
+3
-17
domdoc.c
dlls/msxml3/tests/domdoc.c
+3
-11
No files found.
dlls/msxml3/main.c
View file @
52c6c6a1
...
...
@@ -35,6 +35,7 @@
# ifdef HAVE_LIBXSLT_TRANSFORM_H
# include <libxslt/transform.h>
# endif
# include <libxslt/imports.h>
# include <libxslt/xsltutils.h>
# include <libxslt/variables.h>
# include <libxslt/xsltInternals.h>
...
...
@@ -171,6 +172,7 @@ DECL_FUNCPTR(xsltCleanupGlobals);
DECL_FUNCPTR
(
xsltFreeStylesheet
);
DECL_FUNCPTR
(
xsltFreeTransformContext
);
DECL_FUNCPTR
(
xsltNewTransformContext
);
DECL_FUNCPTR
(
xsltNextImport
);
DECL_FUNCPTR
(
xsltParseStylesheetDoc
);
DECL_FUNCPTR
(
xsltQuoteUserParams
);
DECL_FUNCPTR
(
xsltSaveResultTo
);
...
...
@@ -196,6 +198,7 @@ static void init_libxslt(void)
LOAD_FUNCPTR
(
xsltFreeStylesheet
,
1
);
LOAD_FUNCPTR
(
xsltFreeTransformContext
,
1
);
LOAD_FUNCPTR
(
xsltNewTransformContext
,
1
);
LOAD_FUNCPTR
(
xsltNextImport
,
1
);
LOAD_FUNCPTR
(
xsltParseStylesheetDoc
,
1
);
LOAD_FUNCPTR
(
xsltQuoteUserParams
,
1
);
LOAD_FUNCPTR
(
xsltSaveResultTo
,
1
);
...
...
dlls/msxml3/msxml_private.h
View file @
52c6c6a1
...
...
@@ -367,7 +367,7 @@ extern HRESULT node_get_text(const xmlnode*,BSTR*) DECLSPEC_HIDDEN;
extern
HRESULT
node_select_nodes
(
const
xmlnode
*
,
BSTR
,
IXMLDOMNodeList
**
)
DECLSPEC_HIDDEN
;
extern
HRESULT
node_select_singlenode
(
const
xmlnode
*
,
BSTR
,
IXMLDOMNode
**
)
DECLSPEC_HIDDEN
;
extern
HRESULT
node_transform_node
(
const
xmlnode
*
,
IXMLDOMNode
*
,
BSTR
*
)
DECLSPEC_HIDDEN
;
extern
HRESULT
node_transform_node_params
(
const
xmlnode
*
,
IXMLDOMNode
*
,
BSTR
*
,
const
struct
xslprocessor_params
*
)
DECLSPEC_HIDDEN
;
extern
HRESULT
node_transform_node_params
(
const
xmlnode
*
,
IXMLDOMNode
*
,
BSTR
*
,
IStream
*
,
const
struct
xslprocessor_params
*
)
DECLSPEC_HIDDEN
;
extern
HRESULT
node_create_supporterrorinfo
(
const
tid_t
*
,
void
**
)
DECLSPEC_HIDDEN
;
extern
HRESULT
get_domdoc_from_xmldoc
(
xmlDocPtr
xmldoc
,
IXMLDOMDocument3
**
document
)
DECLSPEC_HIDDEN
;
...
...
dlls/msxml3/node.c
View file @
52c6c6a1
This diff is collapsed.
Click to expand it.
dlls/msxml3/stylesheet.c
View file @
52c6c6a1
...
...
@@ -477,7 +477,7 @@ static HRESULT WINAPI xslprocessor_put_output(
WARN
(
"failed to get IStream from output, 0x%08x
\n
"
,
hr
);
break
;
default:
FIXME
(
"output type %d not handed
\n
"
,
V_VT
(
&
output
));
FIXME
(
"output type %d not hand
l
ed
\n
"
,
V_VT
(
&
output
));
hr
=
E_FAIL
;
}
...
...
@@ -530,22 +530,8 @@ static HRESULT WINAPI xslprocessor_transform(
if
(
!
ret
)
return
E_INVALIDARG
;
SysFreeString
(
This
->
outstr
);
hr
=
node_transform_node_params
(
get_node_obj
(
This
->
input
),
This
->
stylesheet
->
node
,
&
This
->
outstr
,
&
This
->
params
);
if
(
hr
==
S_OK
)
{
if
(
This
->
output
)
{
ULONG
len
=
0
;
/* output to stream */
hr
=
IStream_Write
(
This
->
output
,
This
->
outstr
,
SysStringByteLen
(
This
->
outstr
),
&
len
);
*
ret
=
len
==
SysStringByteLen
(
This
->
outstr
)
?
VARIANT_TRUE
:
VARIANT_FALSE
;
}
}
else
*
ret
=
VARIANT_FALSE
;
hr
=
node_transform_node_params
(
get_node_obj
(
This
->
input
),
This
->
stylesheet
->
node
,
&
This
->
outstr
,
This
->
output
,
&
This
->
params
);
*
ret
=
hr
==
S_OK
?
VARIANT_TRUE
:
VARIANT_FALSE
;
return
hr
;
#else
FIXME
(
"libxml2 is required but wasn't present at compile time
\n
"
);
...
...
dlls/msxml3/tests/domdoc.c
View file @
52c6c6a1
...
...
@@ -6121,7 +6121,7 @@ static void test_testTransforms(void)
ok
(
hr
==
S_OK
,
"ret %08x
\n
"
,
hr
);
if
(
hr
==
S_OK
)
{
ok
(
compareIgnoreReturns
(
bOut
,
_bstr_
(
szTransformOutput
)),
"
Stylesheet output not correct
\n
"
);
ok
(
compareIgnoreReturns
(
bOut
,
_bstr_
(
szTransformOutput
)),
"
got output %s
\n
"
,
wine_dbgstr_w
(
bOut
)
);
SysFreeString
(
bOut
);
}
...
...
@@ -8471,7 +8471,7 @@ todo_wine {
hr
=
IXSLProcessor_get_output
(
processor
,
&
v
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
ok
(
V_VT
(
&
v
)
==
VT_BSTR
,
"got type %d
\n
"
,
V_VT
(
&
v
));
ok
(
lstrcmpW
(
V_BSTR
(
&
v
),
_bstr_
(
""
)
)
==
0
,
"got %s
\n
"
,
wine_dbgstr_w
(
V_BSTR
(
&
v
)));
ok
(
*
V_BSTR
(
&
v
)
==
0
,
"got %s
\n
"
,
wine_dbgstr_w
(
V_BSTR
(
&
v
)));
IXMLDOMDocument_Release
(
doc2
);
VariantClear
(
&
v
);
...
...
@@ -11695,12 +11695,6 @@ static const char omitxmldecl_doc[] =
" <item name=
\"
item2
\"
/>"
"</a>"
;
static
const
char
omitxmldecl_result
[]
=
"<node>item1</node><node>item2</node>"
;
static
const
char
omitxmldecl_result2
[]
=
"<node>item1</node><node>item2</node>
\n
"
;
static
void
test_xsltext
(
void
)
{
IXMLDOMDocument
*
doc
,
*
doc2
;
...
...
@@ -11730,9 +11724,7 @@ static void test_xsltext(void)
hr
=
IXMLDOMDocument_transformNode
(
doc2
,
(
IXMLDOMNode
*
)
doc
,
&
ret
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
/* Old enough libxslt places extra '\n' at the end of the output. */
ok
(
!
lstrcmpW
(
ret
,
_bstr_
(
omitxmldecl_result
))
||
!
lstrcmpW
(
ret
,
_bstr_
(
omitxmldecl_result2
)),
"transform result %s
\n
"
,
wine_dbgstr_w
(
ret
));
ok
(
!
lstrcmpW
(
ret
,
_bstr_
(
"<node>item1</node><node>item2</node>"
)),
"transform result %s
\n
"
,
wine_dbgstr_w
(
ret
));
SysFreeString
(
ret
);
IXMLDOMDocument_Release
(
doc2
);
...
...
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