protected function resolveIri($iri)
    {
        if (null === $this->document) {
            $base = new IRI();
        } else {
            $base = $this->document->getIri(true);
        }

        return $base->resolve($iri);
    }