Project

Profile

Help

Revision e373f65d

Added by Michael Kay almost 13 years ago

Fix bug 2514260 - evaluate() returning DOM NodeList

View differences:

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

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

Also available in: Unified diff