correct usage of filter iterator pattern in document filter iterator