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 | 228Note: The Javadoc documentation of the <strong>Author</strong> API used in the example files is available on the <strong>Oxygen</strong> <strong>XML</strong>website. Also it can be downloaded as a zip archive from the website.• Automatic ID generation - You can automatically generate unique IDs for newly inserted elements. Implementationsare already available for the DITA and Docbook frameworks. The following methods can be implemented toaccomplish this: assignUniqueIDs(int startOffset, int endOffset),isAutoIDGenerationActive()• Avoiding copying unique attributes when "Split" is called inside an element - You can split the current blockelement by pressing the "Enter" key and then choosing "Split". This is a very useful way to create new paragraphs,for example. All attributes are by default copied on the new element but if those attributes are IDs you sometimeswant to avoid creating validation errors in the editor. Implementing the following method, you can decide whetheran attribute should be copied or not during the split: boolean copyAttributeOnSplit(StringattrQName, <strong>Author</strong>Element element)Tip:The ro.sync.ecss.extensions.commons.id.DefaultUniqueAttributesRecognizerclass is an implementation of the interface which can be extended by your customization to provide easyassignation of IDs in your framework. You can also check out the DITA and Docbook implementations ofro.sync.ecss.extensions.api.UniqueAttributesRecognizer to see how they wereimplemented and connected to the extensions bundle.Configuring an <strong>XML</strong> Node Renderer CustomizerYou can use this API extension to customize the way an <strong>XML</strong> node is rendered in the <strong>Author</strong> Outline view, <strong>Author</strong>breadcrumb navigation bar, Text mode Outline view, content completion assistant window or DITA Maps Managerview.Note: The Javadoc documentation of the <strong>Author</strong> API used in the example files is available on the <strong>Oxygen</strong> <strong>XML</strong>website. Also it can be downloaded as a zip archive from the website.There are two methods to provide an implementation ofro.sync.exml.workspace.api.node.customizer.<strong>XML</strong>NodeRendererCustomizer:• as a part of a bundle - returning it from the create<strong>XML</strong>NodeCustomizer() method of the ExtensionsBundleassociated with your document type in the Document type dialog, Extensions tab, Extensions bundle field.• as an individual extension - associated with your document type in the Document type dialog, Extensions tab,Individual extensions section, <strong>XML</strong> node renderer customizer field.Styling the table Element.There are standard CSS properties used to indicate what elements are tables, table rows and table cells. What CSS ismissing is the possibility to indicate the cell spanning. <strong>Oxygen</strong> <strong>XML</strong> <strong>Author</strong> offers support for adding an extension tosolve this problem. This will be presented in the next chapters.The table in this example is a simple one. The header must be formatted in a different way than the ordinary rows, so itwill have a background color.table{display:table;border:1px solid navy;margin:1em;max-width:1000px;min-width:150px;}table[width]{width:attr(width, length);}

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

Saved successfully!

Ooh no, something went wrong!