Hi all,

In anticipation of great things, I tried

public static final String W3C_SVG11_QNAME = "-//W3C//DTD SVG 1.1//EN";
public static final String W3C_SVG11_PUBLIC_ID = "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd";
...
SVGDOMImplementation impl = (SVGDOMImplementation) SVGDOMImplementation.getDOMImplementation();
DocumentType dt = impl.createDocumentType( W3C_SVG11_QNAME, W3C_SVG11_PUBLIC_ID, null );
SVGOMDocument document = new SVGOMDocument( dt, impl );
...


but alas this doesn't work because creating DocumentType instances is not supported by Batik.  A DOMException is thrown.  Is this a temporary shortcoming, i.e. are there plans to support DocumentType nodes in Batik's SVG DOM?

I had a look at the Xerces source code and there is there a complete DocumentType implementation.  This raises a question (sorry if this is going over old ground) :  why does Batik have its own generic DOM implementation when there is already a Xerces one?  If Batik had built on the Xerces one, it would have saved effort and would have meant that such things as DocumentType implementations would be already present. The fact that the two implementations are different means I cannot use a Xerces DocumentType implementation with a Batik Document implementation. Alas.

Rick




--

Visit our website at www.roke.co.uk

Roke Manor Research Ltd, Roke Manor, Romsey, Hampshire SO51 0ZN, UK.

The information contained in this e-mail and any attachments is confidential to
Roke Manor Research Ltd and must not be passed to any third party without
permission. This communication is for information only and shall not create or
change any contractual relationship.

Reply via email to