I recently had to create a few pagelets based on query output. One of the issues I have encountered was formatting of the output. For example, displaying currency fields and dates in the format that shows decimal points, comma separating significant digits and adding currency signs.
I read a few references including Chapter 4 in Jim Marion’s books, but still had a problem with using formats in XSLT. Recently I found the following reference in Portal PeopleBook – Formatting Date, Time, DateTime, Currency, and Number Elements.
Note. FORMAT, WIDTH, and PRECISION have the same format as the NumberToDisplayString() PeopleCode Function. CURRENCY_CODE can be one of the supported PeopleSoft currency codes, or if left blank, defaults to the user's currency code. CURRENCY_DECORATION can have the value of SYMBOL (currency symbol appears before the number), CODE (currency code appears after the number), or BOTH (the default).
In order to actually format your number correctly I suggest you review the reference PeopleBook Reference for NumberToDisplayString() function.
In my case I wanted to display a column from query output formatted as $999,999,999.00. This resulted in the following section in XSLT template of the pagelet for the column:
Let me know if you have any questions or suggestions for this or my next posts.