You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by Gary L Peskin <ga...@firstech.com> on 2000/11/01 01:13:10 UTC

Re: Revised diffs for DocumentFragment processing

Scott_Boag@lotus.com wrote:
> 
> Gary L Peskin <ga...@firstech.com> wrote:
> > Look at the code that gets called if we remove this.  That code is
> > NodeTest.execute(XPathContext).  If nodeType is Node.ATTRIBUTE_NODE and
> > m_whatToShow is anything but NodeFilter.SHOW_ATTRIBUTE, nodeBit will be
> > zero and this code will return SCORE_NONE also.
> 
> The first line of the NodeTest.execute function is:
> 
> if(m_whatToShow == NodeFilter.SHOW_ALL)
>      return m_score;
> 
> (unless I missed something in your diffs, which I might have.)
> 
> Go ahead and check in the changes.  I'll run it through the conformance
> test to see if it will really fail the test I'm thinking of, and I'll think
> about how to deal with the "node()" match pattern in more detail.

Scott --

If the test fails, which it might, we should look at how the pattern is
compiled.  If you supply me with the failing test case, I'd be happy to
do the research.  In the meantime, we can put the old tests back in so
that Xalan will run okay.  I'll commit with the tests commented out,
rather than removed, so they'll be easy to restore.

I've noticed parts of the code where we compare things to NodeFilter
(other than SHOW_ALL) using == rather than using & and processing the
masked bits.  This somewhat limits our flexibility so I'd like to clean
this up.  If this test case can highlight those trouble spots, it will
be a good thing in the long run, I think,

Gary

Re: Revised diffs for DocumentFragment processing

Posted by Gary L Peskin <ga...@firstech.com>.
Gary L Peskin wrote:
> I've uploaded the changes for the DocumentFragment processing.  I left
> those special tests in because I was able to cause some failures when I
> removed them.  It seems to me that we should maybe be creating a node()
> test with , for example,
> 
>   ~NodeFilter.SHOW_ATTRIBUTE & ~NodeFilter.SHOW_DOCUMENT &
> ~NodeFilter.SHOW_DOCUMENT_FRAGMENT
> 
> or something like that.  I'm going to do some looking into this on my
> side.
> 

David --

Now I see what prompted your email.  Yes, I agree with you.  The concept
above is definitely _not_ correct.  I was just at the beginning of my
ruminations about this issue, feeling that NodeFilter.SHOW_ALL was not
the right approach.  My suggestion was in an early stage of me thinking
out loud.

I apologize for any confusion that this caused.

Gary

Re: Revised diffs for DocumentFragment processing

Posted by Gary L Peskin <ga...@firstech.com>.
I've uploaded the changes for the DocumentFragment processing.  I left
those special tests in because I was able to cause some failures when I
removed them.  It seems to me that we should maybe be creating a node()
test with , for example,

  ~NodeFilter.SHOW_ATTRIBUTE & ~NodeFilter.SHOW_DOCUMENT &
~NodeFilter.SHOW_DOCUMENT_FRAGMENT

or something like that.  I'm going to do some looking into this on my
side.

At any rate, the stuff that is uploaded should work.  Please let me know
if any conformance tests fail and I can fix that, provided they used to
work!

I'd really like to get rid of those special case tests, if I could.

Gary