O'Reilly logo

Special Edition Using XSLT by Michael Floyd

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Expressions

You have seen a few examples of expressions already, beyond simple location paths, Boolean expressions that test for truth or falsehood, and node set expressions that merge the results of several location paths into one. Now it is time to examine in detail the other kinds of expressions that XPath provides.

Numbers

Numerical expressions work pretty much like they did in math at school. In XPath, you can write numbers as you might expect; all the following are legal XPath numerical expressions:

123 
123.45 
.5 
0.5 
-10.5 

The mathematicians among you will notice that this means XPath deals in real numbers. They’re approximate floating-point numbers, too—the results of computations are not always exact, because all arithmetic is done ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required