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
77b7323b
Commit
77b7323b
authored
Oct 28, 2010
by
Adam Martinson
Committed by
Alexandre Julliard
Oct 29, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msxml3: Fix XSLPattern namespace handling.
parent
6241b9d6
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
15 additions
and
21 deletions
+15
-21
queryresult.c
dlls/msxml3/queryresult.c
+3
-3
domdoc.c
dlls/msxml3/tests/domdoc.c
+8
-17
xslpattern.h
dlls/msxml3/xslpattern.h
+2
-0
xslpattern.l
dlls/msxml3/xslpattern.l
+2
-1
xslpattern.y
dlls/msxml3/xslpattern.y
+0
-0
No files found.
dlls/msxml3/queryresult.c
View file @
77b7323b
...
...
@@ -53,7 +53,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(msxml);
int
registerNamespaces
(
xmlXPathContextPtr
ctxt
);
BOOL
is_xpathmode
(
const
xmlDocPtr
doc
);
xmlChar
*
XSLPattern_to_XPath
(
xmlChar
const
*
xslpat_str
);
xmlChar
*
XSLPattern_to_XPath
(
xml
XPathContextPtr
ctxt
,
xml
Char
const
*
xslpat_str
);
typedef
struct
_queryresult
{
...
...
@@ -393,7 +393,7 @@ void XSLPattern_invalid(xmlXPathParserContextPtr pctx, int nargs)
#define XSLPATTERN_CHECK_ARGS(n) \
if (nargs != n) { \
FIXME("XSLPattern syntax error: Expected
0 arguments, got %i\n"
, nargs); \
FIXME("XSLPattern syntax error: Expected
%i arguments, got %i\n", n
, nargs); \
XSLPattern_invalid(pctx, nargs); \
return; \
}
...
...
@@ -531,7 +531,7 @@ HRESULT queryresult_create(xmlNodePtr node, LPCWSTR szQuery, IXMLDOMNodeList **o
xmlChar
*
tmp
;
int
len
;
WARN
(
"Attempting XSLPattern emulation (experimental).
\n
"
);
tmp
=
XSLPattern_to_XPath
(
str
);
tmp
=
XSLPattern_to_XPath
(
ctxt
,
str
);
len
=
(
xmlStrlen
(
tmp
)
+
1
)
*
sizeof
(
xmlChar
);
str
=
heap_realloc
(
str
,
len
);
memcpy
(
str
,
tmp
,
len
);
...
...
dlls/msxml3/tests/domdoc.c
View file @
77b7323b
...
...
@@ -6487,36 +6487,27 @@ static void test_XSLPattern(void)
list
=
NULL
;
/* prefixes don't need to be registered, you may use them as they are in the doc */
todo_wine
ole_check
(
IXMLDOMDocument2_selectNodes
(
doc
,
_bstr_
(
"//bar:x"
),
&
list
));
if
(
list
)
{
ole_check
(
IXMLDOMDocument2_selectNodes
(
doc
,
_bstr_
(
"//bar:x"
),
&
list
));
len
=
0
;
ole_check
(
IXMLDOMNodeList_get_length
(
list
,
&
len
));
todo_wine
ok
(
len
!=
0
,
"expected filled list
\n
"
);
ok
(
len
!=
0
,
"expected filled list
\n
"
);
if
(
len
)
todo_wine
expect_list_and_release
(
list
,
"E5.E1.E4.E1.E2.D1 E6.E2.E4.E1.E2.D1"
);
}
expect_list_and_release
(
list
,
"E5.E1.E4.E1.E2.D1 E6.E2.E4.E1.E2.D1"
);
/* prefixes must be explicitly specified in the name */
todo_wine
ole_check
(
IXMLDOMDocument2_selectNodes
(
doc
,
_bstr_
(
"//foo:elem"
),
&
list
));
if
(
list
)
{
ole_check
(
IXMLDOMDocument2_selectNodes
(
doc
,
_bstr_
(
"//foo:elem"
),
&
list
));
len
=
0
;
ole_check
(
IXMLDOMNodeList_get_length
(
list
,
&
len
));
todo_wine
ok
(
len
==
0
,
"expected empty list
\n
"
);
ok
(
len
==
0
,
"expected empty list
\n
"
);
if
(
len
)
IXMLDOMNodeList_Release
(
list
);
}
todo_wine
ole_check
(
IXMLDOMDocument2_selectNodes
(
doc
,
_bstr_
(
"//foo:c"
),
&
list
));
if
(
list
)
{
ole_check
(
IXMLDOMDocument2_selectNodes
(
doc
,
_bstr_
(
"//foo:c"
),
&
list
));
len
=
0
;
ole_check
(
IXMLDOMNodeList_get_length
(
list
,
&
len
));
todo_wine
ok
(
len
!=
0
,
"expected filled list
\n
"
);
ok
(
len
!=
0
,
"expected filled list
\n
"
);
if
(
len
)
todo_wine
expect_list_and_release
(
list
,
"E3.E4.E2.D1"
);
}
expect_list_and_release
(
list
,
"E3.E4.E2.D1"
);
/* explicitly register prefix foo */
ole_check
(
IXMLDOMDocument2_setProperty
(
doc
,
_bstr_
(
"SelectionNamespaces"
),
_variantbstr_
(
"xmlns:foo='urn:uuid:86B2F87F-ACB6-45cd-8B77-9BDB92A01A29'"
)));
...
...
dlls/msxml3/xslpattern.h
View file @
77b7323b
...
...
@@ -33,9 +33,11 @@
#include <libxml/tree.h>
#include <libxml/xmlstring.h>
#include <libxml/xpath.h>
typedef
struct
_parser_param
{
void
*
yyscanner
;
xmlXPathContextPtr
ctx
;
xmlChar
const
*
in
;
int
pos
;
int
len
;
...
...
dlls/msxml3/xslpattern.l
View file @
77b7323b
...
...
@@ -151,11 +151,12 @@ ANY (.)
%%
xmlChar* XSLPattern_to_XPath(xmlChar const* xslpat_str)
xmlChar* XSLPattern_to_XPath(xml
XPathContextPtr ctxt, xml
Char const* xslpat_str)
{
parser_param p;
TRACE("(%s)\n", wine_dbgstr_a((char const*)xslpat_str));
memset(&p, 0, sizeof(parser_param));
p.ctx = ctxt;
p.in = xslpat_str;
p.len = xmlStrlen(xslpat_str);
...
...
dlls/msxml3/xslpattern.y
View file @
77b7323b
This diff is collapsed.
Click to expand it.
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