Component Libraries
Organizing re-usable elements into components
The component library differs from document templates, as it does not define any pages, but collections of re-usable elements, called Components. Components can be defined to have a design-time size, or canvas that can be defined to any desired dimensions. Depending on the objects residing within the component, they will either define an absolute dimension, or they will adopt to the container or page from where they are used. Components can contain all the usual design-Objects, such as tables, groupboxes, text and user input.
A component library with components
When handling larger sets of documents, some parts of the layout or information is often common. To enhance design and maintenance of this information, all common elements can be separated into reusable component libraries. Components can be created for simple re-usable elements such as address information, company logo or letterheads.
A simple company address component
Organize common values as library variables
Try defining common string values as variables in your component library, and make sure to utilize them in all defined templates.
This allows single point of maintenance.
If the company fax number or web-adress changes, and all your doument templates use them, it is a matter of changing variable value, rather than edit and check every document template.
Using components in a document template
Including libraries, xsl:include
In XSLT, various stylesheets can be combined by the means of INCLUDES to generate the desired output.
To use a defined component in a document template, the library containing the desired component must be included. Click (+) Import new library and select a component library file (.xfc)
Digiforms uses standard xsl:include to import component libraries into a document template.
When adding a component instance to a document layout, the component instance property dialog will appear. Select the desired component library to be included.
Adding a component instance to document, importing a library and selecting a component
Keeping components organized
Library name and component name
Several component libraries could define components with similar or even equal names, so to be able to separate them - Digiforms Designer defines an additional attribute to the library, the library name.
This is similar to how Java defines libraries in packages and ensures that the correct component will be retrieved when running document templates in the digiforms server.
Defining a library / package name
Read more in following related topics