You are viewing a plain text version of this content. The canonical link for it is here.
Posted to batik-dev@xmlgraphics.apache.org by Vincent Hardy <vi...@sun.com> on 2001/11/28 14:13:02 UTC
cvs commit: xml-batik/sources/org/apache/batik/svggen/SVGGraphics2D
vhardy 01/11/28 04:49:29
Modified: sources/org/apache/batik/svggen SVGGraphics2D.java
test-references/org/apache/batik/svggen ATransform.svg
AttributedCharacterIterator.svg BStroke.svg
BasicShapes.svg BasicShapes2.svg Bug4389.svg
Bug4945.svg Clip.svg Color1.svg Color2.svg
ContextATransform.svg
ContextAttributedCharacterIterator.svg
ContextBStroke.svg ContextBasicShapes.svg
ContextBasicShapes2.svg ContextBug4389.svg
ContextBug4945.svg ContextClip.svg
ContextColor1.svg ContextColor2.svg
ContextDrawImage.svg ContextFont1.svg
ContextFont2.svg ContextGVector.svg
ContextGradient.svg ContextGraphicObjects.svg
ContextIdentityTest.svg ContextLookup.svg
ContextNegativeLengths.svg ContextPaints.svg
ContextRHints.svg ContextRescale.svg
ContextShearTest.svg
ContextTextSpacePreserve.svg
ContextTexture.svg ContextTransformCollapse.svg
DrawImage.svg Font1.svg Font2.svg GVector.svg
Gradient.svg GraphicObjects.svg IdentityTest.svg
Lookup.svg NegativeLengths.svg Paints.svg
RHints.svg Rescale.svg ShearTest.svg
TextSpacePreserve.svg Texture.svg
TransformCollapse.svg
Log:
Now use the default DOM implementation for the SVG generator test
(better output).
Fixed bug #4976 (now force xmlns and xmlns:xlink on root <svg>
element).
Revision Changes Path
1.30 +14 -11
xml-batik/sources/org/apache/batik/svggen/SVGGraphics2D.java
Index: SVGGraphics2D.java
===================================================================
RCS file:
/home/cvs/xml-batik/sources/org/apache/batik/svggen/SVGGraphics2D.java,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -r1.29 -r1.30
--- SVGGraphics2D.java 2001/11/19 13:47:43 1.29
+++ SVGGraphics2D.java 2001/11/28 12:49:27 1.30
@@ -45,7 +45,7 @@
*
*
* @author <a href="mailto:vincent.hardy@eng.sun.com">Vincent
Hardy</a>
- * @version $Id: SVGGraphics2D.java,v 1.29 2001/11/19 13:47:43 vhardy
Exp $
+ * @version $Id: SVGGraphics2D.java,v 1.30 2001/11/28 12:49:27 vhardy
Exp $
* @see org.apache.batik.ext.awt.g2d.GraphicContext
* @see org.apache.batik.svggen.DOMTreeManager
* @see org.apache.batik.svggen.DOMGroupManager
@@ -386,21 +386,24 @@
public void stream(Element svgRoot, Writer writer, boolean
useCss)
throws SVGGraphics2DIOException {
try {
+ //
+ // Enforce that the default ans xlink namespace
+ // declarations appear on the root element
+ //
+ svgRoot.setAttributeNS(XMLNS_NAMESPACE_URI,
+ XMLNS_PREFIX,
+ SVG_NAMESPACE_URI);
+
+ svgRoot.setAttributeNS(XMLNS_NAMESPACE_URI,
+ XMLNS_PREFIX + ":" + XLINK_PREFIX,
+ XLINK_NAMESPACE_URI);
+
+
PrintWriter out = new PrintWriter(writer);
DocumentFragment svgDocument =
svgRoot.getOwnerDocument().createDocumentFragment();
svgDocument.appendChild(svgRoot);
- /*if(useCss){
- Node svgCssDocument = svgDocument;
- SVGCSSStyler.style(svgCssDocument);
- XmlWriter.writeXml(svgCssDocument, writer);
- writer.flush();
- }
- else{
- XmlWriter.writeXml(svgDocument, writer);
- writer.flush();
- }*/
if (useCss)
SVGCSSStyler.style(svgDocument);
---------------------------------------------------------------------
To unsubscribe, e-mail: batik-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: batik-dev-help@xml.apache.org