
Good planning and preparation of the internal XML logic will produce best results in UltraXML. To achieve this goal in context of multiple complex systems it is important to keep the following in mind:
 | KISS (Keep It Simple and Stupid)
|  | Export elements relevant to formatting issues
|  | Keep similar contents in corresponding elements
|  | Combine similar contents in logical elements
|  | Create tables with established schemas such as HTML or Cals
|  | Define variants by using attributes or by introducing additional hierarchical steps
|  | Allow for sequential processing in UltraXML
|  | Apply the current encoding |
XML adjusted for layout needs will let you achieve
 | a simple and cost efficient style sheet
|  | high performance
|  | 100 % automation
|  | transparent and simple post processing |
Publiman, our publication manager is the ideal software tool to this end. Therein simple and complex definitions of XML can be made. These definitions are rendered in no time. Always keep the specific requirements in mind.
Important steps towards the achievement of a layout ready XML
UltraXML processes and formats XML data utilising the standards XPath and XSLT. However only a subset of the mentioned technologies is used. The following tips are intended to help with the preparation of the XML data for layout needs.
[Keep It Simple, make use of]
- transparent structures
- short and concise names for elements and attributes
- If possible use small letters for elements
- Keep similar contents in corresponding elements
[Export elements relevant to formatting issues]
If possible clear your XML of all unneeded elements and attributes i.e. export only elements and attributes relevant to the formatting of your text. Especially when dealing with publication in UTF 16 and larger then 10 MB a lean XML will be rewarded in good and fast performance.
[Keep similar contents in corresponding elements]
Example: If a product is described in several data fields e.g.
- Description 1
- Description 2
- Description 3
in such a case your XML should something like this:
"<productdescription>
<description type="Description1">Text</description>
<description type="Description2">Text</description>
<description type="Description3">Text</description>
</productdescription>"
This way Similar formatting instructions can be defined for all. Formatting can be refined using the attributes. The elements with the "bracket" <productdescription> can be tested for their position. Thereby the space before, between and after the group of descriptive elements can be fine tuned.
[Create tables with established schemas such as HTML or Cals]
UltraXML will handle HTML and Cals tables. It is of great importance that the tables have clearly defined tags defining the table header and body. The Table element should be further refined with attributive information on the number of columns and their width. The number of columns will crate automatically desired number of columns. The table tag names can be named freely. For a good degree of transparency in your XML formatting workflow html or Cals tags are preferable. Cell or row spans as well cell lines need have to be defined as attributes on a cell level. Global table rules however can be defined in the table tag.
[Define variants by using attributes or by introducing additional hierarchical steps]
If you want to keep the style sheet work down then you will need to make good use of hierarchical element layout. Global formatting settings should be placed as far up in the hierarchy as possible. These formatting instructions will then be inherited to the elements beneath them e.g.:
"<images>
<image type="small">Name</image>
<image type="medium">Name</image>
</images>"
The elements <images> you can define general formatting instructions. The tags image can in turn be refined by testing for the attribute small or medium. As we saw earlier the position of the tags can be tested for as well.
[Allow for sequential processing in UltraXML]
UltraXML works sequentially from top to bottom. Using XPath the nodes can be tested very precisely. Siblings can be testes for as well. However performance can suffer when using this test especially when using the sibling test on a hierarchical element that has many children elements such as a table element. These tests for siblings can be avoided by using further attributes or hierarchical elements. This however preconditions a flexible XML generating tool such as Publiman.
[Apply the current encoding]
Data should be kept in UTF-8 or UTF-16. Special characters can be defined as entities. These can be defined separately in UltraXML as references.
|