To handlethousand/decimal delimiter formatting you need to do a little work on yourtemplate. XSL supports any delimiters but it needs to be told what to use. Youdo this by declaring the decimal format in your template thus: Name – is the nameyou give you format, this can be referenced from your format-number calls Decimal-separator –this is the character you wish to use as the decimal point Grouping-separator –this is the character you wish to use to denote the thousand separator. There are severalother options that can be set but these are the basic two. Please note the useof the xdofo:ctx=”begin” – this is an advanced feature which forces the decimalformat declaration to the root of the template no matter where it is put in thephysical RTF. So when we call theformat function this time we use: This time 1234.5 willbecome 1.234,50 asexpected. Note the format string has changed this time. 2. The other alternative is to use MSWord?s native field formatting. If you open one of the fields below you?ll notice that there is a field type drop down list that includes ?Number? as an option. You can select this, and then select the number format you require. 3. XDO Formatting – once finalized XDO will format the numbers and dates according to runtime locale settings. Details to follow. In this template the Entered Amt uses Accounted Amtuses 三十四:BIPUBLISHER图 1, 导入数据 2, 插入BIPUBLISHER图 3, 选择分组的数据拖入框内 4, 选择类型(会根据数据提供可供选择的类型) 5, 设置相关参数就OK 三十五.加密,字体 举例 This document issecured with a password - ********* This is a barcodefont: 12132435353 Thisis a MICR font: 121313&33433 Template Level Property Support You can now embed any of the XML Publisherproperties into your RTF template < If you wanted to secure PDF outputgenerated from a template you can use the XML Publisher pdf security propertiesand obtain the password value from the incoming XML data. To add an XML Publisher property to atemplate, use the Properties dialog (File -> Properties): The XML Publisher properties need to have'xdo-' as a prefix to their regular names so 'pdf-open-password' becomes'xdo-pdf-open-password'. Just add the XML Publisher properties and their valueto the document using the dialog. If you want to reference a data element inthe XML, a password for instance then use the curly braces in enclose the pathto the XML element. WorkedExample I – Embedding a font reference Let’s assume you want to use a font in yourtemplate called 'XMLP Script', this is not available as a regular font on yourserver so XML Publisher requires that you tell it where the font is at runtime.If this location is known and fixed for wherever the template might bedeployed, let’s assume '/tmp/fonts' then you can set the font and its locationinto the template and XML Publisher will use it at runtime. In the propertiesdialog you would enter: Name :xdo-font.XMLPScript.normal.normal Type :Text Value :truetype./tmp/fonts/XMLPScript.ttf When the template is applied to the XMLdata on the server, XML Publisher will look for the font in the /tmp/fontsdirectory. WorkedExample II – Securing a PDF output Let’s assume that the XML data you areusing will contain a specific password that needs to be used to secure theoutput document. Again we can use the document properties to set the PDFsecurity password and reference a value in the XML. Assuming the following XMLdata: .. In the properties dialog we would enter twoproperties: Name : xdo-pdf-security – this property sets whetherthe security feature is enabled or not Type :Text Value :{/PO/security} Name : xdo-pdf-open-password – this property setsthe password Type :Text Value :{/PO/password} Storing the password in the XML data couldbe a security problem if the XML is going to persist in the system for anylength of time. To avoid this you could achieve the same using a templateparameter value that is generated and passed into the template at runtime.Assuming your parameters were called 'PDFSec' and 'PDFPWD' you would enter thefollowing in the properties dialog: Name : xdo-pdf-security – this property sets whetherthe security feature is enabled or not Type :Text Value :{$PDFSec} 百度搜索“77cn”或“免费范文网”即可找到本站免费阅读全部范文。收藏本站方便下次阅读,免费范文网,提供经典小说综合文库BI Publisher(rtf)模板开发语法大全(6)在线全文阅读。
相关推荐: