XSLT 2.0 and XPath 2.0 Programmer's Reference, 4th Edition (345 page)

BOOK: XSLT 2.0 and XPath 2.0 Programmer's Reference, 4th Edition
12.58Mb size Format: txt, pdf, ePub

The real driver for introducing these new operators was not really the requirements of XSLT users, but the needs of XQuery, which is a superset of XPath 2.0. XQuery needs to be able to search large databases, and if you want to search a terabyte of data then you need to take advantages of indexes. This means you need to be able to rearrange the query as written by the user into a form that can take advantage of the indexes known to be available, and this rewriting of an expression into a different form is only possible if the operators have very clean mathematical properties. For example, a very useful property that makes rearranging expressions possible is called
transitivity
, which means that if
A=B
and
B=C
are both true, then you know that
A=C
will also be true. Unfortunately, this isn't the case for the
=
operator in XPath 1.0. For example, in XPath 1.0,
1=true()
and
true()=“true”
are both true, but
1=“true”

Other books

The Exiled by Posie Graeme-Evans
Queen by Right by Anne Easter Smith
The Demented: Confliction by Thomas, Derek J
Underneath by Andie M. Long
Murciélagos by Gustav Meyrink
Unforgiving Temper by Head, Gail
Admiral by Dudley Pope
Las Hermanas Penderwick by Jeanne Birdsall
The Proving by Brosky, Ken