PLEASE DO NOT REPLY TO THIS MESSAGE. TO FURTHER COMMENT
ON THE STATUS OF THIS BUG PLEASE FOLLOW THE LINK BELOW
AND USE THE ON-LINE APPLICATION. REPLYING TO THIS MESSAGE
DOES NOT UPDATE THE DATABASE, AND SO YOUR COMMENT WILL
BE LOST SOMEWHERE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=2308

*** shadow/2308 Sat Jul 14 23:12:03 2001
--- shadow/2308.tmp.13262       Thu Jul 26 02:11:45 2001
***************
*** 22,25 ****
  Please attach your XSLT showing how you did this so that we can try to reproduce 
  the problem.
  Thanks,
! Gary
--- 22,111 ----
  Please attach your XSLT showing how you did this so that we can try to reproduce 
  the problem.
  Thanks,
! Gary
! 
! ------- Additional Comments From [EMAIL PROTECTED]  2001-07-26 02:11 -------
! > Gary,
! > 
! > The XSLT is in 2307.  Specifically, the following should do the trick.  I'm
! > guessing it's related the wrapping of the NodeIterator in
! > org.apache.xpath.NodeSetDTM.  As I said, with the caveat that you need
! > several workarounds, this works in 2.1.0.
! > 
! > I've been thinking some more about 2307, and on reflection the error message
! > should have made it obvious what was going on in CurrentCVS.
! > 
! > Thanks,
! > 
! > Julian.
! > 
! > <?xml version="1.0"?>
! > <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
! >               xmlns:java="http://xml.apache.org/xslt/java";
! >               version="1.0">
! > <xsl:template match="/">
! > <xsl:for-each select="java:getNodeList(java:Iterator.new())" />
! > </xsl:template>
! > </xsl:stylesheet>
! > 
! > and the object is
! > 
! > import org.w3c.dom.traversal.NodeIterator;
! > import org.w3c.dom.traversal.NodeFilter;
! > import org.w3c.dom.DOMException;
! > import org.w3c.dom.Node;
! > 
! > import javax.xml.parsers.DocumentBuilderFactory;
! > import javax.xml.parsers.DocumentBuilder;
! > 
! > public class Iterator implements NodeIterator {
! > private int mlngCount;
! > private org.w3c.dom.Document mobjDocument;
! > 
! > public Iterator() throws javax.xml.parsers.ParserConfigurationException {
! >   DocumentBuilderFactory objFactory =
! > DocumentBuilderFactory.newInstance();
! >   DocumentBuilder objBuilder = objFactory.newDocumentBuilder();
! >   mobjDocument = objBuilder.newDocument();
! > }
! > 
! > public NodeIterator getNodeList() {
! >   return this;
! > }
! >    
! > public Node getRoot() {
! >   return mobjDocument;
! > }
! > 
! > public int getWhatToShow() {
! >   return NodeFilter.SHOW_ALL;
! > }
! > 
! > public NodeFilter getFilter() {
! >   return null;
! > }
! > 
! > public boolean getExpandEntityReferences() {
! >   return false;
! > }
! > 
! > public Node nextNode() throws DOMException {
! >   mlngCount++;
! >   if (mlngCount<50000) {
! >     org.w3c.dom.Element objElement = mobjDocument.createElement("Hello");
! >     objElement.setAttribute("value", String.valueOf(mlngCount));
! >     return objElement;
! >   }
! >   return null;
! > }
! > 
! > public Node previousNode() throws DOMException {
! >   throw (new DOMException(DOMException.NOT_SUPPORTED_ERR, "This is a
! > custom iterator which cannot go back."));
! > }
! > 
! > public void detach() {
! >   // Empty
! > }
! > }
! 

Reply via email to