code: private static boolean hasSiteMapUrl(
  		final ServletContext servletContext,
  		final HttpServletRequest req,
  		final HttpServletResponse resp,
  		final SortedSet<View> views,
  		final Book book,
  		PageRef pageRef
  	) throws ServletException, IOException {
  		Boolean result = CapturePage.traversePagesAnyOrder(
  			servletContext,
  			req,
  			resp,
  			pageRef,
  			CaptureLevel.META,
  			new CapturePage.PageHandler<Boolean>() {
  				@Override
  				public Boolean handlePage(Page page) throws ServletException, IOException {
  					// TODO: Chance for more concurrency here by view?
  					for(View view : views) {
  						if(
  							view.getAllowRobots(servletContext, req, resp, page)
  							&& view.isApplicable(servletContext, req, resp, page)
  						) {
  							return true;
  						}
  					}
  					return null;
  				}
  			},
  			new CapturePage.TraversalEdges() {
  				@Override
  				public Set<ChildRef> getEdges(Page page) {
  					return page.getChildRefs();
  				}
  			},
  			new CapturePage.EdgeFilter() {
  				@Override
  				public boolean applyEdge(PageRef childPage) {
  					return book.getBookRef().equals(childPage.getBookRef());
  				}
  			}
  		);
  		assert result == null || result : "Should always be null or true";
  		return result != null;
  	}
docs: Checks if the sitemap has at least one page.
  This version implemented as a traversal.