Victor Krapivin
Joined: 04/06/2009 10:12:44
Messages: 45
Offline
|
Of course, you need to make layout fast,. But XSLfast has a lot of abilities - which one is the fastest?
Here we collected few most important tricks that helps you use XSLfast fast and error-proof.
- Tool bar has only few operations most often used. Use context menus to see more actions available.
- Use inspection window if you need to know all possible options for selected element(s).
- Use drag and drop every time you need to type something. For almost all cases it works.
- Please note amount of options is sensitive to render engine you selected and other options. For example, exact positioning of elements is applicable only if absolute placement is selected. The absolute/relative placement is available only if you have fo:block/fo:container options turned on, etc.
- While creating new layout, try use existing template first.
- Leverage amount of elements on page. Less elements on page - faster creation. To do this, you have two composite and really big elements. There are texts and tables.
- Text element hints.
- Keep in mind, you can combine multiple static texts and variables from XML directly in one text element. You don't need to make mosaic.
- To place variable, you can simply drop it into editor area.
- Every variable in text area can be represented as link, date/time, formatted numbers, and so. Use context menus to specify correct type of elements (Convert) and settings (Properties).
- To type variable inside text by hands, just around your text into figure brackets.
- If you need single selection from certain elements like "if A then B else C"), place choose element from palette of elements on the right, and incorporate your clauses inside. You don't need to make custom XSL code here.
- If you need such highlighting of variables depending of its' values, please use conditional attributes from context menu, and table at the bottom of text area.
- The typical appliance of text element is displayed at first example, please take a look on it and know it is good practice.
- Table tricks.
- The fastest way to make table - just use wizard from first to last step. Here you'll able to specify table size, table summaries in different forms, and table content. Just few clicks and you don't need to type many complex XPath expressions.
- Of course the simplest way to fill table - use drag and drop from structure tree.
- With context menu and tool bar, you can manage your table, add/remove columns, tables, sub-filters, and more.
- If you need to enumerate such hierarchy like ProductGroup/Product, you don't need to make two tables and combine it. One table is enough. Just specify filter/break level for such rows you need for inner Product elements.
- If you need master/detail tables, use appropriate wizard from context menu; it will make you slave table and embeds into master table as template, with correct filters.
- If you need such analytic like counts, summaries, etc you don't need to make it manually. use context menu for certain column.
- Of course, all options are collected at left-bottom inspection window.
- If you need, you can place several elements into one table cell.
- Border tricks
- you can specify border for table cell and for inner cell elements separately.
- use context menu to specify correct borders for whole table cells.
- For really complex layouts and reports, or for case your data is not well-formed in hierarchy, you can use pivot tables or filtering by content for usual tables. Pivot tables are good things, but whole content is dynamically created. So, if you need fixed columns, use filtering by content for usual tables instead.
- If you have good pivot table and need to format it more than XSLfast provides, convert it to usual table via one click from context menu. You'll lose dynamic columns, but you'll can manage every cell as you wish.
- use multiple elements selection if you need to specify colors, borders, and so on.
- use conversions from one element types to another; all XPath expressions will be kept and reassigned depending on type. XSLfast also able to convert known XSL code to XSLfast elements!
- In case you need complex XPath expression - use XPath Monitor to evaluate it.
Hope these hints will help you making layouts much faster.
This message was edited 1 time. Last update was at 26/08/2009 09:49:37
|