Lines 433-438
Link Here
|
433 |
} |
433 |
} |
434 |
return null; |
434 |
return null; |
435 |
} |
435 |
} |
|
|
436 |
|
437 |
static Document getDocumentForNode(Node node) { |
438 |
Document doc = getDummyDocumentWithoutRoot(); |
439 |
Node importedNode = doc.importNode(node, true); |
440 |
doc.appendChild(importedNode); |
441 |
return doc; |
442 |
} |
436 |
|
443 |
|
437 |
// The following variable is used for holding the modified xpath string |
444 |
// The following variable is used for holding the modified xpath string |
438 |
// when adapting parameter for Xalan XPath engine, where we need to have |
445 |
// when adapting parameter for Xalan XPath engine, where we need to have |
Lines 675-684
Link Here
|
675 |
if ( Class.forName("org.w3c.dom.Node").isInstance( |
682 |
if ( Class.forName("org.w3c.dom.Node").isInstance( |
676 |
jstlNodeList.elementAt(0) ) ) { |
683 |
jstlNodeList.elementAt(0) ) ) { |
677 |
Node node = (Node)jstlNodeList.elementAt(0); |
684 |
Node node = (Node)jstlNodeList.elementAt(0); |
678 |
Document doc = getDummyDocumentWithoutRoot(); |
685 |
boundDocument = getDocumentForNode(node); |
679 |
Node importedNode = doc.importNode( node, true); |
|
|
680 |
doc.appendChild (importedNode ); |
681 |
boundDocument = doc; |
682 |
if ( whetherOrigXPath ) { |
686 |
if ( whetherOrigXPath ) { |
683 |
xpath="/*" + xpath; |
687 |
xpath="/*" + xpath; |
684 |
} |
688 |
} |
Lines 723-729
Link Here
|
723 |
} |
727 |
} |
724 |
} else if ( Class.forName("org.w3c.dom.Node").isInstance( |
728 |
} else if ( Class.forName("org.w3c.dom.Node").isInstance( |
725 |
varObject ) ) { |
729 |
varObject ) ) { |
726 |
boundDocument = (Node)varObject; |
730 |
boundDocument = getDocumentForNode((Node)varObject); |
|
|
731 |
if (whetherOrigXPath) { |
732 |
xpath = "/*" + xpath; |
733 |
} |
727 |
} else { |
734 |
} else { |
728 |
boundDocument = getDummyDocument(); |
735 |
boundDocument = getDummyDocument(); |
729 |
xpath = origXPath; |
736 |
xpath = origXPath; |