Page 1 of 1

A Question about customized toolbar for a new document type

Posted: Fri Dec 10, 2010 4:28 am
by gymac
Dear all,

I met a question when using Oxygen editor to define a new document type.
I declared a new type of document A by writing corresponding dtd schema and css, and I put all of them into a type A folder and place this foler under the framework folder of the editor.
I then went into the "Document Type Association" and added this new type A by specifying where to locate the dtd schema and css and catalog. After that, it worked perfectly fine, when I opened a document of type A, I can switch to author mode without any error and view.

But there seemed to be a small error with the customized toolbar, I didn't add any action to this "Author Custom Action 1" tool bar, that is, under the "Author" option and "Toolbar" Tab, both left "Available Actions" and right "Current Actions" don't contain any actions. However, after I open a document of type A and switched to author mode, the "Author Custom Action 1" toolbar is full of actions like "Bold" "Italic" and "Insert" etc, which didn't exist at all in the Toolbar option pane of the type A. Even worse, if I declare a new action and add it to this "Author Custom Action 1" toolbar, it won't show on it at all.

I am really clueless at the moment, I wonder if someone could give me some suggestions and help, thanks in advance.

Re: A Question about customized toolbar for a new document type

Posted: Fri Dec 10, 2010 1:28 pm
by Radu
Hi,

From what it seems your document type is not used for the XML document at all.
So if you go to the Oxygen Preferences->"Document Type Association" page and edit your document type:
1) The chosen Storage type should be external like D:\OXYGEN\frameworks\A\a.framework
2) In the Rules tab you should have association rules which are used to determine if opened XML files should be matched with your document type. If your XML file has a common root name like <book> it is possible that an out-of-the-box defined document type also matches the same rule. Oxygen will associate the XML to the first document type which matches the rule (in this example the Docbook 4 document type also matches book). So this could be your case.

What you can check out:
Open your XML in the Author page, go to the Window menu (or Perspectives for older versions)->Show View->Properties.
In the Properties view look at the value of the Document type field. Does it match your document type?

If not you can disable the conflicting document type for example (checkboxes in the "Document Type Association" page) or move UP your document type to be first in the list for example.

Regards,
Radu