You are viewing a plain text version of this content. The canonical link for it is here.
Posted to batik-users@xmlgraphics.apache.org by Simon Turner <si...@zen.co.uk> on 2004/04/09 18:19:16 UTC

Generating SVG Tiny Documents

I would like to generate SVG Tiny (SVGT) documents with Batik. Does 
anyone know how I can do this?

I have tried simply specifying the DocType:

   DOMImplementation domImpl =
       GenericDOMImplementation.getDOMImplementation();
   DocumentType docType = domImpl.createDocumentType(
       "svg",
       "-//W3C//DTD SVG 1.1 Tiny//EN",
       "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11-tiny.dtd"
   );
   Document document = domImpl.createDocument(
       null,
       "svg",
       docType);

but I get a org.w3c.dom.DOMException: "Doctype not supported".

The only solutions I can think of are nasty - generating a full SVG 
document, then using XSLT to strip out the non-compliant elements, or 
ditching Batik altogether and writing raw DOM code to generate SVGT myself.

:-(

Thanks in advance,

Simon


---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
For additional commands, e-mail: batik-users-help@xml.apache.org