Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why are XPath operators case sensitive?

Tags:

xpath

I'm sure there is a reason for this, but: Why are XPath operators case sensitive?

This is not about solving an XPath problem (we're already working around that) - I'd just like to know why I have to bother!

like image 852
Sebastian Avatar asked Mar 31 '11 10:03

Sebastian


People also ask

Are XPath case sensitive?

XPath is a case-sensitive language. Keywords in XPath use lowercase characters and are not reserved. Names in XPath expressions are allowed to be the same as language keywords.


1 Answers

I think most modern languages are case-sensitive. Clearly it made sense for XPath to follow XML. One reason for XML to be case-sensitive is that case-folding can be quite a complex business when you extend beyond the English alphabet: for example the upper-case of ß is SS but the lower-case of SS is ss. So are Straße and Strasse the same element name?

like image 159
Michael Kay Avatar answered Sep 20 '22 22:09

Michael Kay