// por ello usamos la alternativa initMouseEventNS de DOM 3
// tambi�n soportada por Batik y que curiosamente funciona bien:
// http://www.w3.org/TR/DOM-Level-3-Events/#events-event-type-initMouseEventNS
// Como namespaceURIArg pasaremos null
MouseEvent mouseEvt = (MouseEvent)evt;
StringBuilder modifierList = new StringBuilder();
if (mouseEvt.getCtrlKey()) modifierList.append("Control ");
if (mouseEvt.getAltKey()) modifierList.append("Alt ");
if (mouseEvt.getShiftKey()) modifierList.append("Shift ");
if (mouseEvt.getMetaKey()) modifierList.append("Meta ");
return evtVarName + ".initMouseEventNS("
+ "null,"
+ "\"" + mouseEvt.getType() + "\","
+ mouseEvt.getBubbles() + ","
+ mouseEvt.getCancelable() + ","
+ getViewPath(mouseEvt.getView(),clientDoc) + ","
+ mouseEvt.getDetail() + ","
+ mouseEvt.getScreenX() + ","
+ mouseEvt.getScreenY() + ","
+ mouseEvt.getClientX() + ","
+ mouseEvt.getClientY() + ","
+ mouseEvt.getButton() + ","
+ clientDoc.getNodeReference((Node)mouseEvt.getRelatedTarget(),true,false) + ","
+ "\"" + modifierList + "\"" + ");\n";
}