diff options
Diffstat (limited to 'src/uri-references.cpp')
| -rw-r--r-- | src/uri-references.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/uri-references.cpp b/src/uri-references.cpp index f2df55213..dc0101024 100644 --- a/src/uri-references.cpp +++ b/src/uri-references.cpp @@ -57,9 +57,11 @@ void URIReference::attach(const URI &uri) throw(BadURIException) } // The path contains references to seperate document files to load. - const char *path = uri.getPath(); - if(path && document != NULL) { - document = document->createChildDoc(path); + if(document && uri.getPath()) { + std::string base = std::string(g_strdup(document->getBase())); + std::string path = uri.getFullPath(base); + if(!path.empty()) + document = document->createChildDoc(path); } if(!document) { g_warning("Can't get document for referenced URI: %s", uri.toString()); |
