> Sorry but I don't think there is a bug in getNode. I think you have not
> specified the URI of the document (this one is required to handle use
> element).
>
> > (org.apache.batik.dom.util.DOMUtilities.writeDocument)
> > the "href" attribute of the <use> have a missing namespace prefix.

Ok, but is it really a good design to let URIResolver.getNode()
result in a NullPointerExcepion when the URI is missing?

Hmm, shouldn´t the document URI specified if I create the DOM with:
SAXSVGDocumentFactory factory = new
SAXSVGDocumentFactory("org.apache.xerces.parsers.SAXParser");
SVGOMDocument document =
factory.createDocument("http://codesense.com/templates/"+id,new
StringReader(_data));

> According to the DOM spec, the setAttributeNS method takes a
> qualifiedName
> and not a localName.
>
> The setAttributeNS(xlinkNamespaceURI, "xlink:href", ...);
> will solve your second problem.

Doh! I knew that :-') that solved the NullPointerException...

Thanks / Andreas

/**********************************************************
                  C o d e S e n s e  A B
       Marinens väg 30, SE-136 40 Haninge, Sweden
Office: +46 (0)8 - 707 32 30  GSM: +46 (0)70 - 532 92 01
                 http://www.codesense.com
***********************************************************/
    (PGP public key available at: search.keyserver.net)


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

Reply via email to