Yah, I mis-spoked.  <PLAY> is the "root node", but it's contained
by a higher "document node".

The document node contains the root node and any processing-instructions
or comments that are peers of the root node:

        <!-- I am a comment -->

        <root-node/>

        <?process-me I like cheese?>

All three of those items are contained within the 'document node'.

        -bob



On Fri, 3 May 2002, Eddie Mc Greal wrote:

> the root is a vitual node I presume - I was assuming PLAY was the root but I
> suppose the root had to be above that in order for /PLAY to work
> Thanks for the clarification
> Eddie
> 
> ----- Original Message -----
> From: bob mcwhirter <[EMAIL PROTECTED]>
> To: Eddie Mc Greal <[EMAIL PROTECTED]>
> Cc: <[EMAIL PROTECTED]>
> Sent: Friday, May 03, 2002 4:38 PM
> Subject: Re: [Jaxen] DefaultLcationPath
> 
> 
> >
> > You get <ACT>, <PLAY> and the 'root node' above the <PLAY> element.
> >
> > I think 3 is correct, in this case.
> >
> > -bob
> >
> >
> > On Fri, 3 May 2002, Eddie Mc Greal wrote:
> >
> > > Another thing I'm wondering about....
> > >
> > > using the context /PLAY/ACT/SCENE[1]
> > > I would expect
> > > count(ancestor::*) to return 2  i.e. /PLAY/ACT and not 3 as the test
> expects
> > > ancestor doesn't include itself by mistake?
> > > Eddie
> > >
> > >
> > >
> > > ----- Original Message -----
> > > From: bob mcwhirter <[EMAIL PROTECTED]>
> > > To: Eddie Mc Greal <[EMAIL PROTECTED]>
> > > Cc: <[EMAIL PROTECTED]>
> > > Sent: Friday, May 03, 2002 4:29 PM
> > > Subject: Re: [Jaxen] DefaultLcationPath
> > >
> > >
> > > >
> > > > Hmmm...
> > > >
> > > > I just cribbed HashMap from the Sun sources, and changed the equals()
> > > > and hashCode() calls.  I'll try to get a chance to look at it today,
> > > > but no promises.
> > > >
> > > > Anyone want to run a diff against 1.4's IdentityHashMap?
> > > > (or just copy it from the JDK into Jaxen?)
> > > >
> > > > -bob
> > > >
> > > > On Fri, 3 May 2002, Eddie Mc Greal wrote:
> > > >
> > > > > point taken - didn't think of that
> > > > > However there is still a problem - I don' think the IdentityHashMap
> > > works
> > > > > correctly.
> > > > >
> > > > > The following doesn't produce the correct result
> > > > > count(PLAY/ACT/SCENE[1] ) returns 1
> > > > > when I take out the identity map I get 5 but then all the ancestor
> test
> > > > > fail! (obvious to me now )
> > > > > So, I'll commit my version of the DefaultLocationPath as I'm pretty
> sure
> > > it
> > > > > is correct - can you look at the IdentityMap issue - all the
> ancestor
> > > test
> > > > > are currently broken
> > > > > Eddie
> > > > >
> > > > > ----- Original Message -----
> > > > > From: bob mcwhirter <[EMAIL PROTECTED]>
> > > > > To: Eddie Mc Greal <[EMAIL PROTECTED]>
> > > > > Cc: <[EMAIL PROTECTED]>
> > > > > Sent: Friday, May 03, 2002 3:51 PM
> > > > > Subject: Re: [Jaxen] DefaultLcationPath
> > > > >
> > > > >
> > > > > > On Fri, 3 May 2002, Eddie Mc Greal wrote:
> > > > > >
> > > > > > > after furter investigation  I found the following
> > > > > > > the reason for the change (1.8 to 1.9) was the following xpath
> > > > > > >
> > > > > > > count(/PLAY/ACT/SCENE[1]) should be 5 and not 1.
> > > > > > > However, the fix for this problem (made by xcut) is incorrect.
> > > > > > > The problem is the use of the unique map to filter out identical
> > > nodes
> > > > > but /PLAY/ACT/SCENE produces several SCENE nodes. Only adding the
> first
> > > one
> > > > > leads to the bug that count only finds 1 instead of 5.
> > > > > > > I've removed the unique map (any objections? why was it used in
> the
> > > > > first place?) and checked it in. All test pass including
> > > > > count(/PLAY/ACT/SCENE[1])
> > > > > >
> > > > > > The IdentityHashMap?
> > > > > >
> > > > > > That's there, because of things involving '..'.
> > > > > >
> > > > > > /PLAY/ACT/..
> > > > > >
> > > > > > That selects the ACTs, obviously, and then their parents.
> > > > > >
> > > > > > Typically, a play has 5 ACTs, so then we're looking at 5 instances
> of
> > > > > > the PLAY parent.  Being a node-set (instead of a node-bag), we
> have to
> > > > > > eliminate the duplicate instances of PLAY.
> > > > > >
> > > > > > The Map, if its the one I'm thinking of, though, should be an
> > > > > > IdentityHashMap, which would allow 5 different ACT elements in it,
> as
> > > > > > long as they were not the same instance.  (It uses the identity
> > > hashCode
> > > > > > and ==, instead of hashCode() and equals()).
> > > > > >
> > > > > > So, I guess the test we need is that:
> > > > > >
> > > > > > count(/PLAY/ACT/SCENE/../..) == 1
> > > > > >
> > > > > > or
> > > > > >
> > > > > > count(/PLAY/ACT/SCENE/..) == 5
> > > > > >
> > > > > > -bob
> > > > > >
> > > > > >
> > > > > > _______________________________________________________________
> > > > > >
> > > > > > Have big pipes? SourceForge.net is looking for download mirrors.
> We
> > > supply
> > > > > > the hardware. You get the recognition. Email Us:
> > > [EMAIL PROTECTED]
> > > > > > _______________________________________________
> > > > > > Jaxen-interest mailing list
> > > > > > [EMAIL PROTECTED]
> > > > > > https://lists.sourceforge.net/lists/listinfo/jaxen-interest
> > > > >
> > > >
> > > >
> > > > _______________________________________________________________
> > > >
> > > > Have big pipes? SourceForge.net is looking for download mirrors. We
> supply
> > > > the hardware. You get the recognition. Email Us:
> [EMAIL PROTECTED]
> > > > _______________________________________________
> > > > Jaxen-interest mailing list
> > > > [EMAIL PROTECTED]
> > > > https://lists.sourceforge.net/lists/listinfo/jaxen-interest
> > >
> >
> >
> > _______________________________________________________________
> >
> > Have big pipes? SourceForge.net is looking for download mirrors. We supply
> > the hardware. You get the recognition. Email Us: [EMAIL PROTECTED]
> > _______________________________________________
> > Jaxen-interest mailing list
> > [EMAIL PROTECTED]
> > https://lists.sourceforge.net/lists/listinfo/jaxen-interest
> 


_______________________________________________________________

Have big pipes? SourceForge.net is looking for download mirrors. We supply
the hardware. You get the recognition. Email Us: [EMAIL PROTECTED]
_______________________________________________
Jaxen-interest mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jaxen-interest

Reply via email to