private void validateFilter(Document filter) throws IncorrectFilterException{
		
		//Define which types to check for.
		//TODO The types should probably be converted to classes in case we want to add more in the future, but for now, this suffices. 
		List<String> inclusionTypes = new ArrayList<String>();
		inclusionTypes.add("include");
		inclusionTypes.add("exclude");
		inclusionTypes.add("all");
		
		//Get a list of all <include || exclude || all> in this filter.
		List<Node> nodesToCheck = filter.selectNodes("//*[self::include or self::exclude or self::all]");
		for(Iterator<Node> i = nodesToCheck.iterator(); i.hasNext();){
			Node node = i.next();
			String checkPath = "./*[";
			int s = 0;
			for(Iterator<String> c = inclusionTypes.iterator(); c.hasNext();){
				String type = c.next();
				if(!type.equals(node.getName())){
					if(s != 0){
						checkPath += " or ";
					}
					checkPath += "self::" + type;
					s++;
				}
				
				
			}
			checkPath += "]";
			
			//For each <include || exclude || all> check if there is another one active on this level, if that is the case the filter is incorrect and an exception should be thrown. 
			if(node.getParent().selectNodes(checkPath).size() > 0){
				throw new IncorrectFilterException("More than one inclusion type detected for this filter, this is not allowed!");
			}
		}
	}