BI Publisher Function Listing v1
BI Publisher Function Listing v1
>
<?for-each: XML_SECTION?> ... <?end for-each?>
<?for-each: XML_SECTION[./CHILD_ELEMENT > 100]?> ... <?end for-each?>
<?for-each: xdoxslt:foreach_number($_XDOCTX, 1, ITERATIONS, 1)?>
<?for-each@section: XML_SECTION?>
<?for-each-group: XML_SECTION; ./XML_CATEGORY?>
<?format-date:DATE; DATE_MASK?>
<?format-number(NUMBER, MASK)?>
<?if: EXPRESSION [and (EXPRESSION) ... ]?> ... <?end if?>
<?if: EXPRESSION?> <?attribute@incontext: background-color; COLOUR?> <?end if?>
<?if: EXPRESSION?> <?attribute@incontext: color; COLOUR?> <?end if?>
<?if@row: EXPRESSION?> <?attribute@incontext: background-color; COLOUR?> <?end if?>
<?if@row: EXPRESSION?> <?attribute@incontext: color; COLOUR?> <?end if?>
<?import: DIRECTORY?>
<?initial-page-number:NUMBER?>
<?last()?>
<?local-name()?>
<?NUMBER mod NUMBER?>
<?otherwise:?> ... <?end otherwise?>
<?param@begin: PARAM_NAME; VALUE?>
<?position()?>
<?round(NUMBER)?>
<?section:force-page-count;'end-on-even-layout'?>
<?section:force-page-count;'end-on-odd-layout'?>
<?section:force-page-count;'end-on-even'?>
<?section:force-page-count;'end-on-odd'?>
<?sort: NODE; 'ascending'; data-type='text'?>
<?sort:current-group()/NODE; 'descending'; data-type='number'?>
<?split-by-page-break:?>
<?start@last-page:body?> <?end body?>
Initialize variable
Initialize variable for first for-each loop
Conditional to be used in conjunction
with 'choose' and 'otherwise'
Description
Retrieve value of attribute from parent node
Retrieve/Display value of variable
Apply template rule to elements descendants
Call template
Insert or apply template to current template
Rounds number up
Conditional statement to be used in conjuncti
with 'when' and 'otherwise'
Concatenate strings
Creates copy of current node
Count amount of specified nodes
<?floor(45.89)?>
<?for-each:On_Reporting_Area_S20?>
<?for-each: xdoxslt:foreach_number($_XDOCTX, 1, $maxchars, 1)?>
<?for-each@inlines:/Root/Rowset/Row?> <?Date_ID24?> <?end for-each?>
<?for-each-group:On_Reporting_Area_S20;./Contract_Debtors_ID12?>
<?format-date:'2010-12-31'; 'MEDIUM'?>
<?format-number(1500000, '#,###,###.00')?>
<?if@row:(position() mod 2 = 0) and (position() < last())?> ... <?end if?>
<?if: TOTAL_ID1 > 10?> <?attribute@incontext: background-color; 'green'?> <?end
<?if: TOTAL_ID1 > 10?> <?attribute@incontext: color; 'red'?> <?end if?>
<?if@row: TOTAL_ID1 > 10?> <?attribute@incontext: background-color; 'yellow'?> <
<?if@row: TOTAL_ID1 > 10?> <?attribute@incontext: color; 'blue'?> <?end if?>
<?import:Project Documents\BI\XML Repository\File.xsl?> OR <?import:file:///C:\Documents and Setti
-
<?round(93.75)?>
<?sort:current-group()/Total_of_D_Gross_Claims_To_Dat_ID5;'descending';data-type='number'?>
<?split-by-page-break:?>
o last page
<?string(ITEM_DESC_ID14)?>
<?string-length('Test this string')?>
<?substring('This is a test', 6, 4)?>
<?sum(Item/Price)?>
<?template: TestTemp?> ... <?end TestTemp?>
<?translate(Test_this_scenario_, To_, Vx )?>
<?variable:test;"123"?>
<?choose:?> <?when: x == y?> ... <?end when?> <?otherwise:?> ... <?end otherwise?> <?end cho
Example
<?for-each:Car_ID1?> <?./@year?> <?end for-each?>
<?$test?>
scendants
<?call:TestTemp?>
<?ceiling(123.12)?>
<?choose:?> <?when: x == y?> ... <?end when?> <?otherwise:?> ... <?end otherwise?> <?end cho
<?concat(This , is a, test.)?>
<?count(items/item)?>
45
25
2 | 3 | 14 | 6 | 25
2 | 3 | 14 | 6 | 25
2 | 3 | 14 | 6 | 25
:///C:\Documents and Settings\user\My Documents\Project Documents\BI\XML Repository\Document.rtf?>
2
nd otherwise?> <?end choose?>
94
ata-type='number'?>
-
16
'is a'
124
nd otherwise?> <?end choose?>
This is a test.
tory\Document.rtf?>
Function
<?xdoxslt:abs(NUMBER)?>
<?xdoxslt:current_date($_XDOLOCALE, $_XDOTIMEZONE)?>
<?xdoxslt:current_time($_XDOLOCALE, $_XDOTIMEZONE)?>
<?xdoxslt:date_diff(RESULT, FROM_DATE, TO_DATE, $_XDOLOCALE, $_XDOTIMEZONE)?>
<?xdoxslt:foreach_number($_XDOCTX, 1, ITERATIONS, 1)?>
<?xdoxslt:format_number(NUMBER, DEC_PLACES, $_XDOLOCALE)?>
<?xdoxslt:format_number(NUMBER, DEC_PLACES, THOUSAND_SEP, DEC_SEP, $_XDOLOCALE)?>
<?xdoxslt:get_array($_XDOCTX, TABLE_NAME, INDEX)?>
<?xdoxslt:get_day(DATE, LOCALITY)?>
<?xdoxslt:get_month(DATE, LOCALITY)?>
<?xdoxslt:get_variable($_XDOCTX, VAR_NAME)?>
<?xdoxslt:get_year(DATE, LOCALITY)?>
<?xdoxslt:ifelse(EXPRESSION, TRUE, FALSE)?>
<?xdoxslt:init_cap(STRING)?>
<?xdoxslt:left(STRING, LENGTH)?>
<?xdoxslt:ltrim(STRING)?>
<?xdoxslt:maximum(ELEMENT_NAME)?>
<?xdoxslt:month_name(MONTH_NUM, ABBREVIATE, $_XDOLOCALE)?>
<?xdoxslt:minimum(ELEMENT_NAME)?>
<?xdoxslt:next_element(GROUP, ., ELEMENT_NAME)?>
<?xdoxslt:pat_format_number(NUMBER, FORMAT, $_XDOLOCALE)?>
<?xdoxslt:prev_element(GROUP, .., ELEMENT_NAME)?>
<?xdoxslt:replace(STRING, OLD_CHAR, NEW_CHAR)?>
<?xdoxslt:replicate(STRING, NUM_REPS)?>
<?xdoxslt:right(STRING, LENGTH)?>
<?xdoxslt:round(NUMBER [, DECIMALS])?>
<?xdoxslt:rtrim(STRING)?>
<?xdoxslt:sec_diff(FROM_TIME, TO_TIME, $_XDOLOCALE, $_XDOTIMEZONE)?>
<?xdoxslt:set_array($_XDOCTX, TABLE_NAME, INDEX, STORE_VAL)?>
<?xdoxslt:set_variable($_XDOCTX, VAR_NAME, VALUE)?>
<?xdoxslt:truncate(NUMBER [, DEC_INT])?>
<?xdoxslt:trim(STRING)?>
$_XDOLOCALE)?>
Description
Return absolute value of number
Retrieve current date (YYYY-MM-DD)
Retrieve current time
Determine difference between dates
Used in conjunction with for-each loop
Format number
Format number with custom separators
Retrieve value from hash table
Get current day
Get current month
Get value
Get current year
Conditional Statement
Convert initial characters to capitals
Extract beginning portion of string
Removes leading white space in string
Retrieve largest value from element
Retrieves name of specified month
Retrieve smallest value from element
Retrieves subsequent element in group
Format number with pattern
Retrieves previous element in group
Replace consecutive characters
Replicate string
Extract end portion of string
Round number
Removes trailing white space in string
Determine difference between times
Store value in hash table
Declare and assign value to variable
Truncate number to specified decimals
Removes white space in string
Example
<?xdoxslt:abs(-123.45)?>
<?xdoxslt:current_date($_XDOLOCALE, $_XDOTIMEZONE)?>
<?xdoxslt:current_time($_XDOLOCALE, $_XDOTIMEZONE)?>
<?xdoxslt:date_diff(m', 2010-07-30, 2010-12-31, $_XDOLOCALE, $_XDOTIMEZONE)?>
<?for-each:xdoxslt:foreach_number($_XDOCTX, 1, $iterations, 1)?>
<?xdoxslt:format_number(12345, 2, $_XDOLOCALE)?>
<?xdoxslt:format_number(12345, 3, '.', 'x', $_XDOLOCALE)?>
<?xdoxslt:get_array($_XDOCTX, MyTable, 2)?>
<?xdoxslt:get_day(2010-07-29, 'Australia/Brisbane')?>
<?xdoxslt:get_month(2010-07-29, 'Australia/Brisbane')?>
<?xdoxslt:get_variable($_XDOCTX, 'test')?>
<?xdoxslt:get_year(2010-07-29, 'Australia/Brisbane')?>
<?xdoxslt:ifelse(a = b, 'Equivalent', 'Mismatch')?>
<?xdoxslt:init_cap('this is a test')?>
<?xdoxslt:left(abcdefg, 3)?>
<?xdoxslt:ltrim( a )?>
<?xdoxslt:maximum(Gross_Claims_ID24)?>
<?xdoxslt:month_name(1, 0, $_XDOLOCALE)?>
<?xdoxslt:minimum(Gross_Claims_ID24)?>
<?xdoxslt:next_element(current-group(), ., Pay_ID21)?>
<?xdoxslt:pat_format_number(12345, ##,##0.00, $_XDOLOCALE)?>
<?xdoxslt:prev_element(current-group(), .., Pay_ID21)?>
<?xdoxslt:replace(Mist, Mi, Te)?>
<?xdoxslt:replicate(String, 3)?>
<?xdoxslt:right(abcdefg, 3)?>
<?xdoxslt:round(4.56 , 0)?>
<?xdoxslt:rtrim( a )?>
<?xdoxslt:sec_diff(2000-04-08T20:00:00, 2000-04-08T21:00:00, $_XDOLOCALE, $_XDO
<?xdoxslt:set_array($_XDOCTX, MyTable, 2, Test)?>
<?xdoxslt:set_variable($_XDOCTX, 'test', "'Hello'")?>
<?xdoxslt:truncate(2.6789, 2)?>
<?xdoxslt:trim( A )?>
Result
123.45
2011-11-11
12:30:44 PM
5
12,456.00
12.456x000
'Test'
29
7
'Hello'
2010
This Is A Test
'abc'
'a '
253456
'January'
12,345.00
Test
'StringStringString'
'efg'
5
' a'
3600
2.67
'A'
Function
<?xdofx: EXPRESSION?>
<?xdofx: STRING||STRING?>
<?xdofx:ceil(NUMBER)?>
<?xdofx:chr(ASCII)?>
<?xdofx:decode(EXPRESSION, SEARCH, RESULT [, SEARCH, RESULT]...[, DEFAULT])?>
<?xdofx:floor(NUMBER)?>
<?xdofx:greatest(EXPRESSION [, EXPRESSION ... ] )?>
<?xdofx:if EXPRESSION then TRUE else FALSE end if?>
<?xdofx:instr(STRING, CHAR, [START], [nTH_APPEARANCE])?>
<?xdofx:least(EXPRESSION [, EXPRESSION ... ] )?>
<?xdofx:length(STRING)?>
<?xdofx:lower(STRING)?>
<?xdofx:lpad(STRING, NUM_CHARS, PAD_CHAR)?>
<?xdofx:replace(STRING, FIND_STR, REP_STR)?>
<?xdofx:round(NUMBER [, DECIMALS])?>
<?xdofx:rpad(STRING, NUM_CHARS, PAD_CHAR)?>
<?xdofx:substr(STRING, START_POS, LENGTH)?>
<?xdofx:sysdate()?>
<?xdofx:to_char(NUMBER)?>
<?xdofx:to_date(CHAR/NUM [, DATE_MASK])?>
<?xdofx:to_number(STRING)?>
<?xdofx:upper(STRING)?>
Description
Concatenate string
Rounds the number up
Return character from ASCII code
Similar to If-Else statement
Rounds number down
Returns largest expression
Conditional statement
Search for character in string
Returns smallest expression
Returns numeric length of string
Convert string to lowercase
Left pad
Replace string within string
Round number
Right pad
Extract portion of string
Retrieve system date
Convert number to string
Format date
Convert string to number
Convert string to uppercase
Example
<?xdofx:2+3-4*5/6?>
<?xdofx: FNAME||LNAME?>
<?xdofx:ceil(123.45)?>
<?xdofx:chr(097)?>
<?xdofx:decode('abc','xxx','Result01','abc,'Result02','Default')?>
<?xdofx:floor(456.78)?>
<?xdofx:greatest(1+1 , 2*3, 4-5, 6/7)?>
<?xdofx:if $test03 > 100 then greater else less end if?>
<?xdofx:Instr('abcabcabca', 'a', 2, 2)?>
<?xdofx:least(1+1 , 2*3, 5-4)?>
<?xdofx:length('This is a test')?>
<?xdofx:lower('TEST')?>
<?xdofx:lpad(LAST_NAME, 10, '.')?>
<?xdofx:replace(name, 'John', 'Jon')?>
<?xdofx:round(1.23 , 1)?>
<?xdofx:rpad(FIRST_NAME, 3, 'X')?>
<?xdofx:substr('abcdefg', 2, 3)?>
<?xdofx:to_char(12345)?>
<?xdofx:to_date(20111231, 'DAY - DD/MM/YYYY_HH:MI:SS')?>
<?xdofx:to_number('12345')?>
<?xdofx:upper('test')?>
Result
1.666...667
'JohnSmith'
124
a
'Result02'
456
6 (2*3)
7
1 (5-4)
14
'test'
'..........Smith'
name = 'Jon Smith'
1.20
'JohnXXX'
'bcd'
8/5/16
'12345'
31/12/2011 OR 12.31.11
12345
'TEST'
Function
<fo:bidi-override direction="ltr" unicode-bidi="bidi-override"> ELEMENT </fo:bidi-overrid
<fo:external-graphic src="url({STRING})" [width="{WIDTH}"] [height="{HEIGH
<fo:page-number/>
<?fo:page-number?>
<?fo:page-number-citation:page-total?>
<?fo:page-number-citation:xdofo:lastpage-joinseq?>
Description
Left to right
Insert image dynamically
Example
<fo:external-graphic src="url({'c:\temp/image.jpg'})" width="{Img_Width_ID24}" heigh
Additional Information
If width AND height are excluded, the image will display at default dimensions.
If either width OR height are specified, the image will display according to ratio.
If width AND height are specified, the image will display accordingly.
Function
<xsl:apply-templates select="TEMPLATE_NAME">
<xsl:attribute name="background-color" xdofo:ctx="block">COLOUR</xsl:
<xsl:attribute name="background-color" xdofo:ctx="inblock">COLOUR</xsl:attribute>
<xsl:attribute name="background-color" xdofo:ctx="incontext">COLOUR</
<xsl:attribute name="background-color" xdofo:ctx="inlines">COLOUR</xsl
<xsl:attribute name="break-before">BREAK_PLACE</xsl:attribute>
<xsl:attribute name="font-weight" xdofo:ctx="block"> bold </xsl:attribut
<xsl:attribute name="font-weight" xdofo:ctx="incontext"> bold </xsl:attr
<xsl:attribute name="number-columns-spanned" xdofo:ctx="block">AMT_
<xsl:choose>
<xsl:copy-of select="ELEMENT">
<xsl:decimal-format name="CUSTOM" xdofo:ctx="begin" decimal-separator
<xsl:for-each select ="GROUP_ELEMENT" xdofo:ctx="section">
<xsl:if test="exp">
<xsl:otherwise>
<xsl:sort select="ELEMENT">
<xsl:template name="TEMPLATE_NAME"> ... </xsl:template>
<xsl:template-match="ELEMENT">
<xsl:value-of select= "ELEMENT">
<xsl:variable name="VAR_NAME" select="VALUE"/>
<xsl:when test="exp">
Context
section
column
cell
block
inline
incontext
inblock
inlines
begin
end
Description
Description
The statement affects the whole section including the
header and footer. For example, a for-each@section context
command creates a new section for each occurrence - with
restarted page numbering and header and footer.
The statement will affect the whole column of a table. This
context is typically used to show and hide table columns
depending on the data.
The statement will affect the cell of a table. This is often
used together with @column in cross-tab tables to create
a dynamic number of columns.
The statement will affect multiple complete
fo:blocks (RTF paragraphs). This context is typically used for
if and for-each statements. It can also be used to apply
formatting to a paragraph or a table cell.
Example
name="background-color" xdofo:ctx="incontext">green</xsl:attribute>
name="background-color" xdofo:ctx="inlines">blue</xsl:attribute>
name="break-before">page</xsl:attribute>
name="font-weight" xdofo:ctx="block"> bold </xsl:attribute>
name="font-weight" xdofo:ctx="incontext"> bold </xsl:attribute>
xdofo:ctx="block" name="number-columns-spanned">3</xsl:attribute>
ction context
rence - with
a table. This
e columns
s is often
s to create
e surrounding
ements that
first element.
t is useful for
ne sections.
of the XSL
XSL stylesheet.
Mask
SHORT
MEDIUM
LONG
SHORT_TIME
MEDIUM_TIME
LONG_TIME
SHORT_TIME_TZ
MEDIUM_TIME_TZ
LONG_TIME_TZ
Symbol
AD
A.D.
AM
A.M.
BC
B.C.
CC
DAY
D
DD
DDD
DL
DS
DY
E
EE
FF[1..9]
HH
HH12
HH24
MI
MM
MON
MONTH
PM
P.M.
RR
RRRR
SS
TZD
TZH
TZM
TZR
WW
W
X
YYYY
YY
Y
Output
2/31/99
Dec 31, 1999
Friday, December 31, 1999
12/31/99 6:15 PM
Dec 31, 1999 6:15 PM
Friday, December 31, 1999 6:15 PM
12/31/99 6:15 PM GMT
Dec 31, 1999 6:15 PM GMT
Friday, December 31, 1999 6:15 PM GMT
Meaning
AD indicator without periods
AD indicator with periods
Meridian indicator without periods
Meridian indicator with periods
BC indicator without periods
BC indicator with periods
Century
Name of day, padded with blanks to length of 9 characters
Day of week (1-7)
Day of month (1-31)
Day of year (1-366)
Returns a value in the long date format
Returns a value in the short date format
Abbreviated name of day
Abbreviated era name
Full era name
Fractional seconds
Use the numbers 1 to 9 after FF to specify the number of digits in the
fractional second portion of the datetime value returned.
Hour of day (1-12)
Hour of day (1-12)
Hour of day (0-23)
Minute (0-59)
Month (01-12; JAN = 01)
Abbreviated name of month
Name of month, padded with blanks to length of 9 characters
Meridian indicator without periods
Meridian indicator with periods
Lets you store 20th century dates in the 21st century using only two digits
Round year
Example
'HH:MI:SS.FF3'
y two digits
'HH:MI:SS.FFTZH:TZM'
PST (Pacific Standard Time)
he database.
the seventh.
Notation
Meaning
Current Node
..
Parent Node
//
Descendants
Attribute
[]
Specify Conditions
Description
Example
<?//Amount_ID1?>
<?for-each:On_Section_S1/Print_Trans_S2?><?../Totals_S3/Total_Amount_ID2?><?end for-each?>
<?for-each:Car_S1?> <?./@year?> <?end for-each?>
<?for-each:On_Section_S1[./Print_Trans_S2/Amount_ID1 > 100]?> ... <?end for-each?>
?end for-each?>
'black'
'silver'
'gray'
'white'
'maroon'
'red'
'purple'
'fuchsia'
'green'
'lime'
'olive'