<s>
In	O
computer	B-General_Concept
science	I-General_Concept
and	O
web	O
development	O
,	O
XML	B-Language
Events	I-Language
is	O
a	O
W3C	O
standard	O
for	O
handling	O
events	B-Application
that	O
occur	O
in	O
an	O
XML	B-Protocol
document	I-Protocol
.	O
</s>
<s>
These	O
events	B-Application
are	O
typically	O
caused	O
by	O
users	O
interacting	O
with	O
the	O
web	O
page	O
using	O
a	O
device	O
,	O
such	O
as	O
a	O
web	B-Application
browser	I-Application
on	O
a	O
personal	B-Device
computer	I-Device
or	O
mobile	O
phone	O
.	O
</s>
<s>
An	O
XML	B-Protocol
Event	O
is	O
the	O
representation	O
of	O
some	O
asynchronous	O
occurrence	O
(	O
such	O
as	O
a	O
mouse	B-Device
button	I-Device
click	I-Device
)	O
that	O
gets	O
associated	O
with	O
a	O
data	O
element	O
in	O
an	O
XML	B-Protocol
document	I-Protocol
.	O
</s>
<s>
XML	B-Language
Events	I-Language
provides	O
a	O
static	O
,	O
syntactic	O
binding	O
to	O
the	B-General_Concept
DOM	I-General_Concept
Events	B-Application
interface	O
,	O
allowing	O
the	O
event	O
to	O
be	O
handled	O
.	O
</s>
<s>
The	O
XML	B-Language
Events	I-Language
standard	O
is	O
defined	O
to	O
provide	O
XML-based	O
languages	O
with	O
the	O
ability	O
to	O
uniformly	O
integrate	O
event	B-Language
listeners	I-Language
and	O
associated	O
event	O
handlers	O
with	O
Document	B-General_Concept
Object	I-General_Concept
Model	I-General_Concept
(	O
DOM	B-General_Concept
)	O
Level	O
2	O
event	O
interfaces	O
.	O
</s>
<s>
The	O
result	O
is	O
to	O
provide	O
a	O
declarative	O
,	O
interoperable	O
way	O
of	O
associating	O
behaviors	O
with	O
XML-based	O
documents	O
such	O
as	O
XHTML	B-Language
.	O
</s>
<s>
XML	B-Language
Events	I-Language
uses	O
a	O
separation	O
of	O
concerns	O
design	O
pattern	O
,	O
and	O
is	O
technology-neutral	O
with	O
regard	O
to	O
handlers	O
.	O
</s>
<s>
It	O
gives	O
authors	O
freedom	O
in	O
organizing	O
their	O
code	O
and	O
allows	O
separation	O
of	O
document	O
content	O
from	O
scripting	B-Language
.	O
</s>
<s>
Legacy	B-Device
HTML	B-Language
and	O
early	O
SVG	B-Application
versions	O
bind	O
events	B-Application
to	O
presentation	O
elements	O
by	O
encoding	O
the	O
event	O
name	O
in	O
an	O
attribute	O
name	O
,	O
such	O
that	O
the	O
value	O
of	O
the	O
attribute	O
is	O
the	O
action	O
for	O
that	O
event	O
at	O
that	O
element	O
.	O
</s>
<s>
For	O
example	O
,	O
(	O
with	O
JavaScript	B-Language
’s	O
onclick	O
attribute	O
)	O
:	O
</s>
<s>
Stay	O
<	O
a	B-Language
href	I-Language
=	O
"	O
http://www.example.org	O
"	O
onclick	O
=	O
"	O
window.alert	O
( 'Hello	O
!	O
</s>
<s>
it	O
forces	O
authors	O
to	O
mix	O
the	O
content	O
of	O
the	O
document	O
with	O
the	O
specifications	O
of	O
the	O
scripting	B-Language
and	O
event	O
handling	O
,	O
rather	O
than	O
allowing	O
them	O
to	O
separate	O
them	O
.	O
</s>
<s>
it	O
restricts	O
authors	O
to	O
a	O
single	O
scripting	B-Language
language	I-Language
per	O
document	O
.	O
</s>
<s>
Unlike	O
DOM	B-Application
Events	I-Application
,	O
which	O
are	O
usually	O
associated	O
with	O
HTML	B-Language
documents	O
,	O
XML	B-Language
events	I-Language
are	O
designed	O
to	O
be	O
independent	O
of	O
specific	O
devices	O
.	O
</s>
<s>
XML	B-Language
Events	I-Language
are	O
used	O
extensively	O
in	O
XForms	B-Application
and	O
in	O
version	O
1.2	O
of	O
the	O
SVG	B-Application
specification	O
,	O
,	O
which	O
is	O
still	O
a	O
working	O
draft	O
.	O
</s>
<s>
The	O
following	O
is	O
an	O
example	O
of	O
how	O
XML	B-Language
events	I-Language
are	O
used	O
in	O
the	O
XForms	B-Application
specification	O
:	O
</s>
<s>
In	O
this	O
example	O
,	O
when	O
the	O
DOMActivate	O
event	O
occurs	O
on	O
the	O
data	O
element	O
with	O
an	O
id	O
attribute	O
of	O
myButton	O
,	O
the	O
handler	O
doit	O
(	O
for	O
example	O
,	O
a	O
JavaScript	B-Language
element	O
)	O
is	O
executed	O
.	O
</s>
