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
a94e4c19
Commit
a94e4c19
authored
Aug 03, 2008
by
Piotr Caban
Committed by
Alexandre Julliard
Aug 04, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msxml3: Add namespaces to attributes.
parent
e9d34b7f
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
10 deletions
+20
-10
saxreader.c
dlls/msxml3/saxreader.c
+20
-10
No files found.
dlls/msxml3/saxreader.c
View file @
a94e4c19
...
...
@@ -811,10 +811,12 @@ static const struct ISAXAttributesVtbl isaxattributes_vtbl =
};
static
HRESULT
SAXAttributes_create
(
saxattributes
**
attr
,
int
nb_namespaces
,
const
xmlChar
**
xmlNamespaces
,
int
nb_attributes
,
const
xmlChar
**
xmlAttributes
)
{
saxattributes
*
attributes
;
int
index
;
static
const
xmlChar
xmlns
[]
=
"xmlns"
;
attributes
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
*
attributes
));
if
(
!
attributes
)
...
...
@@ -824,16 +826,16 @@ static HRESULT SAXAttributes_create(saxattributes **attr,
attributes
->
lpSAXAttributesVtbl
=
&
isaxattributes_vtbl
;
attributes
->
ref
=
1
;
attributes
->
nb_attributes
=
nb_attributes
;
attributes
->
nb_attributes
=
nb_
namespaces
+
nb_
attributes
;
attributes
->
szLocalname
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
BSTR
)
*
nb_attributes
);
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
BSTR
)
*
attributes
->
nb_attributes
);
attributes
->
szURI
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
BSTR
)
*
nb_attributes
);
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
BSTR
)
*
attributes
->
nb_attributes
);
attributes
->
szValue
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
BSTR
)
*
nb_attributes
);
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
BSTR
)
*
attributes
->
nb_attributes
);
attributes
->
szQName
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
BSTR
)
*
nb_attributes
);
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
BSTR
)
*
attributes
->
nb_attributes
);
if
(
!
attributes
->
szLocalname
||
!
attributes
->
szURI
||
!
attributes
->
szValue
||
!
attributes
->
szQName
)
...
...
@@ -846,16 +848,24 @@ static HRESULT SAXAttributes_create(saxattributes **attr,
return
E_FAIL
;
}
for
(
index
=
0
;
index
<
nb_namespaces
;
index
++
)
{
attributes
->
szLocalname
[
index
]
=
SysAllocStringLen
(
NULL
,
0
);
attributes
->
szURI
[
index
]
=
SysAllocStringLen
(
NULL
,
0
);
attributes
->
szValue
[
index
]
=
bstr_from_xmlChar
(
xmlNamespaces
[
2
*
index
+
1
]);
attributes
->
szQName
[
index
]
=
QName_from_xmlChar
(
xmlns
,
xmlNamespaces
[
2
*
index
]);
}
for
(
index
=
0
;
index
<
nb_attributes
;
index
++
)
{
attributes
->
szLocalname
[
index
]
=
attributes
->
szLocalname
[
nb_namespaces
+
index
]
=
bstr_from_xmlChar
(
xmlAttributes
[
index
*
5
]);
attributes
->
szURI
[
index
]
=
attributes
->
szURI
[
nb_namespaces
+
index
]
=
bstr_from_xmlChar
(
xmlAttributes
[
index
*
5
+
2
]);
attributes
->
szValue
[
index
]
=
attributes
->
szValue
[
nb_namespaces
+
index
]
=
bstr_from_xmlCharN
(
xmlAttributes
[
index
*
5
+
3
],
xmlAttributes
[
index
*
5
+
4
]
-
xmlAttributes
[
index
*
5
+
3
]);
attributes
->
szQName
[
index
]
=
attributes
->
szQName
[
nb_namespaces
+
index
]
=
QName_from_xmlChar
(
xmlAttributes
[
index
*
5
+
1
],
xmlAttributes
[
index
*
5
]);
}
...
...
@@ -958,7 +968,7 @@ static void libxmlStartElementNS(
LocalName
=
bstr_from_xmlChar
(
localname
);
QName
=
QName_from_xmlChar
(
prefix
,
localname
);
hr
=
SAXAttributes_create
(
&
attr
,
nb_attributes
,
attributes
);
hr
=
SAXAttributes_create
(
&
attr
,
nb_
namespaces
,
namespaces
,
nb_
attributes
,
attributes
);
if
(
hr
==
S_OK
)
{
if
(
This
->
vbInterface
)
...
...
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