<s>
XPath	B-General_Concept
2.0	I-General_Concept
is	O
a	O
version	O
of	O
the	O
XPath	B-Language
language	O
defined	O
by	O
the	O
World	O
Wide	O
Web	O
Consortium	O
,	O
W3C	O
.	O
</s>
<s>
As	O
a	O
W3C	O
Recommendation	O
it	O
was	O
superseded	O
by	O
XPath	B-General_Concept
3.0	I-General_Concept
on	O
10	O
April	O
2014	O
.	O
</s>
<s>
XPath	B-Language
is	O
used	O
primarily	O
for	O
selecting	O
parts	O
of	O
an	O
XML	B-Protocol
document	I-Protocol
.	O
</s>
<s>
For	O
this	O
purpose	O
the	O
XML	B-Protocol
document	I-Protocol
is	O
modelled	O
as	O
a	O
tree	O
of	O
nodes	O
.	O
</s>
<s>
XPath	B-Language
allows	O
nodes	O
to	O
be	O
selected	O
by	O
means	O
of	O
a	O
hierarchic	O
navigation	O
path	O
through	O
the	O
document	O
tree	O
.	O
</s>
<s>
The	O
language	O
is	O
significantly	O
larger	O
than	O
its	O
predecessor	O
,	O
XPath	B-Language
1.0	I-Language
,	O
and	O
some	O
of	O
the	O
basic	O
concepts	O
such	O
as	O
the	O
data	O
model	O
and	O
type	O
system	O
have	O
changed	O
.	O
</s>
<s>
XPath	B-General_Concept
2.0	I-General_Concept
is	O
used	O
as	O
a	O
sublanguage	O
of	O
XSLT	B-Application
2.0	I-Application
,	O
and	O
it	O
is	O
also	O
a	O
subset	O
of	O
XQuery	B-Language
1.0	O
.	O
</s>
<s>
All	O
three	O
languages	O
share	O
the	O
same	O
data	O
model	O
(	O
the	O
XDM	B-Application
)	O
,	O
type	O
system	O
,	O
and	O
function	O
library	O
,	O
and	O
were	O
developed	O
together	O
and	O
published	O
on	O
the	O
same	O
day	O
.	O
</s>
<s>
Every	O
value	O
in	O
XPath	B-General_Concept
2.0	I-General_Concept
is	O
a	O
sequence	O
of	O
items	O
.	O
</s>
<s>
Nodes	O
are	O
of	O
seven	O
kinds	O
,	O
corresponding	O
to	O
different	O
constructs	O
in	O
the	O
syntax	O
of	O
XML	B-Protocol
:	O
elements	O
,	O
attributes	O
,	O
text	O
nodes	O
,	O
comments	O
,	O
processing	O
instructions	O
,	O
namespace	O
nodes	O
,	O
and	O
document	O
nodes	O
.	O
</s>
<s>
(	O
The	O
document	O
node	O
replaces	O
the	O
root	O
node	O
of	O
XPath	B-Language
1.0	I-Language
,	O
because	O
the	O
XPath	B-General_Concept
2.0	I-General_Concept
model	O
allows	O
trees	O
to	O
be	O
rooted	O
at	O
other	O
kinds	O
of	O
node	O
,	O
notably	O
elements	O
.	O
)	O
</s>
<s>
A	O
node	O
acquires	O
a	O
type	O
as	O
a	O
result	O
of	O
validation	O
against	O
an	O
XML	B-Protocol
Schema	O
.	O
</s>
<s>
Atomic	O
values	O
may	O
belong	O
to	O
any	O
of	O
the	O
19	O
primitive	O
types	O
defined	O
in	O
the	O
XML	B-Protocol
Schema	O
specification	O
(	O
for	O
example	O
,	O
string	O
,	O
boolean	O
,	O
double	O
,	O
float	O
,	O
decimal	O
,	O
dateTime	O
,	O
QName	O
,	O
and	O
so	O
on	O
)	O
.	O
</s>
<s>
The	O
type	O
system	O
of	O
XPath	B-General_Concept
2.0	I-General_Concept
is	O
noteworthy	O
for	O
the	O
fact	O
that	O
it	O
mixes	O
strong	O
typing	O
and	O
weak	O
typing	O
within	O
a	O
single	O
language	O
.	O
</s>
<s>
The	O
location	O
paths	O
of	O
XPath	B-Language
1.0	I-Language
are	O
referred	O
to	O
in	O
XPath	B-General_Concept
2.0	I-General_Concept
as	O
path	O
expressions	O
.	O
</s>
<s>
The	O
"	O
/	O
"	O
operator	O
is	O
generalized	O
in	O
XPath	B-General_Concept
2.0	I-General_Concept
to	O
allow	O
any	O
kind	O
of	O
expression	O
to	O
be	O
used	O
as	O
an	O
operand	O
:	O
in	O
XPath	B-Language
1.0	I-Language
,	O
the	O
right-hand	O
side	O
was	O
always	O
an	O
axis	O
step	O
.	O
</s>
<s>
If	O
the	O
result	O
consists	O
of	O
nodes	O
,	O
then	O
duplicates	O
are	O
eliminated	O
and	O
the	O
nodes	O
are	O
returned	O
in	O
document	O
order	O
,	O
an	O
ordering	O
defined	O
in	O
terms	O
of	O
the	O
relative	O
positions	O
of	O
the	O
nodes	O
in	O
the	O
original	O
XML	B-Protocol
tree	O
.	O
</s>
<s>
In	O
many	O
cases	O
the	O
operands	O
of	O
"	O
/	O
"	O
will	O
be	O
axis	O
steps	O
:	O
these	O
are	O
largely	O
unchanged	O
from	O
XPath	B-Language
1.0	I-Language
,	O
and	O
are	O
described	O
in	O
the	O
article	O
on	O
XPath	B-Language
1.0	I-Language
.	O
</s>
<s>
Other	O
operators	O
available	O
in	O
XPath	B-General_Concept
2.0	I-General_Concept
include	O
the	O
following	O
:	O
</s>
<s>
XPath	B-General_Concept
2.0	I-General_Concept
also	O
offers	O
a	O
for	O
expression	O
,	O
which	O
is	O
a	O
small	O
subset	O
of	O
the	O
FLWOR	B-Language
expression	O
from	O
XQuery	B-Language
.	O
</s>
<s>
The	O
function	O
library	O
in	O
XPath	B-General_Concept
2.0	I-General_Concept
is	O
greatly	O
extended	O
from	O
the	O
function	O
library	O
in	O
XPath	B-Language
1.0	I-Language
.	O
</s>
<s>
Because	O
of	O
the	O
changes	O
in	O
the	O
data	O
model	O
and	O
type	O
system	O
,	O
not	O
all	O
expressions	O
have	O
exactly	O
the	O
same	O
effect	O
in	O
XPath	B-General_Concept
2.0	I-General_Concept
as	O
in	O
1.0	O
.	O
</s>
<s>
The	O
main	O
difference	O
is	O
that	O
XPath	B-Language
1.0	I-Language
was	O
more	O
relaxed	O
about	O
type	O
conversion	O
,	O
for	O
example	O
comparing	O
two	O
strings	O
(	O
"	O
4	O
"	O
>	O
"	O
4.0	O
"	O
)	O
was	O
quite	O
possible	O
but	O
would	O
do	O
a	O
numeric	O
comparison	O
;	O
in	O
XPath	B-General_Concept
2.0	I-General_Concept
this	O
is	O
defined	O
to	O
compare	O
the	O
two	O
values	O
as	O
strings	O
using	O
a	O
context-defined	O
collating	O
sequence	O
.	O
</s>
<s>
To	O
ease	O
transition	O
,	O
XPath	B-General_Concept
2.0	I-General_Concept
defines	O
a	O
mode	O
of	O
execution	O
in	O
which	O
the	O
semantics	O
are	O
modified	O
to	O
be	O
as	O
close	O
as	O
possible	O
to	O
XPath	B-Language
1.0	I-Language
behavior	O
.	O
</s>
<s>
When	O
using	O
XSLT	B-Application
2.0	I-Application
,	O
this	O
mode	O
is	O
activated	O
by	O
setting	O
version	O
=	O
"	O
1.0	O
"	O
as	O
an	O
attribute	O
on	O
the	O
xsl:stylesheet	O
element	O
.	O
</s>
<s>
Support	O
for	O
XPath	B-General_Concept
2.0	I-General_Concept
is	O
still	O
limited	O
.	O
</s>
