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
42ccbc51
Commit
42ccbc51
authored
Nov 02, 2010
by
Adam Martinson
Committed by
Alexandre Julliard
Nov 03, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msxml3: Add XSLPattern nodeType() method.
parent
8401caae
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
37 additions
and
0 deletions
+37
-0
queryresult.c
dlls/msxml3/queryresult.c
+7
-0
domdoc.c
dlls/msxml3/tests/domdoc.c
+30
-0
No files found.
dlls/msxml3/queryresult.c
View file @
42ccbc51
...
...
@@ -405,6 +405,12 @@ void XSLPattern_end(xmlXPathParserContextPtr pctx, int nargs)
xmlXPathReturnBoolean
(
pctx
,
pos
==
last
);
}
void
XSLPattern_nodeType
(
xmlXPathParserContextPtr
pctx
,
int
nargs
)
{
XSLPATTERN_CHECK_ARGS
(
0
);
xmlXPathReturnNumber
(
pctx
,
pctx
->
context
->
node
->
type
);
}
void
XSLPattern_OP_IEq
(
xmlXPathParserContextPtr
pctx
,
int
nargs
)
{
xmlChar
*
arg1
,
*
arg2
;
...
...
@@ -528,6 +534,7 @@ HRESULT queryresult_create(xmlNodePtr node, LPCWSTR szQuery, IXMLDOMNodeList **o
xmlXPathRegisterFunc
(
ctxt
,
(
xmlChar
const
*
)
"index"
,
XSLPattern_index
);
xmlXPathRegisterFunc
(
ctxt
,
(
xmlChar
const
*
)
"end"
,
XSLPattern_end
);
xmlXPathRegisterFunc
(
ctxt
,
(
xmlChar
const
*
)
"nodeType"
,
XSLPattern_nodeType
);
xmlXPathRegisterFunc
(
ctxt
,
(
xmlChar
const
*
)
"OP_IEq"
,
XSLPattern_OP_IEq
);
xmlXPathRegisterFunc
(
ctxt
,
(
xmlChar
const
*
)
"OP_INEq"
,
XSLPattern_OP_INEq
);
...
...
dlls/msxml3/tests/domdoc.c
View file @
42ccbc51
...
...
@@ -6702,6 +6702,36 @@ static void test_XSLPattern(void)
expect_list_and_release
(
list
,
"P1.E3.E3.D1 C2.E3.E3.D1 T3.E3.E3.D1 E4.E3.E3.D1 E5.E3.E3.D1 E6.E3.E3.D1"
);
}
/* nodeType() */
/* XML_ELEMENT_NODE */
ole_check
(
IXMLDOMDocument2_selectNodes
(
doc
,
_bstr_
(
"//x/node()[nodeType()=1]"
),
&
list
));
len
=
0
;
ole_check
(
IXMLDOMNodeList_get_length
(
list
,
&
len
));
ok
(
len
!=
0
,
"expected filled list
\n
"
);
if
(
len
)
expect_list_and_release
(
list
,
"E4.E3.E3.D1 E5.E3.E3.D1 E6.E3.E3.D1"
);
/* XML_TEXT_NODE */
ole_check
(
IXMLDOMDocument2_selectNodes
(
doc
,
_bstr_
(
"//x/node()[nodeType()=3]"
),
&
list
));
len
=
0
;
ole_check
(
IXMLDOMNodeList_get_length
(
list
,
&
len
));
ok
(
len
!=
0
,
"expected filled list
\n
"
);
if
(
len
)
expect_list_and_release
(
list
,
"T3.E3.E3.D1"
);
/* XML_PI_NODE */
ole_check
(
IXMLDOMDocument2_selectNodes
(
doc
,
_bstr_
(
"//x/node()[nodeType()=7]"
),
&
list
));
len
=
0
;
ole_check
(
IXMLDOMNodeList_get_length
(
list
,
&
len
));
ok
(
len
!=
0
,
"expected filled list
\n
"
);
if
(
len
)
expect_list_and_release
(
list
,
"P1.E3.E3.D1"
);
/* XML_COMMENT_NODE */
ole_check
(
IXMLDOMDocument2_selectNodes
(
doc
,
_bstr_
(
"//x/node()[nodeType()=8]"
),
&
list
));
len
=
0
;
ole_check
(
IXMLDOMNodeList_get_length
(
list
,
&
len
));
ok
(
len
!=
0
,
"expected filled list
\n
"
);
if
(
len
)
expect_list_and_release
(
list
,
"C2.E3.E3.D1"
);
/* pi() */
todo_wine
ole_check
(
IXMLDOMDocument2_selectNodes
(
doc
,
_bstr_
(
"pi()"
),
&
list
));
if
(
list
)
...
...
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