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
d20e4877
Commit
d20e4877
authored
Jun 23, 2012
by
Nikolay Sivov
Committed by
Alexandre Julliard
Jun 25, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msxml3: Initial implementation of attributeDecl() in writer.
parent
7c9a1b52
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
70 additions
and
2 deletions
+70
-2
mxwriter.c
dlls/msxml3/mxwriter.c
+32
-2
saxreader.c
dlls/msxml3/tests/saxreader.c
+38
-0
No files found.
dlls/msxml3/mxwriter.c
View file @
d20e4877
...
...
@@ -1481,10 +1481,40 @@ static HRESULT WINAPI SAXDeclHandler_attributeDecl(ISAXDeclHandler *iface,
const
WCHAR
*
value
,
int
n_value
)
{
mxwriter
*
This
=
impl_from_ISAXDeclHandler
(
iface
);
FIXME
(
"(%p)->(%s:%d %s:%d %s:%d %s:%d %s:%d): stub
\n
"
,
This
,
debugstr_wn
(
element
,
n_element
),
n_element
,
static
const
WCHAR
attlistW
[]
=
{
'<'
,
'!'
,
'A'
,
'T'
,
'T'
,
'L'
,
'I'
,
'S'
,
'T'
,
' '
};
static
const
WCHAR
closeelementW
[]
=
{
'>'
,
'\r'
,
'\n'
};
TRACE
(
"(%p)->(%s:%d %s:%d %s:%d %s:%d %s:%d)
\n
"
,
This
,
debugstr_wn
(
element
,
n_element
),
n_element
,
debugstr_wn
(
attr
,
n_attr
),
n_attr
,
debugstr_wn
(
type
,
n_type
),
n_type
,
debugstr_wn
(
Default
,
n_default
),
n_default
,
debugstr_wn
(
value
,
n_value
),
n_value
);
return
E_NOTIMPL
;
write_output_buffer
(
This
->
buffer
,
attlistW
,
sizeof
(
attlistW
)
/
sizeof
(
WCHAR
));
if
(
n_element
)
{
write_output_buffer
(
This
->
buffer
,
element
,
n_element
);
write_output_buffer
(
This
->
buffer
,
spaceW
,
sizeof
(
spaceW
)
/
sizeof
(
WCHAR
));
}
if
(
n_attr
)
{
write_output_buffer
(
This
->
buffer
,
attr
,
n_attr
);
write_output_buffer
(
This
->
buffer
,
spaceW
,
sizeof
(
spaceW
)
/
sizeof
(
WCHAR
));
}
if
(
n_type
)
{
write_output_buffer
(
This
->
buffer
,
type
,
n_type
);
write_output_buffer
(
This
->
buffer
,
spaceW
,
sizeof
(
spaceW
)
/
sizeof
(
WCHAR
));
}
if
(
n_default
)
{
write_output_buffer
(
This
->
buffer
,
Default
,
n_default
);
write_output_buffer
(
This
->
buffer
,
spaceW
,
sizeof
(
spaceW
)
/
sizeof
(
WCHAR
));
}
if
(
n_value
)
write_output_buffer_quoted
(
This
->
buffer
,
value
,
n_value
);
write_output_buffer
(
This
->
buffer
,
closeelementW
,
sizeof
(
closeelementW
)
/
sizeof
(
WCHAR
));
return
S_OK
;
}
static
HRESULT
WINAPI
SAXDeclHandler_internalEntityDecl
(
ISAXDeclHandler
*
iface
,
...
...
dlls/msxml3/tests/saxreader.c
View file @
d20e4877
...
...
@@ -4450,6 +4450,44 @@ static void test_mxwriter_dtd(void)
V_BSTR
(
&
dest
)),
"got wrong content %s
\n
"
,
wine_dbgstr_w
(
V_BSTR
(
&
dest
)));
VariantClear
(
&
dest
);
/* attribute declaration */
V_VT
(
&
dest
)
=
VT_EMPTY
;
hr
=
IMXWriter_put_output
(
writer
,
dest
);
EXPECT_HR
(
hr
,
S_OK
);
hr
=
ISAXDeclHandler_attributeDecl
(
decl
,
_bstr_
(
"element"
),
strlen
(
"element"
),
_bstr_
(
"attribute"
),
strlen
(
"attribute"
),
_bstr_
(
"CDATA"
),
strlen
(
"CDATA"
),
_bstr_
(
"#REQUIRED"
),
strlen
(
"#REQUIRED"
),
_bstr_
(
"value"
),
strlen
(
"value"
));
EXPECT_HR
(
hr
,
S_OK
);
V_VT
(
&
dest
)
=
VT_EMPTY
;
hr
=
IMXWriter_get_output
(
writer
,
&
dest
);
EXPECT_HR
(
hr
,
S_OK
);
ok
(
V_VT
(
&
dest
)
==
VT_BSTR
,
"got %d
\n
"
,
V_VT
(
&
dest
));
ok
(
!
lstrcmpW
(
_bstr_
(
"<!ATTLIST element attribute CDATA #REQUIRED
\"
value
\"
>
\r\n
"
),
V_BSTR
(
&
dest
)),
"got wrong content %s
\n
"
,
wine_dbgstr_w
(
V_BSTR
(
&
dest
)));
VariantClear
(
&
dest
);
hr
=
ISAXDeclHandler_attributeDecl
(
decl
,
_bstr_
(
"element"
),
strlen
(
"element"
),
_bstr_
(
"attribute2"
),
strlen
(
"attribute2"
),
_bstr_
(
"CDATA"
),
strlen
(
"CDATA"
),
_bstr_
(
"#REQUIRED"
),
strlen
(
"#REQUIRED"
),
_bstr_
(
"value2"
),
strlen
(
"value2"
));
EXPECT_HR
(
hr
,
S_OK
);
hr
=
ISAXDeclHandler_attributeDecl
(
decl
,
_bstr_
(
"element2"
),
strlen
(
"element2"
),
_bstr_
(
"attribute3"
),
strlen
(
"attribute3"
),
_bstr_
(
"CDATA"
),
strlen
(
"CDATA"
),
_bstr_
(
"#REQUIRED"
),
strlen
(
"#REQUIRED"
),
_bstr_
(
"value3"
),
strlen
(
"value3"
));
EXPECT_HR
(
hr
,
S_OK
);
V_VT
(
&
dest
)
=
VT_EMPTY
;
hr
=
IMXWriter_get_output
(
writer
,
&
dest
);
EXPECT_HR
(
hr
,
S_OK
);
ok
(
V_VT
(
&
dest
)
==
VT_BSTR
,
"got %d
\n
"
,
V_VT
(
&
dest
));
ok
(
!
lstrcmpW
(
_bstr_
(
"<!ATTLIST element attribute CDATA #REQUIRED
\"
value
\"
>
\r\n
"
"<!ATTLIST element attribute2 CDATA #REQUIRED
\"
value2
\"
>
\r\n
"
"<!ATTLIST element2 attribute3 CDATA #REQUIRED
\"
value3
\"
>
\r\n
"
),
V_BSTR
(
&
dest
)),
"got wrong content %s
\n
"
,
wine_dbgstr_w
(
V_BSTR
(
&
dest
)));
VariantClear
(
&
dest
);
ISAXContentHandler_Release
(
content
);
ISAXLexicalHandler_Release
(
lexical
);
ISAXDeclHandler_Release
(
decl
);
...
...
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