summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkitfox2007-04-13 00:46:34 +0200
committerkitfox2007-04-13 00:46:34 +0200
commit79060105be1925398bd904d5a8cb9fb69baa949c (patch)
tree795039b8d3a408822e4c9fe95cdfbe0d20e1928a
parentPseudocode for main rendering logic. Roughing in SVG structure. (diff)
downloadsvg-salamander-core-79060105be1925398bd904d5a8cb9fb69baa949c.tar.gz
svg-salamander-core-79060105be1925398bd904d5a8cb9fb69baa949c.tar.xz
svg-salamander-core-79060105be1925398bd904d5a8cb9fb69baa949c.zip
Added Document Structure interfaces
git-svn-id: https://svn.java.net/svn/svgsalamander~svn/trunk/svg-core@13 7dc7fa77-23fb-e6ad-8e2e-c86bd48ed22b
-rwxr-xr-xsrc/main/java/com/kitfox/salamander/svg/DOMString.java25
-rwxr-xr-xsrc/main/java/com/kitfox/salamander/svg/basic/SVGAngle.java4
-rwxr-xr-xsrc/main/java/com/kitfox/salamander/svg/basic/SVGAnimatedString.java4
-rwxr-xr-xsrc/main/java/com/kitfox/salamander/svg/basic/SVGColor.java7
-rwxr-xr-xsrc/main/java/com/kitfox/salamander/svg/basic/SVGLangSpace.java6
-rwxr-xr-xsrc/main/java/com/kitfox/salamander/svg/basic/SVGLength.java4
-rwxr-xr-xsrc/main/java/com/kitfox/salamander/svg/basic/SVGStringList.java3
-rwxr-xr-xsrc/main/java/com/kitfox/salamander/svg/basic/SVGStylable.java3
-rwxr-xr-xsrc/main/java/com/kitfox/salamander/svg/basic/SVGTests.java4
-rwxr-xr-xsrc/main/java/com/kitfox/salamander/svg/basic/SVGViewSpec.java9
-rwxr-xr-xsrc/main/java/com/kitfox/salamander/svg/coordSystems/SVGPoint.java44
-rwxr-xr-xsrc/main/java/com/kitfox/salamander/svg/coordSystems/SVGPointList.java25
-rwxr-xr-xsrc/main/java/com/kitfox/salamander/svg/docStruct/GetSVGDocument.java27
-rwxr-xr-xsrc/main/java/com/kitfox/salamander/svg/docStruct/SVGDefsElement.java30
-rwxr-xr-xsrc/main/java/com/kitfox/salamander/svg/docStruct/SVGDescElement.java24
-rwxr-xr-xsrc/main/java/com/kitfox/salamander/svg/docStruct/SVGDocument.java49
-rwxr-xr-xsrc/main/java/com/kitfox/salamander/svg/docStruct/SVGElementInstance.java65
-rwxr-xr-xsrc/main/java/com/kitfox/salamander/svg/docStruct/SVGElementInstanceList.java29
-rwxr-xr-xsrc/main/java/com/kitfox/salamander/svg/docStruct/SVGGElement.java30
-rwxr-xr-xsrc/main/java/com/kitfox/salamander/svg/docStruct/SVGImageElement.java52
-rwxr-xr-xsrc/main/java/com/kitfox/salamander/svg/docStruct/SVGSVGElement.java252
-rwxr-xr-xsrc/main/java/com/kitfox/salamander/svg/docStruct/SVGSwitchElement.java30
-rwxr-xr-xsrc/main/java/com/kitfox/salamander/svg/docStruct/SVGSymbolElement.java29
-rwxr-xr-xsrc/main/java/com/kitfox/salamander/svg/docStruct/SVGTitleElement.java24
-rwxr-xr-xsrc/main/java/com/kitfox/salamander/svg/docStruct/SVGUseElement.java55
-rwxr-xr-xsrc/main/java/com/kitfox/salamander/svg/paint/SVGPaint.java6
26 files changed, 822 insertions, 18 deletions
diff --git a/src/main/java/com/kitfox/salamander/svg/DOMString.java b/src/main/java/com/kitfox/salamander/svg/DOMString.java
new file mode 100755
index 0000000..1860b5b
--- /dev/null
+++ b/src/main/java/com/kitfox/salamander/svg/DOMString.java
@@ -0,0 +1,25 @@
+/*
+ * SVGString.java
+ *
+ * Created on April 12, 2007, 2:47 PM
+ *
+ * To change this template, choose Tools | Template Manager
+ * and open the template in the editor.
+ */
+
+package com.kitfox.salamander.svg;
+
+import com.kitfox.salamander.svg.basic.*;
+
+/**
+ * Used for attributes of basic type 'string'.
+ * @author kitfox
+ */
+public interface DOMString extends SVGDataType
+{
+ /**
+ * The value of the given attribute.
+ */
+ public String getValue();
+
+}
diff --git a/src/main/java/com/kitfox/salamander/svg/basic/SVGAngle.java b/src/main/java/com/kitfox/salamander/svg/basic/SVGAngle.java
index 2bb0beb..fc40bc3 100755
--- a/src/main/java/com/kitfox/salamander/svg/basic/SVGAngle.java
+++ b/src/main/java/com/kitfox/salamander/svg/basic/SVGAngle.java
@@ -9,6 +9,8 @@
package com.kitfox.salamander.svg.basic;
+import com.kitfox.salamander.svg.DOMString;
+
/**
*
* The SVGAngle interface corresponds to the <angle> basic data type.
@@ -53,7 +55,7 @@ public interface SVGAngle extends SVGDataType
/**
* The angle value as a string value, in the units expressed by unitType. Setting this attribute will cause value and valueInSpecifiedUnits to be updated automatically to reflect this setting.
*/
- public SVGString getValueAsString();
+ public DOMString getValueAsString();
/**
* Reset the value as a number with an associated unitType, thereby replacing the values for all of the attributes on the object.
diff --git a/src/main/java/com/kitfox/salamander/svg/basic/SVGAnimatedString.java b/src/main/java/com/kitfox/salamander/svg/basic/SVGAnimatedString.java
index e105b7d..1ec000d 100755
--- a/src/main/java/com/kitfox/salamander/svg/basic/SVGAnimatedString.java
+++ b/src/main/java/com/kitfox/salamander/svg/basic/SVGAnimatedString.java
@@ -9,11 +9,13 @@
package com.kitfox.salamander.svg.basic;
+import com.kitfox.salamander.svg.DOMString;
+
/**
*
* Used for attributes of type DOMString which can be animated.
* @author kitfox
*/
-public interface SVGAnimatedString extends SVGAnimatedDataType<SVGString>
+public interface SVGAnimatedString extends SVGAnimatedDataType<DOMString>
{
}
diff --git a/src/main/java/com/kitfox/salamander/svg/basic/SVGColor.java b/src/main/java/com/kitfox/salamander/svg/basic/SVGColor.java
index c7dc25b..13eed11 100755
--- a/src/main/java/com/kitfox/salamander/svg/basic/SVGColor.java
+++ b/src/main/java/com/kitfox/salamander/svg/basic/SVGColor.java
@@ -9,6 +9,7 @@
package com.kitfox.salamander.svg.basic;
+import com.kitfox.salamander.svg.DOMString;
import com.kitfox.salamander.svg.SVGException;
import org.w3c.dom.css.CSSValue;
import org.w3c.dom.css.RGBColor;
@@ -58,14 +59,14 @@ public interface SVGColor extends SVGDataType, CSSValue
* @param rgbColor The new color value.
* @throws com.kitfox.salamander.svg.SVGException SVG_INVALID_VALUE_ERR: Raised if one of the parameters has an invalid value.
*/
- public void setRGBColor(SVGString rgbColor) throws SVGException;
+ public void setRGBColor(DOMString rgbColor) throws SVGException;
/**
* Modifies the color value to be the specified sRGB color with an alternate ICC color specification.
* @param rgbColor The new color value.
* @param iccColor The alternate ICC color specification.
* @throws com.kitfox.salamander.svg.SVGException SVG_INVALID_VALUE_ERR: Raised if one of the parameters has an invalid value.
*/
- public void setRGBColorICCCOlor(SVGString rgbColor, SVGString iccColor) throws SVGException;
+ public void setRGBColorICCCOlor(DOMString rgbColor, DOMString iccColor) throws SVGException;
/**
* Sets the colorType as specified by the parameters. If colorType requires an RGBColor, then rgbColor must be a valid RGBColor object; otherwise, rgbColor must be null. If colorType requires an SVGICCColor, then iccColor must be a valid SVGICCColor object; otherwise, iccColor must be null.
* @param colorType One of the defined constants for colorType.
@@ -73,6 +74,6 @@ public interface SVGColor extends SVGDataType, CSSValue
* @param iccColor The specification of an ICC color, or null.
* @throws com.kitfox.salamander.svg.SVGException SVG_INVALID_VALUE_ERR: Raised if one of the parameters has an invalid value.
*/
- public void setColor(Type colorType, SVGString rgbColor, SVGString iccColor) throws SVGException;
+ public void setColor(Type colorType, DOMString rgbColor, DOMString iccColor) throws SVGException;
}
diff --git a/src/main/java/com/kitfox/salamander/svg/basic/SVGLangSpace.java b/src/main/java/com/kitfox/salamander/svg/basic/SVGLangSpace.java
index 005f4aa..f2326bb 100755
--- a/src/main/java/com/kitfox/salamander/svg/basic/SVGLangSpace.java
+++ b/src/main/java/com/kitfox/salamander/svg/basic/SVGLangSpace.java
@@ -9,6 +9,8 @@
package com.kitfox.salamander.svg.basic;
+import com.kitfox.salamander.svg.DOMString;
+
/**
*
* Interface SVGLangSpace defines an interface which applies to all elements which have attributes xml:lang and xml:space.
@@ -19,9 +21,9 @@ public interface SVGLangSpace
/**
* Corresponds to attribute xml:lang on the given element.
*/
- public SVGString getXmllang();
+ public DOMString getXmllang();
/**
* Corresponds to attribute xml:space on the given element.
*/
- public SVGString getXmlspace();
+ public DOMString getXmlspace();
}
diff --git a/src/main/java/com/kitfox/salamander/svg/basic/SVGLength.java b/src/main/java/com/kitfox/salamander/svg/basic/SVGLength.java
index 472498d..9e60b46 100755
--- a/src/main/java/com/kitfox/salamander/svg/basic/SVGLength.java
+++ b/src/main/java/com/kitfox/salamander/svg/basic/SVGLength.java
@@ -9,6 +9,8 @@
package com.kitfox.salamander.svg.basic;
+import com.kitfox.salamander.svg.DOMString;
+
/**
*
* The SVGLength interface corresponds to the &lt;length&gt; basic data type.
@@ -80,7 +82,7 @@ public interface SVGLength extends SVGDataType
/**
* The value as a string value, in the units expressed by unitType. Setting this attribute will cause value and valueInSpecifiedUnits to be updated automatically to reflect this setting.
*/
- public SVGString getValueAsString();
+ public DOMString getValueAsString();
/**
* Reset the value as a number with an associated unitType, thereby replacing the values for all of the attributes on the object.
diff --git a/src/main/java/com/kitfox/salamander/svg/basic/SVGStringList.java b/src/main/java/com/kitfox/salamander/svg/basic/SVGStringList.java
index 1a60497..1909fd9 100755
--- a/src/main/java/com/kitfox/salamander/svg/basic/SVGStringList.java
+++ b/src/main/java/com/kitfox/salamander/svg/basic/SVGStringList.java
@@ -10,6 +10,7 @@
package com.kitfox.salamander.svg.basic;
import com.kitfox.salamander.svg.DOMException;
+import com.kitfox.salamander.svg.DOMString;
import com.kitfox.salamander.svg.SVGException;
@@ -19,6 +20,6 @@ import com.kitfox.salamander.svg.SVGException;
* SVGStringList has the same attributes and methods as other SVGxxxList interfaces. Implementers may consider using a single base class to implement the various SVGxxxList interfaces.
* @author kitfox
*/
-public interface SVGStringList extends SVGList<SVGString>
+public interface SVGStringList extends SVGList<DOMString>
{
}
diff --git a/src/main/java/com/kitfox/salamander/svg/basic/SVGStylable.java b/src/main/java/com/kitfox/salamander/svg/basic/SVGStylable.java
index 41cdc13..15b2f4d 100755
--- a/src/main/java/com/kitfox/salamander/svg/basic/SVGStylable.java
+++ b/src/main/java/com/kitfox/salamander/svg/basic/SVGStylable.java
@@ -9,6 +9,7 @@
package com.kitfox.salamander.svg.basic;
+import com.kitfox.salamander.svg.DOMString;
import org.w3c.dom.css.CSSStyleDeclaration;
import org.w3c.dom.css.CSSValue;
@@ -31,5 +32,5 @@ public interface SVGStylable
* @param name Retrieves a "presentation attribute" by name.
* @return The static/base value of the given presentation attribute as a CSSValue, or NULL if the given attribute does not have a specified value.
*/
- public CSSValue getPresentationAttribute(SVGString name);
+ public CSSValue getPresentationAttribute(DOMString name);
}
diff --git a/src/main/java/com/kitfox/salamander/svg/basic/SVGTests.java b/src/main/java/com/kitfox/salamander/svg/basic/SVGTests.java
index aaa2041..1ae0e4d 100755
--- a/src/main/java/com/kitfox/salamander/svg/basic/SVGTests.java
+++ b/src/main/java/com/kitfox/salamander/svg/basic/SVGTests.java
@@ -9,6 +9,8 @@
package com.kitfox.salamander.svg.basic;
+import com.kitfox.salamander.svg.DOMString;
+
/**
*
* Interface SVGTests defines an interface which applies to all elements which have attributes requiredFeatures, requiredExtensions and systemLanguage.
@@ -33,5 +35,5 @@ public interface SVGTests
* @param extension The name of the extension, expressed as a URI.
* @return True or false, depending on whether the given extension is supported.
*/
- public boolean hasExtension(SVGString extension);
+ public boolean hasExtension(DOMString extension);
}
diff --git a/src/main/java/com/kitfox/salamander/svg/basic/SVGViewSpec.java b/src/main/java/com/kitfox/salamander/svg/basic/SVGViewSpec.java
index addb8bd..5c739e0 100755
--- a/src/main/java/com/kitfox/salamander/svg/basic/SVGViewSpec.java
+++ b/src/main/java/com/kitfox/salamander/svg/basic/SVGViewSpec.java
@@ -9,6 +9,7 @@
package com.kitfox.salamander.svg.basic;
+import com.kitfox.salamander.svg.DOMString;
import com.kitfox.salamander.svg.coordSystems.SVGTransformList;
/**
@@ -29,17 +30,17 @@ public interface SVGViewSpec extends SVGZoomAndPan, SVGFitToViewBox
/**
* Corresponds to the viewBox setting on the SVG View Specification.
*/
- public SVGString getViewBoxString();
+ public DOMString getViewBoxString();
/**
* Corresponds to the preserveAspectRatio setting on the SVG View Specification.
*/
- public SVGString getPreserveAspectRatioString();
+ public DOMString getPreserveAspectRatioString();
/**
* Corresponds to the transform setting on the SVG View Specification.
*/
- public SVGString getTransformString();
+ public DOMString getTransformString();
/**
* Corresponds to the viewTarget setting on the SVG View Specification.
*/
- public SVGString getTargetString();
+ public DOMString getTargetString();
}
diff --git a/src/main/java/com/kitfox/salamander/svg/coordSystems/SVGPoint.java b/src/main/java/com/kitfox/salamander/svg/coordSystems/SVGPoint.java
new file mode 100755
index 0000000..19e5fb7
--- /dev/null
+++ b/src/main/java/com/kitfox/salamander/svg/coordSystems/SVGPoint.java
@@ -0,0 +1,44 @@
+/*
+ * SVGPoint.java
+ *
+ * Created on April 12, 2007, 5:53 PM
+ *
+ * To change this template, choose Tools | Template Manager
+ * and open the template in the editor.
+ */
+
+package com.kitfox.salamander.svg.coordSystems;
+
+import com.kitfox.salamander.svg.basic.SVGDataType;
+
+/**
+ *
+ * Many of the SVG DOM interfaces refer to objects of class SVGPoint. An SVGPoint is an (x,y) coordinate pair. When used in matrix operations, an SVGPoint is treated as a vector of the form:
+ *
+ * <code>
+ * [x]
+ * [y]
+ * [1]
+ * </code>
+ * @author kitfox
+ */
+public interface SVGPoint extends SVGDataType
+{
+ /**
+ * The x coordinate.
+ */
+ public float getX();
+ /**
+ * The y coordinate.
+ */
+ public float getY();
+
+ /**
+ * Applies a 2x3 matrix transformation on this SVGPoint object and returns a new, transformed SVGPoint object:
+ *
+ * <CODE>newpoint = matrix * thispoint</CODE>
+ * @param matrix The matrix which is to be applied to this SVGPoint object.
+ * @return A new SVGPoint object.
+ */
+ public SVGPoint matrixTransform(SVGMatrix matrix);
+}
diff --git a/src/main/java/com/kitfox/salamander/svg/coordSystems/SVGPointList.java b/src/main/java/com/kitfox/salamander/svg/coordSystems/SVGPointList.java
new file mode 100755
index 0000000..0a8e298
--- /dev/null
+++ b/src/main/java/com/kitfox/salamander/svg/coordSystems/SVGPointList.java
@@ -0,0 +1,25 @@
+/*
+ * SVGTransformList.java
+ *
+ * Created on April 12, 2007, 1:09 PM
+ *
+ * To change this template, choose Tools | Template Manager
+ * and open the template in the editor.
+ */
+
+package com.kitfox.salamander.svg.coordSystems;
+
+import com.kitfox.salamander.svg.basic.SVGList;
+
+
+/**
+ * <p>This interface defines a list of SVGTransform objects.</p>
+ *
+ * <p>The SVGTransformList and SVGTransform interfaces correspond to the various attributes which specify a set of transformations, such as the transform attribute which is available for many of SVG's elements.</p>
+ *
+ * <p>SVGTransformList has the same attributes and methods as other SVGxxxList interfaces. Implementers may consider using a single base class to implement the various SVGxxxList interfaces.</p>
+ * @author kitfox
+ */
+public interface SVGPointList extends SVGList<SVGPoint>
+{
+}
diff --git a/src/main/java/com/kitfox/salamander/svg/docStruct/GetSVGDocument.java b/src/main/java/com/kitfox/salamander/svg/docStruct/GetSVGDocument.java
new file mode 100755
index 0000000..118f92f
--- /dev/null
+++ b/src/main/java/com/kitfox/salamander/svg/docStruct/GetSVGDocument.java
@@ -0,0 +1,27 @@
+/*
+ * GetSVGDocument.java
+ *
+ * Created on April 12, 2007, 6:33 PM
+ *
+ * To change this template, choose Tools | Template Manager
+ * and open the template in the editor.
+ */
+
+package com.kitfox.salamander.svg.docStruct;
+
+import org.w3c.dom.DOMException;
+
+/**
+ *
+ * In the case where an SVG document is embedded by reference, such as when an XHTML document has an 'object' element whose href (or equivalent) attribute references an SVG document (i.e., a document whose MIME type is "image/svg+xml" and whose root element is thus an 'svg' element), the SVG user agent is required to implement the GetSVGDocument interface for the element which references the SVG document (e.g., the HTML 'object' or comparable referencing elements).
+ * @author kitfox
+ */
+public interface GetSVGDocument
+{
+ /**
+ * Returns the SVGDocument object for the referenced SVG document.
+ * @return The SVGDocument object for the referenced SVG document.
+ * @throws org.w3c.dom.DOMException NOT_SUPPORTED_ERR: No SVGDocument object is available.
+ */
+ public SVGDocument getSVGDocument() throws DOMException;
+}
diff --git a/src/main/java/com/kitfox/salamander/svg/docStruct/SVGDefsElement.java b/src/main/java/com/kitfox/salamander/svg/docStruct/SVGDefsElement.java
new file mode 100755
index 0000000..881ee3f
--- /dev/null
+++ b/src/main/java/com/kitfox/salamander/svg/docStruct/SVGDefsElement.java
@@ -0,0 +1,30 @@
+/*
+ * SVGGElement.java
+ *
+ * Created on April 12, 2007, 6:14 PM
+ *
+ * To change this template, choose Tools | Template Manager
+ * and open the template in the editor.
+ */
+
+package com.kitfox.salamander.svg.docStruct;
+
+import com.kitfox.salamander.svg.basic.SVGElement;
+import com.kitfox.salamander.svg.basic.SVGExternalResourcesRequired;
+import com.kitfox.salamander.svg.basic.SVGLangSpace;
+import com.kitfox.salamander.svg.basic.SVGStylable;
+import com.kitfox.salamander.svg.basic.SVGTests;
+import com.kitfox.salamander.svg.basic.SVGTransformable;
+import org.w3c.dom.events.EventTarget;
+
+/**
+ * The SVGDefsElement interface corresponds to the 'defs' element.
+ *
+ * @author kitfox
+ */
+public interface SVGDefsElement extends SVGElement, SVGTests, SVGLangSpace,
+ SVGExternalResourcesRequired, SVGStylable, SVGTransformable,
+ EventTarget
+{
+
+}
diff --git a/src/main/java/com/kitfox/salamander/svg/docStruct/SVGDescElement.java b/src/main/java/com/kitfox/salamander/svg/docStruct/SVGDescElement.java
new file mode 100755
index 0000000..0ee41f4
--- /dev/null
+++ b/src/main/java/com/kitfox/salamander/svg/docStruct/SVGDescElement.java
@@ -0,0 +1,24 @@
+/*
+ * SVGGElement.java
+ *
+ * Created on April 12, 2007, 6:14 PM
+ *
+ * To change this template, choose Tools | Template Manager
+ * and open the template in the editor.
+ */
+
+package com.kitfox.salamander.svg.docStruct;
+
+import com.kitfox.salamander.svg.basic.SVGElement;
+import com.kitfox.salamander.svg.basic.SVGLangSpace;
+import com.kitfox.salamander.svg.basic.SVGStylable;
+
+/**
+ * The SVGDescElement interface corresponds to the 'desc' element.
+ *
+ * @author kitfox
+ */
+public interface SVGDescElement extends SVGElement, SVGLangSpace, SVGStylable
+{
+
+}
diff --git a/src/main/java/com/kitfox/salamander/svg/docStruct/SVGDocument.java b/src/main/java/com/kitfox/salamander/svg/docStruct/SVGDocument.java
new file mode 100755
index 0000000..dc161de
--- /dev/null
+++ b/src/main/java/com/kitfox/salamander/svg/docStruct/SVGDocument.java
@@ -0,0 +1,49 @@
+/*
+ * SVGDocument.java
+ *
+ * Created on April 12, 2007, 6:11 PM
+ *
+ * To change this template, choose Tools | Template Manager
+ * and open the template in the editor.
+ */
+
+package com.kitfox.salamander.svg.docStruct;
+
+import com.kitfox.salamander.svg.DOMString;
+import org.w3c.dom.Document;
+import org.w3c.dom.events.DocumentEvent;
+
+/**
+ *
+ * When an 'svg' element is embedded inline as a component of a document from another namespace, such as when an 'svg' element is embedded inline within an XHTML document [XHTML], then an SVGDocument object will not exist; instead, the root object in the document object hierarchy will be a Document object of a different type, such as an HTMLDocument object.
+ *
+ * However, an SVGDocument object will indeed exist when the root element of the XML document hierarchy is an 'svg' element, such as when viewing a stand-alone SVG file (i.e., a file with MIME type "image/svg+xml"). In this case, the SVGDocument object will be the root object of the document object model hierarchy.
+ *
+ * In the case where an SVG document is embedded by reference, such as when an XHTML document has an 'object' element whose href attribute references an SVG document (i.e., a document whose MIME type is "image/svg+xml" and whose root element is thus an 'svg' element), there will exist two distinct DOM hierarchies. The first DOM hierarchy will be for the referencing document (e.g., an XHTML document). The second DOM hierarchy will be for the referenced SVG document. In this second DOM hierarchy, the root object of the document object model hierarchy is an SVGDocument object.
+ *
+ * The SVGDocument interface contains a similar list of attributes and methods to the HTMLDocument interface described in the Document Object Model (HTML) Level 1 chapter of the [DOM1] specification.
+ * @author kitfox
+ */
+public interface SVGDocument extends Document, DocumentEvent
+{
+ /**
+ * The title of a document as specified by the title sub-element of the 'svg' root element (i.e., <svg><title>Here is the title</title>...</svg>)
+ */
+ public DOMString getTitle();
+ /**
+ * Returns the URI of the page that linked to this page. The value is an empty string if the user navigated to the page directly (not through a link, but, for example, via a bookmark).
+ */
+ public DOMString getReferrer();
+ /**
+ * The domain name of the server that served the document, or a null string if the server cannot be identified by a domain name.
+ */
+ public DOMString getDomain();
+ /**
+ * The complete URI of the document.
+ */
+ public DOMString getURL();
+ /**
+ * The root 'svg' element in the document hierarchy.
+ */
+ public SVGSVGElement getRootElement();
+}
diff --git a/src/main/java/com/kitfox/salamander/svg/docStruct/SVGElementInstance.java b/src/main/java/com/kitfox/salamander/svg/docStruct/SVGElementInstance.java
new file mode 100755
index 0000000..5867872
--- /dev/null
+++ b/src/main/java/com/kitfox/salamander/svg/docStruct/SVGElementInstance.java
@@ -0,0 +1,65 @@
+/*
+ * SVGElementInstance.java
+ *
+ * Created on April 12, 2007, 6:24 PM
+ *
+ * To change this template, choose Tools | Template Manager
+ * and open the template in the editor.
+ */
+
+package com.kitfox.salamander.svg.docStruct;
+
+import com.kitfox.salamander.svg.basic.SVGElement;
+import org.w3c.dom.events.EventTarget;
+
+/**
+ *
+ * For each 'use' element, the SVG DOM maintains a shadow tree (the "instance tree") of objects of type SVGElementInstance. A SVGElementInstance represents a single node in the instance tree. The root object in the instance tree is pointed to by the instanceRoot attribute on the SVGUseElement object for the corresponding 'use' element.
+ *
+ * If the 'use' element references a simple graphics element such as a 'rect', then there is only a single SVGElementInstance object, and the correspondingElement attribute on this SVGElementInstance object is the SVGRectElement that corresponds to the referenced 'rect' element.
+ *
+ * If the 'use' element references a 'g' which contains two 'rect' elements, then the instance tree contains three SVGElementInstance objects, a root SVGElementInstance object whose correspondingElement is the SVGGElement object for the 'g', and then two child SVGElementInstance objects, each of which has its correspondingElement that is an SVGRectElement object.
+ *
+ * If the referenced object is itself a 'use', or if there are 'use' subelements within the referenced object, the instance tree will contain recursive expansion of the indirect references to form a complete tree. For example, if a 'use' element references a 'g', and the 'g' itself contains a 'use', and that 'use' references a 'rect', then the instance tree for the original (outermost) 'use' will consist of a hierarchy of SVGElementInstance objects, as follows:
+ * <CODE>
+ * SVGElementInstance #1 (parentNode=null, firstChild=#2, correspondingElement is the 'g')
+ * SVGElementInstance #2 (parentNode=#1, firstChild=#3, correspondingElement is the other 'use')
+ * SVGElementInstance #3 (parentNode=#2, firstChild=null, corresponding Element is the 'rect')
+ * </CODE>
+ * @author kitfox
+ */
+public interface SVGElementInstance extends EventTarget
+{
+ /**
+ * The corresponding element to which this object is an instance. For example, if a 'use' element references a 'rect' element, then an SVGElementInstance is created, with its correspondingElement being the SVGElementInstance object for the 'rect' element.
+ */
+ public SVGElement getCorrespondingElement();
+ /**
+ * The corresponding 'use' element to which this SVGElementInstance object belongs. When 'use' elements are nested (e.g., a 'use' references another 'use' which references a graphics element such as a 'rect'), then the correspondingUseElement is the outermost 'use' (i.e., the one which indirectly references the 'rect', not the one with the direct reference).
+ */
+ public SVGUseElement getCorrespondingUseElement();
+ /**
+ * The parent of this SVGElementInstance within the instance tree. All SVGElementInstance objects have a parent except the SVGElementInstance which corresponds to the element which was directly referenced by the 'use' element, in which case parentNode is null.
+ */
+ public SVGElementInstance getParentNode();
+ /**
+ * An SVGElementInstanceList that contains all children of this SVGElementInstance within the instance tree. If there are no children, this is an SVGElementInstanceList containing no entries (i.e., an empty list).
+ */
+ public SVGElementInstanceList getChildNodes();
+ /**
+ * The first child of this SVGElementInstance within the instance tree. If there is no such SVGElementInstance, this returns null.
+ */
+ public SVGElementInstance getFirstChild();
+ /**
+ * The last child of this SVGElementInstance within the instance tree. If there is no such SVGElementInstance, this returns null.
+ */
+ public SVGElementInstance getLastChild();
+ /**
+ * The SVGElementInstance immediately preceding this SVGElementInstance. If there is no such SVGElementInstance, this returns null.
+ */
+ public SVGElementInstance getPreviousSibling();
+ /**
+ * The SVGElementInstance immediately following this SVGElementInstance. If there is no such SVGElementInstance, this returns null.
+ */
+ public SVGElementInstance getNextSibling();
+}
diff --git a/src/main/java/com/kitfox/salamander/svg/docStruct/SVGElementInstanceList.java b/src/main/java/com/kitfox/salamander/svg/docStruct/SVGElementInstanceList.java
new file mode 100755
index 0000000..1d9a017
--- /dev/null
+++ b/src/main/java/com/kitfox/salamander/svg/docStruct/SVGElementInstanceList.java
@@ -0,0 +1,29 @@
+/*
+ * SVGElementInstanceList.java
+ *
+ * Created on April 12, 2007, 6:28 PM
+ *
+ * To change this template, choose Tools | Template Manager
+ * and open the template in the editor.
+ */
+
+package com.kitfox.salamander.svg.docStruct;
+
+/**
+ *
+ * The SVGElementInstanceList interface provides the abstraction of an ordered collection of SVGElementInstance objects, without defining or constraining how this collection is implemented.
+ * @author kitfox
+ */
+public interface SVGElementInstanceList
+{
+ /**
+ * The number of SVGElementInstance objects in the list. The range of valid child indices is 0 to length-1 inclusive.
+ */
+ public int getLength();
+ /**
+ * Returns the indexth item in the collection. If index is greater than or equal to the number of nodes in the list, this returns null.
+ * @param index Index into the collection.
+ * @return The SVGElementInstance object at the indexth position in the SVGElementInstanceList, or null if that is not a valid index.
+ */
+ public SVGElementInstance item(int index);
+}
diff --git a/src/main/java/com/kitfox/salamander/svg/docStruct/SVGGElement.java b/src/main/java/com/kitfox/salamander/svg/docStruct/SVGGElement.java
new file mode 100755
index 0000000..acb646c
--- /dev/null
+++ b/src/main/java/com/kitfox/salamander/svg/docStruct/SVGGElement.java
@@ -0,0 +1,30 @@
+/*
+ * SVGGElement.java
+ *
+ * Created on April 12, 2007, 6:14 PM
+ *
+ * To change this template, choose Tools | Template Manager
+ * and open the template in the editor.
+ */
+
+package com.kitfox.salamander.svg.docStruct;
+
+import com.kitfox.salamander.svg.basic.SVGElement;
+import com.kitfox.salamander.svg.basic.SVGExternalResourcesRequired;
+import com.kitfox.salamander.svg.basic.SVGLangSpace;
+import com.kitfox.salamander.svg.basic.SVGStylable;
+import com.kitfox.salamander.svg.basic.SVGTests;
+import com.kitfox.salamander.svg.basic.SVGTransformable;
+import org.w3c.dom.events.EventTarget;
+
+/**
+ * The SVGGElement interface corresponds to the 'g' element.
+ *
+ * @author kitfox
+ */
+public interface SVGGElement extends SVGElement, SVGTests, SVGLangSpace,
+ SVGExternalResourcesRequired, SVGStylable, SVGTransformable,
+ EventTarget
+{
+
+}
diff --git a/src/main/java/com/kitfox/salamander/svg/docStruct/SVGImageElement.java b/src/main/java/com/kitfox/salamander/svg/docStruct/SVGImageElement.java
new file mode 100755
index 0000000..66af6b4
--- /dev/null
+++ b/src/main/java/com/kitfox/salamander/svg/docStruct/SVGImageElement.java
@@ -0,0 +1,52 @@
+/*
+ * SVGImageElement.java
+ *
+ * Created on April 12, 2007, 6:30 PM
+ *
+ * To change this template, choose Tools | Template Manager
+ * and open the template in the editor.
+ */
+
+package com.kitfox.salamander.svg.docStruct;
+
+import com.kitfox.salamander.svg.basic.SVGAnimatedLength;
+import com.kitfox.salamander.svg.basic.SVGElement;
+import com.kitfox.salamander.svg.basic.SVGExternalResourcesRequired;
+import com.kitfox.salamander.svg.basic.SVGLangSpace;
+import com.kitfox.salamander.svg.basic.SVGStylable;
+import com.kitfox.salamander.svg.basic.SVGTests;
+import com.kitfox.salamander.svg.basic.SVGTransformable;
+import com.kitfox.salamander.svg.basic.SVGURIReference;
+import com.kitfox.salamander.svg.coordSystems.SVGAnimatedPreserveAspectRatio;
+import org.w3c.dom.events.EventTarget;
+
+/**
+ * The SVGImageElement interface corresponds to the 'image' element.
+ *
+ * @author kitfox
+ */
+public interface SVGImageElement extends SVGElement, SVGURIReference, SVGTests,
+ SVGLangSpace, SVGExternalResourcesRequired, SVGStylable, SVGTransformable,
+ EventTarget
+{
+ /**
+ * Corresponds to attribute x on the given 'image' element.
+ */
+ public SVGAnimatedLength getX();
+ /**
+ * Corresponds to attribute y on the given 'image' element.
+ */
+ public SVGAnimatedLength getY();
+ /**
+ * Corresponds to attribute width on the given 'image' element.
+ */
+ public SVGAnimatedLength getWidth();
+ /**
+ * Corresponds to attribute height on the given 'image' element.
+ */
+ public SVGAnimatedLength getHeight();
+ /**
+ * Corresponds to attribute preserveAspectRatio on the given element.
+ */
+ public SVGAnimatedPreserveAspectRatio getPreserveAspectRatio();
+}
diff --git a/src/main/java/com/kitfox/salamander/svg/docStruct/SVGSVGElement.java b/src/main/java/com/kitfox/salamander/svg/docStruct/SVGSVGElement.java
new file mode 100755
index 0000000..8d8e538
--- /dev/null
+++ b/src/main/java/com/kitfox/salamander/svg/docStruct/SVGSVGElement.java
@@ -0,0 +1,252 @@
+/*
+ * SVGSVGElement.java
+ *
+ * Created on April 12, 2007, 5:38 PM
+ *
+ * To change this template, choose Tools | Template Manager
+ * and open the template in the editor.
+ */
+
+package com.kitfox.salamander.svg.docStruct;
+
+import com.kitfox.salamander.svg.DOMString;
+import com.kitfox.salamander.svg.basic.SVGAngle;
+import com.kitfox.salamander.svg.basic.SVGAnimatedLength;
+import com.kitfox.salamander.svg.basic.SVGElement;
+import com.kitfox.salamander.svg.basic.SVGExternalResourcesRequired;
+import com.kitfox.salamander.svg.basic.SVGFitToViewBox;
+import com.kitfox.salamander.svg.basic.SVGLangSpace;
+import com.kitfox.salamander.svg.basic.SVGLength;
+import com.kitfox.salamander.svg.basic.SVGLocatable;
+import com.kitfox.salamander.svg.basic.SVGNumber;
+import com.kitfox.salamander.svg.basic.SVGRect;
+import com.kitfox.salamander.svg.basic.SVGStylable;
+import com.kitfox.salamander.svg.basic.SVGTests;
+import com.kitfox.salamander.svg.basic.SVGViewSpec;
+import com.kitfox.salamander.svg.basic.SVGZoomAndPan;
+import com.kitfox.salamander.svg.coordSystems.SVGMatrix;
+import com.kitfox.salamander.svg.coordSystems.SVGPoint;
+import com.kitfox.salamander.svg.coordSystems.SVGTransform;
+import org.w3c.dom.DOMException;
+import org.w3c.dom.Element;
+import org.w3c.dom.NodeList;
+import org.w3c.dom.css.DocumentCSS;
+import org.w3c.dom.css.ViewCSS;
+import org.w3c.dom.events.DocumentEvent;
+import org.w3c.dom.events.EventTarget;
+
+/**
+ * A key interface definition is the SVGSVGElement interface, which is the interface that corresponds to the 'svg' element. This interface contains various miscellaneous commonly-used utility methods, such as matrix operations and the ability to control the time of redraw on visual rendering devices.
+ *
+ * SVGSVGElement extends ViewCSS and DocumentCSS to provide access to the computed values of properties and the override style sheet as described in DOM2.
+ *
+ * {@link http://www.w3.org/TR/SVG/struct.html#NewDocument}
+ * {@link http://www.w3.org/TR/SVG/struct.html#InterfaceSVGSVGElement}
+ * @author kitfox
+ */
+public interface SVGSVGElement extends SVGElement, SVGTests, SVGLangSpace,
+ SVGExternalResourcesRequired, SVGStylable, SVGLocatable, SVGFitToViewBox,
+ SVGZoomAndPan, EventTarget, DocumentEvent, ViewCSS, DocumentCSS
+{
+ /**
+ * Corresponds to attribute x on the given 'svg' element.
+ */
+ public SVGAnimatedLength getX();
+ /**
+ * Corresponds to attribute y on the given 'svg' element.
+ */
+ public SVGAnimatedLength getY();
+ /**
+ * Corresponds to attribute width on the given 'svg' element.
+ */
+ public SVGAnimatedLength getWidth();
+ /**
+ * Corresponds to attribute height on the given 'svg' element.
+ */
+ public SVGAnimatedLength getHeight();
+ /**
+ * Corresponds to attribute contentScriptType on the given 'svg' element.
+ */
+ public DOMString getContentScriptType();
+ /**
+ * Corresponds to attribute contentStyleType on the given 'svg' element.
+ */
+ public DOMString getContentStyleType();
+ /**
+ *
+ *
+ * The position and size of the viewport (implicit or explicit) that corresponds to this 'svg' element. When the user agent is actually rendering the content, then the position and size values represent the actual values when rendering. The position and size values are unitless values in the coordinate system of the parent element. If no parent element exists (i.e., 'svg' element represents the root of the document tree), if this SVG document is embedded as part of another document (e.g., via the HTML 'object' element), then the position and size are unitless values in the coordinate system of the parent document. (If the parent uses CSS or XSL layout, then unitless values represent pixel units for the current CSS or XSL viewport, as described in the CSS2 specification.) If the parent element does not have a coordinate system, then the user agent should provide reasonable default values for this attribute.
+ *
+ * The object itself and its contents are both readonly.
+ */
+ public SVGRect getViewport();
+ /**
+ * Size of a pixel units (as defined by CSS2) along the x-axis of the viewport, which represents a unit somewhere in the range of 70dpi to 120dpi, and, on systems that support this, might actually match the characteristics of the target medium. On systems where it is impossible to know the size of a pixel, a suitable default pixel size is provided.
+ */
+ public float getPixelUnitToMillimeterX();
+ /**
+ * Corresponding size of a pixel unit along the y-axis of the viewport.
+ */
+ public float getPixelUnitToMillimeterY();
+ /**
+ * User interface (UI) events in DOM Level 2 indicate the screen positions at which the given UI event occurred. When the user agent actually knows the physical size of a "screen unit", this attribute will express that information; otherwise, user agents will provide a suitable default value such as .28mm.
+ */
+ public float getScreenPixelToMillimeterX();
+ /**
+ * Corresponding size of a screen pixel along the y-axis of the viewport.
+ */
+ public float getScreenPixelToMillimeterY();
+ /**
+ * The initial view (i.e., before magnification and panning) of the current innermost SVG document fragment can be either the "standard" view (i.e., based on attributes on the 'svg' element such as fitBoxToViewport) or to a "custom" view (i.e., a hyperlink into a particular 'view' or other element - see Linking into SVG content: URI fragments and SVG views). If the initial view is the "standard" view, then this attribute is false. If the initial view is a "custom" view, then this attribute is true.
+ */
+ public boolean getUseCurrentView();
+ /**
+ * <PRE>The definition of the initial view (i.e., before magnification and panning) of the current innermost SVG document fragment. The meaning depends on the situation:
+ *
+ * * If the initial view was a "standard" view, then:
+ * o the values for viewBox, preserveAspectRatio and zoomAndPan within currentView will match the values for the corresponding DOM attributes that are on SVGSVGElement directly
+ * o the values for transform and viewTarget within currentView will be null
+ * * If the initial view was a link into a 'view' element, then:
+ * o the values for viewBox, preserveAspectRatio and zoomAndPan within currentView will correspond to the corresponding attributes for the given 'view' element
+ * o the values for transform and viewTarget within currentView will be null
+ * * If the initial view was a link into another element (i.e., other than a 'view'), then:
+ * o the values for viewBox, preserveAspectRatio and zoomAndPan within currentView will match the values for the corresponding DOM attributes that are on SVGSVGElement directly for the closest ancestor 'svg' element
+ * o the values for transform within currentView will be null
+ * o the viewTarget within currentView will represent the target of the link
+ * * If the initial view was a link into the SVG document fragment using an SVG view specification fragment identifier (i.e., #svgView(...)), then:
+ * o the values for viewBox, preserveAspectRatio, zoomAndPan, transform and viewTarget within currentView will correspond to the values from the SVG view specification fragment identifier
+ *
+ * The object itself and its contents are both readonly.</PRE>
+ */
+ public SVGViewSpec getCurrentView();
+ /**
+ * This attribute indicates the current scale factor relative to the initial view to take into account user magnification and panning operations, as described under Magnification and panning. DOM attributes currentScale and currentTranslate are equivalent to the 2x3 matrix [a b c d e f] = [currentScale 0 0 currentScale currentTranslate.x currentTranslate.y]. If "magnification" is enabled (i.e., zoomAndPan="magnify"), then the effect is as if an extra transformation were placed at the outermost level on the SVG document fragment (i.e., outside the outermost 'svg' element).
+ */
+ public float getCurrentScale();
+ /**
+ * The corresponding translation factor that takes into account user "magnification".
+ */
+ public SVGPoint getCurrentTranslate();
+ /**
+ * Takes a time-out value which indicates that redraw shall not occur until: (a) the corresponding unsuspendRedraw(suspend_handle_id) call has been made, (b) an unsuspendRedrawAll() call has been made, or (c) its timer has timed out. In environments that do not support interactivity (e.g., print media), then redraw shall not be suspended. suspend_handle_id = suspendRedraw(max_wait_milliseconds) and unsuspendRedraw(suspend_handle_id) must be packaged as balanced pairs. When you want to suspend redraw actions as a collection of SVG DOM changes occur, then precede the changes to the SVG DOM with a method call similar to suspend_handle_id = suspendRedraw(max_wait_milliseconds) and follow the changes with a method call similar to unsuspendRedraw(suspend_handle_id). Note that multiple suspendRedraw calls can be used at once and that each such method call is treated independently of the other suspendRedraw method calls.
+ * @param max_wait_milliseconds The amount of time in milliseconds to hold off before redrawing the device. Values greater than 60 seconds will be truncated down to 60 seconds.
+ * @return A number which acts as a unique identifier for the given suspendRedraw() call. This value must be passed as the parameter to the corresponding unsuspendRedraw() method call.
+ */
+ public long suspendRedraw(long max_wait_milliseconds);
+ /**
+ * Cancels a specified suspendRedraw() by providing a unique suspend_handle_id.
+ * @param suspend_handle_id A number which acts as a unique identifier for the desired suspendRedraw() call. The number supplied must be a value returned from a previous call to suspendRedraw()
+ * @throws org.w3c.dom.DOMException This method will raise a DOMException with value NOT_FOUND_ERR if an invalid value (i.e., no such suspend_handle_id is active) for suspend_handle_id is provided.
+ */
+ public void unsuspendRedraw(long suspend_handle_id) throws DOMException;
+ /**
+ * Cancels all currently active suspendRedraw() method calls. This method is most useful at the very end of a set of SVG DOM calls to ensure that all pending suspendRedraw() method calls have been cancelled.
+ */
+ public void unsuspendRedrawAll();
+ /**
+ * In rendering environments supporting interactivity, forces the user agent to immediately redraw all regions of the viewport that require updating.
+ */
+ public void forceRedraw();
+ /**
+ * Suspends (i.e., pauses) all currently running animations that are defined within the SVG document fragment corresponding to this 'svg' element, causing the animation clock corresponding to this document fragment to stand still until it is unpaused.
+ */
+ public void pauseAnimations();
+ /**
+ * Unsuspends (i.e., unpauses) currently running animations that are defined within the SVG document fragment, causing the animation clock to continue from the time at which it was suspended.
+ */
+ public void unpauseAnimations();
+ /**
+ * Returns true if this SVG document fragment is in a paused state.
+ * @return Boolean indicating whether this SVG document fragment is in a paused state.
+ */
+ public boolean animationsPaused();
+ /**
+ * Returns the current time in seconds relative to the start time for the current SVG document fragment.
+ * @return The current time in seconds.
+ */
+ public float getCurrentTime();
+ /**
+ * Adjusts the clock for this SVG document fragment, establishing a new current time.
+ * @param seconds The new current time in seconds relative to the start time for the current SVG document fragment.
+ */
+ public void setCurrentTime(float seconds);
+ /**
+ * Returns the list of graphics elements whose rendered content intersects the supplied rectangle, honoring the 'pointer-events' property value on each candidate graphics element.
+ * @param rect The test rectangle. The values are in the initial coordinate system for the current 'svg' element.
+ * @param referenceElement If not null, then only return elements whose drawing order has them below the given reference element.
+ * @return A list of Elements whose content intersects the supplied rectangle.
+ */
+ public NodeList getIntersectionList(SVGRect rect, SVGElement referenceElement);
+ /**
+ * Returns the list of graphics elements whose rendered content is entirely contained within the supplied rectangle, honoring the 'pointer-events' property value on each candidate graphics element.
+ * @param rect The test rectangle. The values are in the initial coordinate system for the current 'svg' element.
+ * @param referenceElement If not null, then only return elements whose drawing order has them below the given reference element.
+ * @return A list of Elements whose content is enclosed by the supplied rectangle.
+ */
+ public NodeList getEnclosureList(SVGRect rect, SVGElement referenceElement);
+ /**
+ * Returns true if the rendered content of the given element intersects the supplied rectangle, honoring the 'pointer-events' property value on each candidate graphics element.
+ * @param element The element on which to perform the given test.
+ * @param rect The test rectangle. The values are in the initial coordinate system for the current 'svg' element.
+ * @return True or false, depending on whether the given element intersects the supplied rectangle.
+ */
+ public boolean checkIntersection(SVGElement element, SVGRect rect);
+ /**
+ * Returns true if the rendered content of the given element is entirely contained within the supplied rectangle, honoring the 'pointer-events' property value on each candidate graphics element.
+ * @param element The element on which to perform the given test.
+ * @param rect The test rectangle. The values are in the initial coordinate system for the current 'svg' element.
+ * @return True or false, depending on whether the given element is enclosed by the supplied rectangle.
+ */
+ public boolean checkEnclosure(SVGElement element, SVGRect rect);
+ /**
+ * Unselects any selected objects, including any selections of text strings and type-in bars.
+ */
+ public void deselectAll();
+ /**
+ * Creates an SVGNumber object outside of any document trees. The object is initialized to a value of zero.
+ * @return An SVGNumber object.
+ */
+ public SVGNumber createSVGNumber();
+ /**
+ * Creates an SVGLength object outside of any document trees. The object is initialized to the value of 0 user units.
+ * @return An SVGLength object.
+ */
+ public SVGLength createSVGLength();
+ /**
+ * Creates an SVGAngle object outside of any document trees. The object is initialized to the value 0 degrees (unitless).
+ * @return An SVGAngle object.
+ */
+ public SVGAngle createSVGAngle();
+ /**
+ * Creates an SVGPoint object outside of any document trees. The object is initialized to the point (0,0) in the user coordinate system.
+ * @return An SVGPoint object.
+ */
+ public SVGPoint createSVGPoint();
+ /**
+ * Creates an SVGMatrix object outside of any document trees. The object is initialized to the identity matrix.
+ * @return An SVGMatrix object.
+ */
+ public SVGMatrix createSVGMatrix();
+ /**
+ * Creates an SVGRect object outside of any document trees. The object is initialized such that all values are set to 0 user units.
+ * @return An SVGRect object.
+ */
+ public SVGRect createSVGRect();
+ /**
+ * Creates an SVGTransform object outside of any document trees. The object is initialized to an identity matrix transform (SVG_TRANSFORM_MATRIX).
+ * @return An SVGTransform object.
+ */
+ public SVGTransform createSVGTransform();
+ /**
+ * Creates an SVGTransform object outside of any document trees. The object is initialized to the given matrix transform (i.e., SVG_TRANSFORM_MATRIX).
+ * @param matrix The transform matrix.
+ * @return An SVGTransform object.
+ */
+ public SVGTransform createSVGTransformFromMatrix(SVGMatrix matrix);
+ /**
+ * Searches this SVG document fragment (i.e., the search is restricted to a subset of the document tree) for an Element whose id is given by elementId. If an Element is found, that Element is returned. If no such element exists, returns null. Behavior is not defined if more than one element has this id.
+ * @param elementId The unique id value for an element.
+ * @return The matching element.
+ */
+ public Element getElementById(DOMString elementId);
+}
diff --git a/src/main/java/com/kitfox/salamander/svg/docStruct/SVGSwitchElement.java b/src/main/java/com/kitfox/salamander/svg/docStruct/SVGSwitchElement.java
new file mode 100755
index 0000000..2eeaf91
--- /dev/null
+++ b/src/main/java/com/kitfox/salamander/svg/docStruct/SVGSwitchElement.java
@@ -0,0 +1,30 @@
+/*
+ * SVGGElement.java
+ *
+ * Created on April 12, 2007, 6:14 PM
+ *
+ * To change this template, choose Tools | Template Manager
+ * and open the template in the editor.
+ */
+
+package com.kitfox.salamander.svg.docStruct;
+
+import com.kitfox.salamander.svg.basic.SVGElement;
+import com.kitfox.salamander.svg.basic.SVGExternalResourcesRequired;
+import com.kitfox.salamander.svg.basic.SVGLangSpace;
+import com.kitfox.salamander.svg.basic.SVGStylable;
+import com.kitfox.salamander.svg.basic.SVGTests;
+import com.kitfox.salamander.svg.basic.SVGTransformable;
+import org.w3c.dom.events.EventTarget;
+
+/**
+ * The SVGSwitchElement interface corresponds to the 'switch' element.
+ *
+ * @author kitfox
+ */
+public interface SVGSwitchElement extends SVGElement, SVGTests, SVGLangSpace,
+ SVGExternalResourcesRequired, SVGStylable, SVGTransformable,
+ EventTarget
+{
+
+}
diff --git a/src/main/java/com/kitfox/salamander/svg/docStruct/SVGSymbolElement.java b/src/main/java/com/kitfox/salamander/svg/docStruct/SVGSymbolElement.java
new file mode 100755
index 0000000..f2b9f52
--- /dev/null
+++ b/src/main/java/com/kitfox/salamander/svg/docStruct/SVGSymbolElement.java
@@ -0,0 +1,29 @@
+/*
+ * SVGGElement.java
+ *
+ * Created on April 12, 2007, 6:14 PM
+ *
+ * To change this template, choose Tools | Template Manager
+ * and open the template in the editor.
+ */
+
+package com.kitfox.salamander.svg.docStruct;
+
+import com.kitfox.salamander.svg.basic.SVGElement;
+import com.kitfox.salamander.svg.basic.SVGExternalResourcesRequired;
+import com.kitfox.salamander.svg.basic.SVGFitToViewBox;
+import com.kitfox.salamander.svg.basic.SVGLangSpace;
+import com.kitfox.salamander.svg.basic.SVGStylable;
+import org.w3c.dom.events.EventTarget;
+
+/**
+ * The SVGSymbolElement interface corresponds to the 'symbol' element.
+ *
+ * @author kitfox
+ */
+public interface SVGSymbolElement extends SVGElement, SVGLangSpace,
+ SVGExternalResourcesRequired, SVGStylable, SVGFitToViewBox,
+ EventTarget
+{
+
+}
diff --git a/src/main/java/com/kitfox/salamander/svg/docStruct/SVGTitleElement.java b/src/main/java/com/kitfox/salamander/svg/docStruct/SVGTitleElement.java
new file mode 100755
index 0000000..df43300
--- /dev/null
+++ b/src/main/java/com/kitfox/salamander/svg/docStruct/SVGTitleElement.java
@@ -0,0 +1,24 @@
+/*
+ * SVGGElement.java
+ *
+ * Created on April 12, 2007, 6:14 PM
+ *
+ * To change this template, choose Tools | Template Manager
+ * and open the template in the editor.
+ */
+
+package com.kitfox.salamander.svg.docStruct;
+
+import com.kitfox.salamander.svg.basic.SVGElement;
+import com.kitfox.salamander.svg.basic.SVGLangSpace;
+import com.kitfox.salamander.svg.basic.SVGStylable;
+
+/**
+ * The SVGTitleElement interface corresponds to the 'title' element.
+ *
+ * @author kitfox
+ */
+public interface SVGTitleElement extends SVGElement, SVGLangSpace, SVGStylable
+{
+
+}
diff --git a/src/main/java/com/kitfox/salamander/svg/docStruct/SVGUseElement.java b/src/main/java/com/kitfox/salamander/svg/docStruct/SVGUseElement.java
new file mode 100755
index 0000000..39dda39
--- /dev/null
+++ b/src/main/java/com/kitfox/salamander/svg/docStruct/SVGUseElement.java
@@ -0,0 +1,55 @@
+/*
+ * SVGGElement.java
+ *
+ * Created on April 12, 2007, 6:14 PM
+ *
+ * To change this template, choose Tools | Template Manager
+ * and open the template in the editor.
+ */
+
+package com.kitfox.salamander.svg.docStruct;
+
+import com.kitfox.salamander.svg.basic.SVGAnimatedLength;
+import com.kitfox.salamander.svg.basic.SVGElement;
+import com.kitfox.salamander.svg.basic.SVGExternalResourcesRequired;
+import com.kitfox.salamander.svg.basic.SVGLangSpace;
+import com.kitfox.salamander.svg.basic.SVGStylable;
+import com.kitfox.salamander.svg.basic.SVGTests;
+import com.kitfox.salamander.svg.basic.SVGTransformable;
+import com.kitfox.salamander.svg.basic.SVGURIReference;
+import org.w3c.dom.events.EventTarget;
+
+/**
+ * The SVGUseElement interface corresponds to the 'use' element.
+ * @author kitfox
+ */
+public interface SVGUseElement extends SVGElement, SVGURIReference,
+ SVGTests, SVGLangSpace, SVGExternalResourcesRequired,
+ SVGStylable, SVGTransformable, EventTarget
+{
+ /**
+ * Corresponds to attribute x on the given 'use' element.
+ */
+ public SVGAnimatedLength getX();
+ /**
+ *
+ * Corresponds to attribute y on the given 'use' element.
+ */
+ public SVGAnimatedLength getY();
+ /**
+ * Corresponds to attribute width on the given 'use' element.
+ */
+ public SVGAnimatedLength getWidth();
+ /**
+ * Corresponds to attribute height on the given 'use' element.
+ */
+ public SVGAnimatedLength getHeight();
+ /**
+ * The root of the "instance tree". See description of SVGElementInstance for a discussion on the instance tree.
+ */
+ public SVGElementInstance getInstanceRoot();
+ /**
+ * If the 'href' attribute is being animated, contains the current animated root of the "instance tree". If the 'href' attribute is not currently being animated, contains the same value as 'instanceRoot'. The root of the "instance tree". See description of SVGElementInstance for a discussion on the instance tree.
+ */
+ public SVGElementInstance getAnimatedInstanceRoot();
+}
diff --git a/src/main/java/com/kitfox/salamander/svg/paint/SVGPaint.java b/src/main/java/com/kitfox/salamander/svg/paint/SVGPaint.java
index c47dc69..55ac767 100755
--- a/src/main/java/com/kitfox/salamander/svg/paint/SVGPaint.java
+++ b/src/main/java/com/kitfox/salamander/svg/paint/SVGPaint.java
@@ -11,7 +11,7 @@ package com.kitfox.salamander.svg.paint;
import com.kitfox.salamander.svg.SVGException;
import com.kitfox.salamander.svg.basic.SVGDataType;
-import com.kitfox.salamander.svg.basic.SVGString;
+import com.kitfox.salamander.svg.DOMString;
/**
*
@@ -69,12 +69,12 @@ public interface SVGPaint extends SVGDataType
/**
* When the paintType specifies a URI, this attribute holds the URI string. When the paintType does not specify a URI, this attribute is null.
*/
- public SVGString getUri();
+ public DOMString getUri();
/**
* Sets the paintType to SVG_PAINTTYPE_URI_NONE and sets uri to the specified value.
* @param uri The URI for the desired paint server.
*/
- public void setUri(SVGString uri);
+ public void setUri(DOMString uri);
/**
* Sets the paintType as specified by the parameters. If paintType requires a URI, then uri must be non-null and a valid string; otherwise, uri must be null. If paintType requires an RGBColor, then rgbColor must be a valid RGBColor object; otherwise, rgbColor must be null. If paintType requires an SVGICCColor, then iccColor must be a valid SVGICCColor object; otherwise, iccColor must be null.
* @param paintType One of the defined constants for paintType.