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
239d8077
Commit
239d8077
authored
May 13, 2014
by
Nikolay Sivov
Committed by
Alexandre Julliard
May 13, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msxml3: Support 'any attribute' selection [@*] in XSLPattern predicates.
parent
9e3d103d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
7 deletions
+25
-7
domdoc.c
dlls/msxml3/tests/domdoc.c
+20
-7
xslpattern.y
dlls/msxml3/xslpattern.y
+5
-0
No files found.
dlls/msxml3/tests/domdoc.c
View file @
239d8077
...
...
@@ -494,7 +494,7 @@ static const char szExampleXML[] =
" </description>
\n
"
" </elem>
\n
"
"
\n
"
" <elem>
\n
"
" <elem
a='a'
>
\n
"
" <a>A2 field</a>
\n
"
" <b>B2 field</b>
\n
"
" <c type=
\"
old
\"
>C2 field</c>
\n
"
...
...
@@ -1074,14 +1074,16 @@ static char *list_to_string(IXMLDOMNodeList *list)
static
char
buf
[
4096
];
char
*
pos
=
buf
;
LONG
len
=
0
;
HRESULT
hr
;
int
i
;
if
(
list
==
NULL
)
{
lstrcpyA
(
buf
,
"(null)"
);
strcpy
(
buf
,
"(null)"
);
return
buf
;
}
ole_check
(
IXMLDOMNodeList_get_length
(
list
,
&
len
));
hr
=
IXMLDOMNodeList_get_length
(
list
,
&
len
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
for
(
i
=
0
;
i
<
len
;
i
++
)
{
IXMLDOMNode
*
node
;
...
...
@@ -4449,12 +4451,13 @@ static const xpath_test_t xpath_test[] = {
{
"child::node()"
,
"E1.E2.D1 E2.E2.D1 E3.E2.D1 E4.E2.D1"
},
{
"child::text()"
,
""
},
{
"child::*/.."
,
"E2.D1"
},
{
"child::*//@*/.."
,
"E2.E5.E1.E2.D1 E3.E2.E2.D1"
},
{
"child::*//@*/.."
,
"E2.E5.E1.E2.D1 E
2.E2.D1 E
3.E2.E2.D1"
},
{
"self::node()"
,
"E2.D1"
},
{
"ancestor::node()"
,
"D1"
},
{
"elem[c][last()]/a"
,
"E1.E2.E2.D1"
},
{
"ancestor-or-self::node()[1]"
,
"E2.D1"
},
{
"((//a)[1])[last()]"
,
"E1.E1.E2.D1"
},
{
"//elem[@*]"
,
"E2.E2.D1"
},
{
NULL
}
};
...
...
@@ -4517,7 +4520,7 @@ static void test_XPath(void)
str
=
list_to_string
(
list
);
ok
(
strcmp
(
str
,
xptest
->
list
)
==
0
,
"query=%s, invalid node list: %s, expected %s
\n
"
,
ok
(
!
strcmp
(
str
,
xptest
->
list
),
"query=%s, invalid node list:
\"
%s
\"
, expected
\"
%s
\"
\n
"
,
xptest
->
query
,
str
,
xptest
->
list
);
if
(
list
)
...
...
@@ -6838,6 +6841,7 @@ static void test_default_properties(void)
typedef
struct
{
const
char
*
query
;
const
char
*
list
;
BOOL
todo
;
}
xslpattern_test_t
;
static
const
xslpattern_test_t
xslpattern_test
[]
=
{
...
...
@@ -6900,6 +6904,7 @@ static const xslpattern_test_t xslpattern_test[] = {
{
"root/elem[index()>0 $and$ $not$ end()]"
,
"E2.E2.D1 E3.E2.D1"
},
{
"root/elem[index()>0 && $not$ end()]"
,
"E2.E2.D1 E3.E2.D1"
},
{
"root/elem[d]"
,
"E1.E2.D1 E2.E2.D1 E4.E2.D1"
},
{
"root/elem[@*]"
,
"E2.E2.D1 E3.E2.D1"
,
TRUE
},
{
NULL
}
};
...
...
@@ -6977,8 +6982,16 @@ static void test_XSLPattern(void)
len
=
0
;
hr
=
IXMLDOMNodeList_get_length
(
list
,
&
len
);
ok
(
len
!=
0
,
"query=%s, empty list
\n
"
,
ptr
->
query
);
if
(
len
)
expect_list_and_release
(
list
,
ptr
->
list
);
if
(
len
)
{
if
(
ptr
->
todo
)
{
char
*
str
=
list_to_string
(
list
);
todo_wine
ok
(
!
strcmp
(
str
,
ptr
->
list
),
"Invalid node list: %s, expected %s
\n
"
,
str
,
ptr
->
list
);
IXMLDOMNodeList_Release
(
list
);
}
else
expect_list_and_release
(
list
,
ptr
->
list
);
}
ptr
++
;
}
...
...
dlls/msxml3/xslpattern.y
View file @
239d8077
...
...
@@ -186,6 +186,11 @@ static void xslpattern_error(parser_param* param, void const* scanner, char cons
$$=xmlStrcat($$,$2);
xmlFree($2);
}
| '@' '*'
{
TRACE("Got All attributes pattern: \"@*\"\n");
$$=xmlStrdup(U("@*"));
}
;
/* [2.3] Node Tests */
...
...
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