<svg xmlns="http://www.w3.org/2000/svg" version="1.2"
     xmlns:ev="http://www.w3.org/2001/xml-events" xmlns:xlink="http://www.w3.org/1999/xlink">

  <extensionDefs id="rdf" namespace="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
    <elementDef name="RDF">
      <prototype>
        <g>
          <circle stroke="#008" stroke-width="5"  fill="none" cx="50" cy="50" r="50"/>
        </g>
      </prototype>
      <script xlink:href="parser.js" type="text/ecmascript"/>
      <script ev:event="SVGBindEnd" type="text/ecmascript"><![CDATA[
       var el=evt.target
       st=el.shadowTree
       st.appendChild(parseXML("<circle stroke="#008" stroke-width="5"  fill="none" cx="50" cy="25" r="25"/>",el.ownerDocument))
alert('a')
      ]]></script>
    </elementDef>
  </extensionDefs>

</svg>

