Hello list,

Batik works great for me except one little problem that I'm unable to solve:
I'd like to apply the 'svg:' prefix to all the elements that Batik creates.

What I currently do is:

  DOMImplementation domImpl = SVGDOMImplementation.getDOMImplementation();
  String svgNS = SVGDOMImplementation.SVG_NAMESPACE_URI;
  org.w3c.dom.Document doc = domImpl.createDocument(svgNS, "svg:svg", null);
  ImageHandler imageHandler = new DefaultImageHandler();
  ExtensionHandler extensionHandler = new DefaultExtensionHandler();
  SVGGeneratorContext ctx = SVGGraphics2D.buildSVGGeneratorContext(
                doc, imageHandler, extensionHandler);
  SVGGraphics2D g = new SVGGraphics2D(ctx, false);
  // draw shapes

I played a bit with DOMImplementation.createDocument() and tried several
variants ("svg", "svg:svg", ...) for the qualifiedName-Parameter, but
nothing did work.

I'm going to integrate the output in further transformations and I'm having
trouble with namespaces. I would highly appreciate if someone could help me
setting the prefix correctly.

Thanks a lot for your help! (And sorry for the bad English...)

Cheers,
André.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to