Project

Profile

Help

Revision e3b34fe8

Added by Michael Kay about 13 years ago

Further patch for bug 2149517 (DOMObjectModel)

View differences:

latest9.1/bj/net/sf/saxon/dom/DOMObjectModel.java
159 159
     */
160 160

  
161 161
    public PJConverter getNodeListCreator(Object node) {
162
        return new PJConverter() {
163
            public Object convert(ValueRepresentation value, Class targetClass, XPathContext context) throws XPathException {
164
                return convertXPathValueToObject(Value.asValue(value), NodeList.class, context);
165
            }
166
        };
162
        if (node==null || (node instanceof VirtualNode && ((VirtualNode)node).getUnderlyingNode() instanceof Node)) {
163
            return new PJConverter() {
164
                public Object convert(ValueRepresentation value, Class targetClass, XPathContext context) throws XPathException {
165
                    return convertXPathValueToObject(Value.asValue(value), NodeList.class, context);
166
                }
167
            };
168
        } else {
169
            return null;
170
        }
167 171
    }
168 172

  
169 173
    /**

Also available in: Unified diff