BIP_BI Pubisher的SQL/XSL/FO扩展函数应用(概念)

2014-12-01 Created By BaoXinjian

一、摘要


XML Publisher扩展了一些SQL和XSL,XSL-FO函数,使它们可以在RTF模板中使用.语法如下:

扩展SQL语法:<?xdofx:expression?>

扩展XSL语法:<?xdoxslt:expression?>

扩展FO语法:<?fo::expression?>

 

二、解析


1. 扩展SQL语法

SQL                                 Statement Usage                           Description
2+3                                 <?xdofx:2+3?>                             Addition
2-3                                 <?xdofx:2-3?>                             Subtraction
2*3                                 <?xdofx:2*3?>                             Multiplication
2/3                                 <?xdofx:2/3?>                             Division
2**3                                <?xdofx:2**3?>                            Exponential
3||2                                <?xdofx:3||2?>                            Concatenation
lpad(’aaa’,10,’.’)                  <?xdofx:lpad(’aaa’,10,’.’)?>              The lpad function pads the left side of a
rpad(’aaa’,10,’.’)                  <?xdofx:rpad(’aaa’,10,’.’)?>              The rpad function pads the right side of a
decode(’x’,'b’,'c’,'x’)             <?xdofx:decode(’x’,'b’,'c’,x’,'d’)?>      The decode function has the functionality of
Instr(’abcab’,'a’,2)                <?xdofx:Instr(’abca’,'a’,2)?>             The instr function returns the location of
substr(’abc’,2,3)                   <?xdofx:substr(’abc’,2,3)?>               The substr function allows you to extract
replace(name,’Jo’,'J’)              <?xdofx:replace(name,’Jo’,'J’)?>          The replace function replaces a sequence
to_number(’12345’)                  <?xdofx:to_number(’12345’)?>
to_char(12345)                      <?xdofx:to_char(12345)?>
sysdate()                           <?xdofx:sysdate()?>
minimum                             <?xdoxslt:minimum(ELEMENT_NAME)?>         Returns the minimum value of the element
maximum                             <?xdoxslt:maximum(ELEMENT_NAME)?>         Returns the maximum value of the element

 

2. 扩展XSL语法

Supported XSL Elements                             Description                                      XML Publisher 语法
<xsl:value-of select="name">                       Placeholder syntax                               <?name?>
<xsl:apply-templates select="name">                Applies a template rule to the                   <?apply:name?>
<xsl:copy-of select="name">                        Creates a copy of the current node.              <?copy-of:name?>
<xsl:call-template name="name">                    Calls a named template to be                     <?call:name?>
<xsl:sort select="name">                           Sorts a group of data based on                   <?sort:name?>
<xsl:for-each select="name">                       Loops through the rows of data                   <?for-each:name?>
<xsl:choose>                                       Used in conjunction with when                    <?choose?>
<xsl:when test="exp">                              Used in conjunction with                         <?when:expression?>
<xsl:otherwise>                                    Used in conjunction with                         <?otherwise?>
<xsl:if test="exp">                                Used for conditional formatting.                 <?if:expression?>
<xsl:template name="name">                         Template declaration                             <?template:name?>
<xsl:variable name="name">                         Local or global variable declaration             <?variable:name?>
<xsl:import href="url">                            Import the contents of one                       <?import:url?>
<xsl:include href="url">                           Include one stylesheet in another                <?include:url?>
<xsl:stylesheet xmlns:x="url">                     Define the root element of a stylesheet          <?namespace:x=url?>

 

3. 扩展FO语法

FO Element                                         XML Publisher 语法
<fo:page-number-citation ref-id="id">              <?fo:page-number-citation:id?>                                    
<fo:page-number>                                   <?fo:page-number?>
<fo:ANY NAME WITHOUT ATTRIBUTE>                    <?fo:ANY NAME WITHOUT ATTRIBUTE?>

 

Thanks and Regards

转载: 晓风波 - http://blog.csdn.net/rfb0204421/article/details/7662861

posted on 2014-06-07 19:04  东方瀚海  阅读(847)  评论(0编辑  收藏  举报