Victor Krapivin
Joined: 04/06/2009 10:12:44
Messages: 45
Offline
|
Once you clicking text editor, you'll see a lot of elements, a lot of menus, a lot of buttons, and sometimes it is not so easy to find how to use this. Hope this article helps you.
Often, we have questions:
Please provide me the detailed description and simple examples of how to use these functions, in XSLfast, available under:
- Node Set
- String
- Boolean
- Number
- Date/Time
- Math
- Today
There are XPath functions grouped by categories. It are necessary for case you need to operate not with full string for example but with its' length. To use necessary functions from menu instead of typing, you can
- select such expression within variable
- click string -> string-length
and voila! your selected fragment is arranged by proper function call.
To let it more understandable, I need to explain a bit the background of the text itself and text editor in particular.
The text element is an composite; it able to contain many pieces at once. There are
- static texts
- variables from originating XML (XSD, DTD).
So, the typical text content is
-------------------------------------------
First Name: {/Report/Order/FirstName}
Last Name: {/Report/Order/LastName}
Address: {/Report/Order/Address1} {/Report/Order/Address2}
Email: {/Report/Order/Email}
-------------------------------------------
This is an one element with static strings (at the left of each row) and with couple of variables (every variable is arranged by figure brackets). To type variable, you can either drag such node from XML tree at the left and drop it to position you need, or simply type such text with figure brackets.
Of course, such time you need to format variable's contents as links, dates, numbers, or so. To do this, you can use context menu at variable, "Convert" sub-menu item, and select proper view you need. In the same manner, via context menu, you can launch inspector window for variable and specify options here ("Properties" .
Or, if you need, you can use tool bar area at the right (see icons). By clicking on that icons you can place variables with correct text and with surrounding properties. The usage as usual: select such text, click on icon, and you'll convert it into variable and with correct type.
The correct usage you can see at example 01_SimpleFlyer.
This message was edited 1 time. Last update was at 26/08/2009 09:49:07
|