XPath Axes

   



XPath Functions

XPath contains the following set of Boolean-related functions that can be invoked in an XSL stylesheet:

  • boolean()

  • not()

  • false()

  • lang()

  • true()

You can use Boolean-related functions where you need to test for the presence or absence of an attribute in an element and then execute different commands depending on the result of your test.

XPath contains the following set of numeric-related functions that can be invoked in an XSL stylesheet:

  • ceiling()

  • floor()

  • number()

  • round()

  • number()

For example, you can use the numeric-related functions for currency manipulation where you can specify the number of decimal places. You can also use the floor() function when you are interested in integer-valued results.

XPath contains the following set of string-related functions that can be invoked in an XSL stylesheet:

  • concat()

  • starts-width()

  • contains()

  • normalize-space()

  • substring()

  • substring-before()

  • substring-after()

  • string-length()

  • translate()

String functions are needed for manipulating text strings. For example, you can use the substring() function in order to capitalize the first letter of a string that represents a person's name.



   



Fundamentals of SVG Programming. Concepts to Source Code
Fundamentals of SVG Programming: Concepts to Source Code (Graphics Series)
ISBN: 1584502983
EAN: 2147483647
Year: 2003
Pages: 362

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net