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.

Stack elementStack = context.getElementStack();if (elementStack != null) {ContextElement contextElement = context.getElementStack().peek();if ("header".equals(contextElement.getQName())) {if (elements != null) {for (Iterator iterator = elements.iterator();iterator.hasNext();) {CIElement element = iterator.next();// Remove the 'td' elementif ("td".equals(element.getQName())) {elements.remove(element);break;}}} else {elements = new ArrayList();}// Insert the 'th' element in the list of content completion proposalsCIElement thElement = new SDFElement();thElement.setName("th");elements.add(thElement);}}} else {// If the given context is null then the given list of content completionelements contains// global elements.}return elements;}The elements or attributes values can be filtered using the filterElementValues or filterAttributeValuesmethods.Note: The complete source code can be found in the Simple Documentation Framework project, included inthe <strong>Oxygen</strong> <strong>Author</strong> SDK zip available for download on the <strong>Oxygen</strong> <strong>XML</strong> <strong>Author</strong> <strong>plugin</strong> website.Configuring a Link target element finderThe link target reference finder represents the support for finding references from links which indicate specific elementsinside an <strong>XML</strong> document. This support will only be available if a schema is associated with the document type.If you do not define a custom link target reference finder, the DefaultElementLocatorProvider implementationwill be used by default. The interface which should be implemented for a custom link target reference finder isro.sync.ecss.extensions.api.link.ElementLocatorProvider. As an alternative, thero.sync.ecss.extensions.commons.DefaultElementLocatorProvider implementation can also beextended.The used ElementLocatorProvider will be queried for an ElementLocator when a link location must bedetermined (when a link is clicked). Then, to find the corresponding (linked) element, the obtained ElementLocatorwill be queried for each element from the document.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.The DefaultElementLocatorProvider implementationThe DefaultElementLocatorProvider implementation offers support for the most common types of links:• links based on ID attribute values• XPointer element() scheme<strong>Author</strong> Developer Guide | 212

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

Saved successfully!

Ooh no, something went wrong!