As I have found out after quite some trial and error (see #32), to match XPath in an <html xmlns="http://www.w3.org/1999/xhtml"> tag, I need to use the "http://www.w3.org/1999/xhtml" namespace and need to prefix all tags.
Thus, I cannot just use any XPath tool to create the XPath expressions. It would be simpler if xmlns without prefix would not require a prefix in XhtmlMatchers either. Or more commonly, the prefixes in the XPath should be the same as those in xmlns.
Right now, it seems I'm better off removing the xmlns before feeding the xhtml to XhtmlMatchers.
As I have found out after quite some trial and error (see #32), to match XPath in an
<html xmlns="http://www.w3.org/1999/xhtml">tag, I need to use the"http://www.w3.org/1999/xhtml"namespace and need to prefix all tags.Thus, I cannot just use any XPath tool to create the XPath expressions. It would be simpler if xmlns without prefix would not require a prefix in
XhtmlMatcherseither. Or more commonly, the prefixes in the XPath should be the same as those inxmlns.Right now, it seems I'm better off removing the
xmlnsbefore feeding the xhtml toXhtmlMatchers.