26.01.2019 Views

XML Simplified

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Module 7<br />

Additionally, a list of the operators that can be used in XPath expressions is given in table 7.4.<br />

More on XSLT<br />

Concepts<br />

Operator Description Example Return value<br />

| Computes two node-sets //book | //cd Returns a node-set with all<br />

book and cd elements.<br />

+ Addition 36+14 50<br />

- Subtraction 36-14 22<br />

* Multiplication 6*4 24<br />

div Division 28 div 14 2<br />

= Equal price=9.50 true, if price is 9.50<br />

false, if price is 9.60<br />

!= Not Equal price!=9.50 true, if price is 9.90<br />

false, if price is 9.50<br />

< less than price= greater than or equal to price>=9.50 true, if price is 9.60<br />

or or price=9.50 or<br />

price=9.90<br />

and and price=9.50 and<br />

price=9.90<br />

mod<br />

Modulus (division<br />

remainder)<br />

15 mod 4 3<br />

false, if price is 9.40<br />

true, if price is 9.90<br />

false, if price is 9.40<br />

true, if price is 9.70<br />

false, if price is 8.70<br />

Table 7.4: List of Operators<br />

Version 1.0 © Aptech Limited<br />

<strong>XML</strong> <strong>Simplified</strong>

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!