I bet you thought that I forgot about this... nah... just too busy.
Unfortunately I have not been able to find much. The only e-mail I could
find is the one attached. Does not say much - other than where the change
was. And even that is not particularly helpful. Doing a DIFF I see the
following differences:

CVS:
  public double getNumberFromNode(int n)
  {
    XMLString xstr = m_dtmMgr.getDTM(n).getStringValue(n);
    return xstr.toDouble();
  }

NEW:
  public double getNumberFromNode(int n)
  {
    XMLString xstr = null;
    if ( m_dtmMgr != null )
      xstr = m_dtmMgr.getDTM(n).getStringValue(n);
    else
      xstr = m_iter.getDTMManager().getDTM(n).getStringValue(n);

    return xstr.toDouble();
  }

CVS:
  public XMLString getStringFromNode(int n)
  {
    // %OPT%
    // I guess we'll have to get a static instance of the DTM manager...
    if(DTM.NULL != n)
    {
      return m_dtmMgr.getDTM(n).getStringValue(n);
    }
    else
    {
      return org.apache.xpath.objects.XString.EMPTYSTRING;
    }
  }

NEW:
  public XMLString getStringFromNode(int n)
  {
    // %OPT%
    // I guess we'll have to get a static instance of the DTM manager...
    if(DTM.NULL != n)
    {
      if ( m_dtmMgr != null )
        return m_dtmMgr.getDTM(n).getStringValue(n);
          else
        return m_iter.getDTMManager().getDTM(n).getStringValue(n);
    }
    else
    {
      return org.apache.xpath.objects.XString.EMPTYSTRING;
    }
  }

CVS:
  public void dispatchCharactersEvents(org.xml.sax.ContentHandler ch)
          throws org.xml.sax.SAXException
  {
    int node = item(0);
        
    if(node != DTM.NULL)
    {

      m_dtmMgr.getDTM(node).dispatchCharactersEvents(node, ch, false);
    }
  }

NEW:
  public void dispatchCharactersEvents(org.xml.sax.ContentHandler ch)
          throws org.xml.sax.SAXException
  {
    int node = item(0);
        
    if(node != DTM.NULL)
    {
      if ( m_dtmMgr != null )
        m_dtmMgr.getDTM(node).dispatchCharactersEvents(node, ch, false);
          else
        m_iter.getDTMManager().getDTM(node).dispatchCharactersEvents(node,
ch, false);
    } 
  }

CVS:
  public NodeList nodelist() throws javax.xml.transform.TransformerException
  {
    org.apache.xml.dtm.ref.DTMNodeList nodelist = new
org.apache.xml.dtm.ref.DTMNodeList(this);
    // Creating a DTMNodeList has the side-effect that it will create a
clone
    // XNodeSet with cache and run m_iter to the end. You cannot get any
node
    // from m_iter after this call. As a fix, we call SetVector() on the
clone's 
    // cache. See Bugzilla 14406.
    XNodeSet clone = (XNodeSet)nodelist.getDTMIterator();
    SetVector(clone.getVector());
    return nodelist;
  }

NEW:
  public NodeList nodelist() throws javax.xml.transform.TransformerException
  {
    return new org.apache.xml.dtm.ref.DTMNodeList(iter());
/*
    org.apache.xml.dtm.ref.DTMNodeList nodelist = new
org.apache.xml.dtm.ref.DTMNodeList(this);
    // Creating a DTMNodeList has the side-effect that it will create a
clone
    // XNodeSet with cache and run m_iter to the end. You cannot get any
node
    // from m_iter after this call. As a fix, we call SetVector() on the
clone's 
    // cache. See Bugzilla 14406.
    XNodeSet clone = (XNodeSet)nodelist.getDTMIterator();
    SetVector(clone.getVector());
    return nodelist;
*/
  }

Pretty obviously this has to do with the DTM Manager (m_dtmMgr) not being
initialized. I vaguely recall this having something to do with an iterator,
but do not remember any more. At the moment I do not have time to
investigate further. I do know that we are using the modified version of
XNodeSet without problems. I do not remember the situation that would cause
m_dtmMgr not to be set - or why it could not be changed to set it - perhaps
just too many places that would need to be changed.

Sorry I could not be more helpful.

Art


