Hi Hussein,
We're writing a command that will allow users to strip the xml:id attributes
from a copied node before they paste it and running into some difficulties.
First question:
I'm trying to register a new paste command in XmlMind.
At first I created BSPaste class extending Paste class which is already defined
in XMLmind.
Then tried to register this BSPaste as command, and replace Paste with this
BSPaste class.
So I added jar file for the new class in directory
XMLEditor4\addon\a_bs_docbook\config\bs_docbook\delete_attribute,
and added following code in file
XMLEditor4\addon\a_bs_docbook\config\gui\customize.xxe_gui:
---------------------------------------------------------------------------------------------------------------------------------------
<command name="bluestream.paste">
<class>com.bluestream.docbook.copypaste.BSPaste</class>
</command>
<action name="pasteBeforeAction" label="Paste Bef_ore"
icon="icons/pasteBeforeAction.png">
<command name="bluestream.paste" parameter="before[implicitElement]" />
</action>
<action name="pasteAction" label="_Paste"
icon="icons/pasteAction.png">
<command name="bluestream.paste" parameter="toOrInto" />
</action>
<action name="pasteAfterAction" label="Pa_ste After"
icon="icons/pasteAfterAction.png">
<command name="bluestream.paste" parameter="after[implicitElement]" />
</action>
------------------------------------------------------------------------------------------------------------------------------------------
When I run xmlmind, I got this message:
'bluestream.paste' unknown command
'bluestream.paste' unknown command
'bluestream.paste' unknown command
Then I tried several other ways adding the file in different places in addon
directory but have yet to get it working. What am I doing wrong?
Second question.
When trying to get the attributes from Node with method:
node.attributeValue(attributeName);
the attributeName "xml:id" is NOT identified, which returns null, while
the attributeName "arch" is identified, which returns its value.
So I would like to know what is the reason, and how to
identify "xml:id" as regular attribute for a Node.
Thanks,
Jeff.
--
XMLmind XML Editor Support List
[email protected]
http://www.xmlmind.com/mailman/listinfo/xmleditor-support