The addition of "&&
!anXPathFragment.nameIsText())" looks good to me.
A patch is now available for this bug
at the below location:
review these changes and send back any feedback:
"xpath of "text()" seems to be broken in M9"
Some "text()" mappings
were broken in M9 due to the default namespace from deployment xml being
incorrectly set on a static XPathFragment "TEXT_FRAGMENT". This was causing a
map lookup for the text() NodeValue to fail during the