-----Original Message-----
From: John Gentilin [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, July 15, 2003 2:39 PM
To: xalan
Subject: Re: SQL X-Connection


Art,

I don't think this is the rowset problem although I have to admit I have not
looked at the XNodeSet code very closely.

The problem with the rowset code is that the SortedWalker thinks that the
DTM Document is not in Document Order, so it walks the document trying to
put it back in document order.  Once it does this though, the JDBC 
recordset
is exhausted, in streaming mode, and the only row left is the last one. 
Now if you
select back on the rowset, there is only one element so the sorting 
happens but has
no effect. Subsequent templates i.e. "row" don't try to re-order the 
document because
the re-order already occurred. This bug has appeared before and Scot 
Boag has
fixed it but then it comes back. I think we are battling another bug 
that needs
preordered documents. Last I heard there was an effort to support DTM 
pruning
which would operate on preorderd documents.

-JG



I will need to do a little research on this. It was quite a while ago that I
submitted this and I have long since forgotten the details. I just remember
that it had something to do with results coming back (or not) or something
like that. I am also fairly certain that slightly different versions were
needed for Xalan 2.4 and 2.5. I thought that I had described the details at
the time in an e-mail. I will see if I can find that somewhere. Maybe I will
also do some DIFFs to figure out what I changed. Unfortunately, unless I was
particularly diligent in an e-mail that I can find (or it is obvious from
the code change) the rational may be lost.

It could be that this fixes the rowset problem described earlier... at least
the version of Xalan that I am running does not exhibit that problem - but
that could be because all my XConnections have multiple-results enabled. At
least I think so, personally I have not used the Xalan SQL extension in a
long time, other members of my team have been doing all of that.

I will try to get to this in the next few days... maybe tonight if I finish
the stuff I am working on early - or if curiosity gets the better of me...

Art



--- Begin Message ---
Off hand I am not aware of any post 1.1.8 code. Until fairly recently
EastPoint was limited to 1.1.8 as well. Fortunately we have been able to
move up to 1.3.1.
 
I actually spent some time in CodeWright's difference editor updating my
changes to the latest versions of the code from CVS. I think that they are
all current as of the day I sent the code to you and the list (the last
version). Now that you mention it though, you may want to check
XNodeSet.java. Look at the nodelist() method at line 385. If it looks like
this:
 
  public NodeList nodelist() throws javax.xml.transform.TransformerException
  {
    return new org.apache.xml.dtm.ref.DTMNodeList(iter());
/*
    org.apache.xml.dtm.ref.DTMNodeList nodelist = new
org.apache.xml.dtm.ref.DTMNodeList(this);
    // Creating a DTMNodeList has the side-effect that it will create a
clone
    // XNodeSet with cache and run m_iter to the end. You cannot get any
node
    // from m_iter after this call. As a fix, we call SetVector() on the
clone's 
    // cache. See Bugzilla 14406.
    XNodeSet clone = (XNodeSet)nodelist.getDTMIterator();
    SetVector(clone.getVector());
    return nodelist;
*/
  }

Then the non-commented line should be deleted and the commented section
should be uncommented. Basically if it is as above then I accidentally sent
the "EastPoint" version of this file. This is because the latest CVS version
of this file does not work with some older versions of stuff. The change
mentioned is the only change necessary to fix it. If it does not look like
that then I sent the correct version.
 
Art

-----Original Message-----
From: John Gentilin [mailto:[EMAIL PROTECTED] 
Sent: Monday, February 10, 2003 2:41 PM
To: Art Welch
Subject: Re: SQL Extension document update


Art, 

I will try to get to your code today. One thing I did not mention before,
the Xalan project 
has the restriction of only using JDK 1.1.8 classes. Not sure why the
limitation is there, 
but they check and reject often. Also did you verify the latest sources
before making the 
mods, I am not the only one that edits the code base. 


Regards 
John G 


[EMAIL PROTECTED] wrote: 


  

I did a quick update of the SQL Library document that I had done previously.
I think that it now accurately reflects the defaults that would be in place
with my enhancement proposal. 


Thank You, 
Art Welch 


<<SQL library11.zip>>

-- 
-------------------------------------- 
John Gentilin 
Eye Catching Solutions Inc. 
18314 Carlwyn Drive 
Castro Valley CA 94546 


    Contact Info 
[EMAIL PROTECTED] 
Ca Office 1-510-881-4821 
NJ Office 1-732-422-4917 
  


--- End Message ---

Reply via email to