W3C home > Mailing lists > Public > www-jigsaw@w3.org > March to April 1997

getNextComponent and peekNextComponent

From: Anselm Baird_Smith <abaird@www43.inria.fr>
Date: Wed, 12 Mar 1997 12:45:19 +0100 (MET)
Message-Id: <199703121145.MAA16687@www43.inria.fr>
To: Joel.Crisp@bristol.ac.uk
Cc: www-jigsaw@w3.org
Joel Crisp writes:
 > Hi
 > 
 > It looks to me as if there is some confusion as the behaviour of
 > resources implementing "lookup" on failure - some seem to consume the
 > path with getNextComponent -then if they have been called from a de
 > rived class via super and fail, the derived class no longer has access
 > to the relevent information. StoreContainer seems to be one of the
 > offenders.

Do you mean StoreContainer should call getNextComponent only *after*
making sure lookup(String name) did succeed ?

 > Personally, I believe that changing getNextComponent to
 > peekNextComponent would be more efficent - note that you have to
 > consume the path if there is a resource found.

If I understand correctly the rule would be for ContainerResource
sub-class to consume part of the path only if lookup succeed, and
otherwise, to leave the LookupState as it was (before lookup was
called)

 > Hmmm. Having said that, if a resource further down the line doesn't
 > find it, the path is consumed anyway. Maybe the whole method needs a
 > re-think and/or some better documentation on the intended behaviour.

I would tend to agree with that, and would like to clear it up before
next release.

Anselm.
Received on Wednesday, 12 March 1997 06:45:50 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 9 April 2012 12:13:26 GMT