
is defined as a block element (to actually make the
Dear Oxy-users, I am currently trying to learn how to do DocType Associations and I experienced two problems, a minor and a major one. Heres the minor problem: I created a new button to insert a <lb/> element. Inserting works fine, i.e. after clicking the button, a <lb/> appears in the code. But in author mode, i guess because <lb/ linebreak appear) it is shown as <lb></lb> and the cursor in placed inside the <lb></lb> after inserting it. So if the editor continues to write, he fills the <lb> which is of course not allowed by the schema. What I would like to do is to position the cursor behind the element after inserting it. is that possible? The major problem concerns shortcuts: i defined a shortcut for the button, but it just doesn't work. Thats also true for predefined buttons, not only for my newly created ones. I tried to use the TEI Doctype and no shortcut works. I have no idea how to approach this problem. What could I do? Thanks! Philipp PS: It's Oxygen Standalone 9.1 for Windows, btw... -- Philipp Steinkrüger M.A. Thomas-Institut der Universität zu Köln Universitätsstraße 22 50923 Köln +49 221 4702394 philipp.steinkrueger@uni-koeln.de http://www.thomasinstitut.uni-koeln.de http://www.philosophie.uni-koeln.de http://www.ide.de

Hello Philipp, The only built-in actions that can be used from a document type are the one inserting an XML fragment and the one inserting a text. If you need more advanced features, like inserting an XML fragment and then moving the caret after the inserted block, you should write your action in Java, then refer it from the document type. For more details, see: http://www.oxygenxml.com/doc/ug-standalone/dg_java_api.html http://www.oxygenxml.com/InstData/Developer/oxygenAuthorSDK.zip You will have to create a Java class that implements: ro.sync.ecss.extensions.api.AuthorOperation, something like this: class InsertLB implements ro.sync.ecss.extensions.api.AuthorOperation{ public void doOperation( AuthorAccess authorAccess, ArgumentsMap arguments) throws IllegalArgumentException, AuthorOperationException { String fragment = "<lb/>"; // Inserts this fragment at the caret position. int caretPosition = authorAccess.getCaretOffset(); authorAccess.insertXMLFragment(fragment, caretPosition); // Moves the caret after the start tag and end tag of <lb/> authorAccess.setCaretPosition(caretPosition + 2); } /** * Has no arguments. * * @return null. */ public ArgumentDescriptor[] getArguments() { return null; } /** * @return A description of the operation. */ public String getDescription() { return "Inserts a line break. Moves the caret after the inserted fragment."; } } After creating the Java file, you should follow the steps from the User Guide and deploy this action into your Document Type association. Regarding the shortcuts, I have tested the "Bold" action using the shortcut "CTRL-SHIFT-B" and it works. I have change it to "CTRL-SHIFT-K" and worked also. Can you try to reopen the edited document after changing the shortcut? Please check that the action you created is inserted in the Document Type menu (should appear in the main menu bar), before the menu "Document". If it is included only in the toolbar, the shortcut is ignored! Also you can check in the menu to see if the listed actions have the expected shortcuts. Another problem might be duplicated shortcuts (actions from the editor menus that have the same key combination) . Best regards, Dan Philipp Steinkrüger wrote:
Dear Oxy-users,
I am currently trying to learn how to do DocType Associations and I experienced two problems, a minor and a major one.
Heres the minor problem: I created a new button to insert a <lb/> element. Inserting works fine, i.e. after clicking the button, a <lb/> appears in the code. But in author mode, i guess because <lb/> is defined as a block element (to actually make the linebreak appear) it is shown as <lb></lb> and the cursor in placed inside the <lb></lb> after inserting it. So if the editor continues to write, he fills the <lb> which is of course not allowed by the schema. What I would like to do is to position the cursor behind the element after inserting it. is that possible?
The major problem concerns shortcuts: i defined a shortcut for the button, but it just doesn't work. Thats also true for predefined buttons, not only for my newly created ones. I tried to use the TEI Doctype and no shortcut works. I have no idea how to approach this problem. What could I do?
Thanks! Philipp
PS: It's Oxygen Standalone 9.1 for Windows, btw...
-- Philipp Steinkrüger M.A. Thomas-Institut der Universität zu Köln Universitätsstraße 22 50923 Köln +49 221 4702394
philipp.steinkrueger@uni-koeln.de http://www.thomasinstitut.uni-koeln.de http://www.philosophie.uni-koeln.de http://www.ide.de
_______________________________________________ oXygen-user mailing list oXygen-user@oxygenxml.com http://www.oxygenxml.com/mailman/listinfo/oxygen-user

