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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>Author</strong> for DITA | 129• Arbitrary content references - You may prefer to keep many pieces of reusable content in one file. For example, youmight want one file to consist of a list of product names, with each product name in a phrase ( element)within the file. Then, wherever you need to display a product name, you can insert a content reference that points tothe appropriate element in this file.This strategy requires more setup than reusable components, but makes easier centrally managing the reused content.<strong>Oxygen</strong> <strong>XML</strong> <strong>Author</strong> <strong>plugin</strong> creates a reference to the external content by adding a conref attribute to an element inthe local document. The conref attribute defines a link to the referenced content, made up of a path to the file and thetopic ID within the file. The path may also reference a specific element ID within the topic. Referenced content is notphysically copied to the referencing file, but <strong>Oxygen</strong> <strong>XML</strong> <strong>Author</strong> <strong>plugin</strong> displays it as if it is there in the referencingfile. You can also choose to view local content instead of referenced content, to edit the attributes or contents of thereferencing element.How to Work with Reusable ComponentsWhen you need to reuse a part of a DITA topic in different places (in the same topic or in different topics) it isrecommended to create a separate component and insert only a reference to the new component in all places. Below arethe steps for extracting a reusable component, inserting a reference to the component and quickly editing the contentinside the component.1. Select with the mouse the content that you want to reuse in the DITA file opened in <strong>Author</strong> mode.2. Start the action Create Reusable Component that is available on the DITA menu, the <strong>Author</strong> framework actionstoolbar and the contextual menu of the <strong>Author</strong> editor.3. In the combo box Reuse Content select the DITA element with the content that you want to extract in a separatecomponent. The combo box contains the current DITA element where the cursor is located (for example a p element- a paragraph - or a step or a taskbody or a conbody etc.) and also all the ancestor elements of the currentelement.4. In the Description area enter a textual description for quick identification by other users of the component.5. If you want to replace the extracted content with a reference to the new component you should leave the checkboxReplace selection with content reference with the default value (selected).6. Press the Save button which will open a file system dialog where you have to select the folder and enter the nameof the file that will store the reusable component.7. Press the Save button in the file system dialog to save the reusable component in a file. If the checkbox was selectedin the Create Reusable Component dialog the conref attribute will be added to the element that was extractedas a separate component. In <strong>Author</strong> mode the content that is referenced by the conref attribute is displayed withgrey background and is read-only because it is stored in other file.8. Optionally, to insert a reference to the same component in other location just place the cursor at the insert locationand run the action Insert Reusable Component that is available on the DITA menu, the <strong>Author</strong> framework actionstoolbar and the contextual menu of the <strong>Author</strong> editor. Just select in the file system dialog the file that stores thecomponent and press the OK button. The action will add a conref attribute to the DITA element at the insertlocation. The referenced content will be displayed in <strong>Author</strong> mode with grey background to indicate that it is noteditable.9. Optionally, to edit the content inside the component just click on the open icon at the start of the grey backgroundarea which will open the component in a separate editor.Insert a Direct Content ReferenceYou should follow these steps for inserting an element with a content reference (conref) attribute:1. Start one of the actions Insert a DITA Content Reference and Insert a DITA Content Key Reference.2. In the dialog Insert Content Reference select the file with the referenced content in the URL field.3. In the tree that presents the DITA elements of the specified file that have an id attribute you have to select theelement or the interval of elements that you want to reference. The conref field will be filled automatically with

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

Saved successfully!

Ooh no, something went wrong!