Hi,

Jean-Christophe ARNU (JX) wrote:
Le Wed, 6 Aug 2003 11:39:11 +0200
Jean-Christophe ARNU (JX) <[EMAIL PROTECTED]> me disait que :

Now I would like to use the use element.

        I have several use element in my original doc which are correctly placed.
Then after loading time, I want to add dynamically use elements in the
document. (I place them after querying the database). When I appendChild() a g
element containing the use element, I get the following exception  whereas I
use the same use element in the original document (I mean the same URI).

The URI '' specified on the element <use> is invalid

You are most likely setting the attribute named "xlink:href" as opposed to the attribute "href" in the 'xlink' namespace:

useElt.setAttributeNS("http://www.w3.org/1999/xlink";, "href", "#foo");

        at
org.apache.batik.bridge.SVGUseElementBridge.buildCompositeGraphicsNode(Unknown
Source)
        at org.apache.batik.bridge.SVGUseElementBridge.createGraphicsNode(Unknown
Source)
        at org.apache.batik.bridge.GVTBuilder.buildGraphicsNode(Unknown Source)
        at org.apache.batik.bridge.GVTBuilder.buildComposite(Unknown Source)
        at org.apache.batik.bridge.GVTBuilder.buildGraphicsNode(Unknown Source)
        at org.apache.batik.bridge.GVTBuilder.buildComposite(Unknown Source)
        at org.apache.batik.bridge.GVTBuilder.build(Unknown Source)
        at org.apache.batik.bridge.SVGGElementBridge.handleElementAdded(Unknown
Source)
        at
org.apache.batik.bridge.SVGGElementBridge.handleDOMNodeInsertedEvent(Unknown
Source)
        at
org.apache.batik.bridge.BridgeContext$DOMNodeInsertedEventListener.handleEven
t(Unknown Source)
        at org.apache.batik.dom.events.EventSupport.fireEventListeners(Unknown
Source)
        at org.apache.batik.dom.events.EventSupport.dispatchEvent(Unknown Source)
        at org.apache.batik.dom.AbstractNode.dispatchEvent(Unknown Source)
        at org.apache.batik.dom.AbstractParentNode.fireDOMNodeInsertedEvent(Unknown
Source)
        at org.apache.batik.dom.AbstractParentNode.appendChild(Unknown Source)
        at com.paratronic.supervisor.ui.SVGDisplay.addStations(SVGDisplay.java:372)

My URI is absolutely not empty.... So where do I go wrong?

Thanks for any clue! :)





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



Reply via email to