Dan, thanks for your comprehensive answer. Indeed, the problem was that i did not add the action to the "Menu", but only to the toolbar. In fact, i can't see the Document Type Menu (before my Document Menu i can only see the button WSDL Soap Analysator) and i wonder if i have one (checked the toolbar options, but can't see something like this), but after adding the actions to the menu shortcuts work like charm. maybe a note should be added to the shortcut section in the user guide, if there isn't one which i missed... thanks again, Philipp Dan Caprioara schrieb:
Hello Philipp, The only built-in actions that can be used from a document type are the one inserting an XML fragment and the one inserting a text. If you need more advanced features, like inserting an XML fragment and then moving the caret after the inserted block, you should write your action in Java, then refer it from the document type. For more details, see:
http://www.oxygenxml.com/doc/ug-standalone/dg_java_api.html http://www.oxygenxml.com/InstData/Developer/oxygenAuthorSDK.zip
You will have to create a Java class that implements: ro.sync.ecss.extensions.api.AuthorOperation, something like this:
class InsertLB implements ro.sync.ecss.extensions.api.AuthorOperation{
public void doOperation( AuthorAccess authorAccess, ArgumentsMap arguments) throws IllegalArgumentException, AuthorOperationException {
String fragment = "<lb/>"; // Inserts this fragment at the caret position. int caretPosition = authorAccess.getCaretOffset(); authorAccess.insertXMLFragment(fragment, caretPosition); // Moves the caret after the start tag and end tag of <lb/> authorAccess.setCaretPosition(caretPosition + 2); } /** * Has no arguments. * * @return null. */ public ArgumentDescriptor[] getArguments() { return null; }
/** * @return A description of the operation. */ public String getDescription() { return "Inserts a line break. Moves the caret after the inserted fragment."; } }
After creating the Java file, you should follow the steps from the User Guide and deploy this action into your Document Type association.
Regarding the shortcuts, I have tested the "Bold" action using the shortcut "CTRL-SHIFT-B" and it works. I have change it to "CTRL-SHIFT-K" and worked also. Can you try to reopen the edited document after changing the shortcut?
Please check that the action you created is inserted in the Document Type menu (should appear in the main menu bar), before the menu "Document". If it is included only in the toolbar, the shortcut is ignored! Also you can check in the menu to see if the listed actions have the expected shortcuts. Another problem might be duplicated shortcuts (actions from the editor menus that have the same key combination) .
Best regards, Dan
Philipp Steinkrüger wrote:
Dear Oxy-users,
I am currently trying to learn how to do DocType Associations and I experienced two problems, a minor and a major one.
Heres the minor problem: I created a new button to insert a <lb/> element. Inserting works fine, i.e. after clicking the button, a <lb/> appears in the code. But in author mode, i guess because <lb/> is defined as a block element (to actually make the linebreak appear) it is shown as <lb></lb> and the cursor in placed inside the <lb></lb> after inserting it. So if the editor continues to write, he fills the <lb> which is of course not allowed by the schema. What I would like to do is to position the cursor behind the element after inserting it. is that possible?
The major problem concerns shortcuts: i defined a shortcut for the button, but it just doesn't work. Thats also true for predefined buttons, not only for my newly created ones. I tried to use the TEI Doctype and no shortcut works. I have no idea how to approach this problem. What could I do?
Thanks! Philipp
PS: It's Oxygen Standalone 9.1 for Windows, btw...
-- Philipp Steinkrüger M.A. Thomas-Institut der Universität zu Köln Universitätsstraße 22 50923 Köln +49 221 4702394
philipp.steinkrueger@uni-koeln.de http://www.thomasinstitut.uni-koeln.de http://www.philosophie.uni-koeln.de http://www.ide.de
_______________________________________________ oXygen-user mailing list oXygen-user@oxygenxml.com http://www.oxygenxml.com/mailman/listinfo/oxygen-user
-- Philipp Steinkrüger, M.A. Thomas-Institut der Universität zu Köln Universitätsstraße 22 50923 Köln Fon +49 221 4702394 Fax +49 221 4705011 philipp.steinkrueger@uni-koeln.de http://www.thomasinst.uni-koeln.de

Hi All, I'm getting following error when trying to run the Xquery on dbxml using Berkeley SystemID: C:\Documents and Settings\BDB\policy_1.xquery Description: javax.xml.transform.TransformerException: Error: Cannot read query content from C:\Program Files\Oxygen XML Editor 8.2/dbxml:/AtomicXQuery.xquery [err:XQST0059], <query>:2:1 (Error parsing an XQuery expression) Xquery internally importing a xquery module called "AtomicXQuery.xquery"....... Part of xquery -------------- declare copy-namespaces no-preserve, no-inherit; import module namespace AtomicXQuery="AtomicXQuery" at "AtomicXQuery.xquery"; declare namespace SWF="SWF"; declare namespace SWM="SWM"; ..... ..... ..... But without importing the module(Defined all function from AtomicXQuery in the same file, same Xquery works fine.... (:import module namespace AtomicXQuery="AtomicXQuery" at "AtomicXQuery.xquery";:) oXygen XML Editor version: 8.2 Berkeley DB XML version: 2.3.10 Is importing xquery module not suppoted in 8.2 version??? Any pointers on the root cause and solution for this problem would be great help...... Thanks in advance Lakshmi Please do not print this email unless it is absolutely necessary. The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments. WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email. www.wipro.com

Hello, When importing modules by using relative paths, Berkeley DB XML resolves them relative to the base URI. By default the base URI for a Berkeley DB XML database is the root of the default container: dbxml:/ We do not change the base URI as we have found out that this breaks the 'collection' function, as it also tries to resolve the specified collection relative to the base URI. As a result, to work around this problem you have to specify the imported module by using an absolute URL. So the import line should look like this: import module namespace AtomicXQuery="AtomicXQuery" at "file:///C:/Documents and Settings/BDB/AtomicXQuery.xquery"; Regards, Adrian Buza http://www.oxygenxml.com/ subbulakshmi.kumarasamy@wipro.com wrote:
Hi All,
I'm getting following error when trying to run the Xquery on dbxml using Berkeley
SystemID: C:\Documents and Settings\BDB\policy_1.xquery Description: javax.xml.transform.TransformerException: Error: Cannot read query content from C:\Program Files\Oxygen XML Editor 8.2/dbxml:/AtomicXQuery.xquery [err:XQST0059], <query>:2:1 (Error parsing an XQuery expression)
Xquery internally importing a xquery module called "AtomicXQuery.xquery"....... Part of xquery -------------- declare copy-namespaces no-preserve, no-inherit; import module namespace AtomicXQuery="AtomicXQuery" at "AtomicXQuery.xquery"; declare namespace SWF="SWF"; declare namespace SWM="SWM"; ..... ..... .....
But without importing the module(Defined all function from AtomicXQuery in the same file, same Xquery works fine.... (:import module namespace AtomicXQuery="AtomicXQuery" at "AtomicXQuery.xquery";:)
oXygen XML Editor version: 8.2 Berkeley DB XML version: 2.3.10
Is importing xquery module not suppoted in 8.2 version??? Any pointers on the root cause and solution for this problem would be great help......
Thanks in advance Lakshmi
Please do not print this email unless it is absolutely necessary.
The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments.
WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email.
www.wipro.com _______________________________________________ oXygen-user mailing list oXygen-user@oxygenxml.com http://www.oxygenxml.com/mailman/listinfo/oxygen-user
participants (4)
-
Adrian Buza
-
Dan Caprioara
-
Philipp Steinkrüger
-
subbulakshmi.kumarasamy@wipro.com