Hi,

When I try to create an element with a prefix, and then later use
XPathAPI.selectNodeIterator method to retrieve it, it doesn't work.  The
node doesn't get retrieved.  Here is the code snippet:           

          Document doc = new DocumentImpl();
          Element e1 = doc.createElement("xsl:for-each");
          Element parent = doc.createElement("xsl:if");
          parent.appendChild(e1);
          NodeIterator ni = XPathAPI.selectNodeIterator(parent,
".//xsl:for-each");   

But, if I change the name of the element that I am adding to something that
doesn't have a prefix (like "temp"), then I can retrieve it using
selectNodeIterator.  It seems like namespace issue, but I didn't see any
method in class Document where I can set namespaceAware to true like I can
do it with DocumentBuilderFactory.  Please help!  

Thanks,
Malia

Reply via email to