if ( currNode.getNodeType() == Node.ELEMENT_NODE ) {
nodeVector.addElement( currNode);
}
}
JSTLNodeList jstlNodeList = new JSTLNodeList( nodeVector);
newXObject = new XNodeSetForDOM( jstlNodeList, xctxt );
return newXObject;
}
if ( Class.forName(
"org.apache.taglibs.standard.tag.common.xml.JSTLNodeList").isInstance(
varObject) ) {
JSTLNodeList jstlNodeList = (JSTLNodeList)varObject;
if ( ( jstlNodeList.getLength() == 1 ) &&
(!Class.forName("org.w3c.dom.Node").isInstance( jstlNodeList.elementAt(0) ) ) ) {
varObject = jstlNodeList.elementAt(0);
//Now we need to allow this primitive type to be coverted
// to type which Xalan XPath understands
} else {
return new XNodeSetForDOM ( jstlNodeList ,xctxt );
}
}
if (Class.forName("org.w3c.dom.Node").isInstance( varObject)) {
newXObject = new XNodeSetForDOM ( new JSTLNodeList( (Node)varObject ),xctxt );
} else if ( Class.forName("java.lang.String").isInstance( varObject)){
newXObject = new XString ( (String)varObject );
} else if ( Class.forName("java.lang.Boolean").isInstance( varObject) ) {
newXObject = new XBoolean ( (Boolean)varObject );
} else if ( Class.forName("java.lang.Number").isInstance( varObject) ) {