Home Forums DITA and XMetaL Discussion Reuseable Component Reply To: Reuseable Component


Reply to: Reuseable Component

XMetaL's Reusable Components are a special case of the DITA “conref” mechanism for reusing content.

A conref is an attribute that forms a particular kind of link in a DITA document.  This link is essentially like a URL that points to another element in a DITA document (usually another one, but doesn't have to be).  More importantly, the meaning of this link is when this document is published to an output format, go get that other thing and put it in here.  The thing being referenced must be of a compatible type for the location where the link is made.  For your convenience, XMetaL also displays the referenced content in place while you are editing.

Conrefs can point to things anywhere in any DITA documents, but many users prefer to save one's reusable components (the targets of the links) one-per-document.  This has certain advantages with regards to storing content in a CMS, for example.

XMetaL's Reusable Components gives you some special-purpose commands that let you do just that:  “Create Reusable Component” will take a bit of content that you have selected in your current document, and save it out into a separate file (which is a standard, specialized DITA topic) for later reuse.  “Insert Reusable Component” allows you to select one of these saved components and form a link to it.