public function addItem($relative_path, $id = '', array $properties = []){
		$id = $id ?: $this->pathToId($relative_path);
		// Avoid duplication
		foreach( $this->dom->manifest->item as $item ){
			/** @var \SimpleXMLElement $item */
			$attr = $item->attributes();
			if( isset($attr['id']) && $id == $attr['id'] ){
				return $id;
			}
		}
		// This is unique.
		$item = $this->dom->manifest->addChild('item');
		$item['id'] = $id;
		$item['href'] = $relative_path;
		$item['media-type'] = Mime::getTypeFromPath($relative_path);
		if( $properties ){
			$item['properties'] = implode(' ', $properties);
		}
		return $id;
	}