Lines 1-6
Link Here
|
1 |
/* |
1 |
/* |
2 |
|
2 |
|
3 |
Copyright 2000-2003 The Apache Software Foundation |
3 |
Copyright 2000-2003,2005 The Apache Software Foundation |
4 |
|
4 |
|
5 |
Licensed under the Apache License, Version 2.0 (the "License"); |
5 |
Licensed under the Apache License, Version 2.0 (the "License"); |
6 |
you may not use this file except in compliance with the License. |
6 |
you may not use this file except in compliance with the License. |
Lines 26-32
Link Here
|
26 |
import org.apache.batik.util.XMLConstants; |
26 |
import org.apache.batik.util.XMLConstants; |
27 |
import org.w3c.dom.Attr; |
27 |
import org.w3c.dom.Attr; |
28 |
import org.w3c.dom.DOMException; |
28 |
import org.w3c.dom.DOMException; |
29 |
import org.w3c.dom.Document; |
|
|
30 |
import org.w3c.dom.Element; |
29 |
import org.w3c.dom.Element; |
31 |
import org.w3c.dom.Node; |
30 |
import org.w3c.dom.Node; |
32 |
import org.w3c.dom.svg.SVGAnimatedEnumeration; |
31 |
import org.w3c.dom.svg.SVGAnimatedEnumeration; |
Lines 34-39
Link Here
|
34 |
import org.w3c.dom.svg.SVGAnimatedLength; |
33 |
import org.w3c.dom.svg.SVGAnimatedLength; |
35 |
import org.w3c.dom.svg.SVGAnimatedNumber; |
34 |
import org.w3c.dom.svg.SVGAnimatedNumber; |
36 |
import org.w3c.dom.svg.SVGAnimatedString; |
35 |
import org.w3c.dom.svg.SVGAnimatedString; |
|
|
36 |
import org.w3c.dom.svg.SVGDocument; |
37 |
import org.w3c.dom.svg.SVGElement; |
37 |
import org.w3c.dom.svg.SVGElement; |
38 |
import org.w3c.dom.svg.SVGException; |
38 |
import org.w3c.dom.svg.SVGException; |
39 |
import org.w3c.dom.svg.SVGFitToViewBox; |
39 |
import org.w3c.dom.svg.SVGFitToViewBox; |
Lines 210-215
Link Here
|
210 |
doc = (AbstractDocument) node.getOwnerDocument(); |
210 |
doc = (AbstractDocument) node.getOwnerDocument(); |
211 |
} |
211 |
} |
212 |
base = doc.getDocumentURI(); |
212 |
base = doc.getDocumentURI(); |
|
|
213 |
if (base == null && doc instanceof SVGDocument) { |
214 |
//getDocumentURI() is only available since after Batik 1.6. |
215 |
//The following line tries to establish backwards compatibility for |
216 |
//clients that can't call setDocumentURI(). |
217 |
base = ((SVGDocument)doc).getURL(); |
218 |
} |
213 |
} |
219 |
} |
214 |
while (node != null && node.getNodeType() != Node.ELEMENT_NODE) { |
220 |
while (node != null && node.getNodeType() != Node.ELEMENT_NODE) { |
215 |
node = node.getParentNode(); |
221 |
node = node.getParentNode(); |