24.08.2015 Views

Oxygen XML Author plugin 13.2.0

Oxygen XML Author plugin 13.2.0

Oxygen XML Author plugin 13.2.0

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>Author</strong> Developer Guide | 170Note: The initial mode for an document type can also be customized from the Edit modes preferences panellocated in Window > Preferences > oXygen > Editor > Edit modes.You can specify the association rules used for determining a document type for an opened <strong>XML</strong> document. A rule candefine one or more conditions. All conditions need to be fulfilled in order for a specific rule to be chosen. Conditionscan specify:• Namespace - The namespace of the document that matches the document type.• Root local name of document - The local name of the document that matches the document type.• File name - The file name (including the extension) of the document that matches the document type.• Public ID (for DTDs) - The PUBLIC identifier of the document that matches the document type.• Java class - Name of Java class that is called for finding if the document type should be used for an <strong>XML</strong> document.Java class must implement ro.sync.ecss.extensions.api.DocumentTypeCustomRuleMatcherinterface from <strong>Author</strong> API.In the Schema tab, you can specify the type and URI of schema used for validation and content completion of alldocuments from the document type, when there is no schema detected in the document.You can choose one of the following schema types:• DTD• Relax NG schema (<strong>XML</strong> syntax)• Relax NG schema (<strong>XML</strong> syntax) + Schematron• Relax NG schema (compact syntax)• <strong>XML</strong> Schema• <strong>XML</strong> Schema + Schematron rules• NVDL schemaConfiguring Actions, Menus and ToolbarsThe <strong>Author</strong> toolbars and menus can be changed to provide a productive editing experience for the content authors. Youcan create a set of actions that are specific to a document type.In the example with the sdf framework, you created the stylesheet and the validation schema. Now let's add someactions to insert a section and a table. To add a new action, follow the procedure:1. Open the Options Dialog, and select the Document Types Association option pane.2. In the lower part of the Document Type Association dialog, click on the <strong>Author</strong> tab, then select the Actions label.3. To add a new action click on the Add button.The Insert Section ActionThis section shows all the steps needed to define the Insert Section action. We assume the icon files(Section16.png)for the menu item and (Section20.png) for the toolbar, are already available. Although you could use the sameicon size for both menu and toolbar, usually the icons from the toolbars are larger than the ones found in the menus.These files should be placed in the frameworks / sdf directory.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!