April 19th, 2006
ABCDEFGHIJKLMNOPQRSTUVWXYZ
abcdefghijklmnopqrstuvwxyz
I have summerized some note about the string comparison via XSLT and XPATH.
- Find specific string with “=”:
_Find specific Item with text “testITEM”.
_
- Find specific string with “contains”:
Find specific Item which contain ”testITEM”.
- Find specific string case-insensitivity “=”:
Find specific Item with text “testITEM” or “TESTITEM” or “TestItem” … ETC.
There is no way to compare it without transform, you need transform it to upper case(or small case) first.
- Compare orderings with great-than:
_Find specific date which great than “20060419”:
_
If the date is ISO format (YYYY-MM-DD) it is easy to compare with follow code. ( >= is the same case.)
- Compare orderings with less-than:
Find specific date which less than “20060419”:
It should be note, “<” can not in XPATH. Please use “<” to replace it. “<=” is the same code.
That is all, for more detail you can find some useful feedback in XSLT Questions and Answers.