XPath selectors

Helper functions

When using XPath selectors in websites some transformation tasks are done over and over again. This is why Leankoala provides a set of additional helper function that can be used as shortcuts.

lk:normalize()

The lk:normalize() function is used to normalize a given value. New lines and spaces will be removed and it will be converted to a lowercase string.

Example

//a[lk:normalize(text())='blog']

will be translated to

//a[translate(translate(normalize-space(text()), ' ', ''), 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz')='blog']
Table of contents