このパッチで動くようになった。
Index: html-xpath/html-xpath-patched.js
===================================================================
--- html-xpath/html-xpath-patched.js (revision 666)
+++ html-xpath/html-xpath-patched.js (working copy)
@@ -602,7 +602,7 @@
{
var attribute = node.attributes[i];
var attributeValue = attribute.nodeValue;
- if (attributeValue && attribute.specified)
+ if (attributeValue && (attribute.specified || attribute.nodeName.toLowerCase() == 'value'))
{
var domAttribute = dom.createAttribute(attribute.nodeName);
domAttribute.value = attributeValue;
なぜ IE でダメだったかというと、どうも IE だと input 要素に value 属性を指定しても、 attribute.specified が true にならないからのようだ。IE のバグ?