This bug led me to use the, fn:local-name() (whose implementation was correct) function instead, for the above mentioned blog post .
The good news is, that now this bug with fn:name() function is fixed (ref, https://bugs.eclipse.org/bugs/show_bug.cgi?id=301539).
For the example given in the blog post , the given XSD 1.1 assertion could now be written like following, as well:
<xs:assert test="(*/name() = ('fname', 'lname')) and (*/name() = ('fname', 'lname'))" />
(instead, of the "local-name" function as used in the mentioned blog post )