Code

Remove use of obsolete sodipodi:docbase from Python scripts (see bug 246721).
authorsasilver <sasilver@users.sourceforge.net>
Wed, 9 Jul 2008 09:09:20 +0000 (09:09 +0000)
committersasilver <sasilver@users.sourceforge.net>
Wed, 9 Jul 2008 09:09:20 +0000 (09:09 +0000)
share/extensions/embedimage.py
share/extensions/svg_and_media_zip_output.py

index 80030a0007f3a0791c586866b13e446b2e397806..ab903a18e90919c0595e8462bc4d3fee9672651a 100644 (file)
@@ -57,19 +57,14 @@ class Embedder(inkex.Effect):
             absref=node.get(inkex.addNS('absref','sodipodi'))
             href=xlink
             svg=self.document.getroot().xpath('/svg:svg', namespaces=inkex.NSS)[0]
-            docbase=svg.get(inkex.addNS('docbase','sodipodi'))
-
             path=''
             #path selection strategy:
             # 1. href if absolute
-            # 2. sodipodi:docbase + href
-            # 3. realpath-ified href
-            # 4. absref, only if the above does not point to a file
+            # 2. realpath-ified href
+            # 3. absref, only if the above does not point to a file
             if (href != None):
                 if (os.path.isabs(href)):
                     path=os.path.realpath(href)
-                elif (docbase != None):
-                    path=os.path.join(docbase,href)
                 else:
                     path=os.path.realpath(href)
             if (not os.path.isfile(path)):
index e34f01749199fa62cda3c6cb6b965c5701844932..cc8f7db0e1f8f14f72554a4586310474de2e1942 100644 (file)
@@ -53,7 +53,6 @@ class MyEffect(inkex.Effect):
     def effect(self):
         ttmp_orig = self.document.getroot()
 
-        docbase = ttmp_orig.get(inkex.addNS('docbase',u'sodipodi'),'')
         docname = ttmp_orig.get(inkex.addNS('docname',u'sodipodi'))
 
         orig_tmpfile = sys.argv[1]