Code

doc: add TODO comment for handling hrefs better.
authorpjrm <pjrm@users.sourceforge.net>
Mon, 13 Jul 2009 03:14:38 +0000 (03:14 +0000)
committerpjrm <pjrm@users.sourceforge.net>
Mon, 13 Jul 2009 03:14:38 +0000 (03:14 +0000)
src/display/nr-filter-image.cpp

index 9679e56e7d949f475eb53d0f03adf6109ca7d48d..2b799f8d26d3116979f0a47f8ab80179540549d1 100644 (file)
@@ -107,6 +107,13 @@ int FilterImage::render(FilterSlot &slot, FilterUnits const &units) {
 
     if (!image_pixbuf){
         try {
+            /* TODO: If feImageHref is absolute, then use that (preferably handling the
+             * case that it's not a file URI).  Otherwise, go up the tree looking
+             * for an xml:base attribute, and use that as the base URI for resolving
+             * the relative feImageHref URI.  Otherwise, if document && document->base,
+             * then use that as the base URI.  Otherwise, use feImageHref directly
+             * (i.e. interpreting it as relative to our current working directory).
+             * (See http://www.w3.org/TR/xmlbase/#resolution .) */
             gchar *fullname = feImageHref;
             if ( !g_file_test( fullname, G_FILE_TEST_EXISTS ) ) {
                 // Try to load from relative postion combined with document base