Xsl-fo region xsl

does anyone know how to place a paragraph of text
aligned to the very end/bottom of the region-body
I don't want to use region-after because I need it for something else
I tried using space, but I don't always know how much text there will be,
so I was wondering if xsl-fo/xsl have some easy way to align the text at the very end of the region body
region-body
NEED TO PUT TEXT RIGHT HERE ALIGNED TO THE
BOTTOM OF THE REGION-BODY
region after
any ideas appreciated =)

I've found two workaround for getting Apache FOP 1.0 to work with Oracle Apex 4.0 for PDF printing of interactive reports:
1, Use an application process to set your custom layout for interactive reports:
[ ] grant all on APEX_040000.WWV_RENDER_REPORT3 to {YOUR_SCHEMA_NAME};
[ ] Create an Application Process e.g. "Custom Report Layout" with constraint for request 'PDF' and Process Text:
declare
v_xsl varchar2(32767);
begin
v_xsl := '<?xml version = ''1.0'' encoding = ''utf-8''?>
<xsl:stylesheet version="2.0"
  <fo:region-body region-name="region-body" margin-top="54.0pt" margin-bottom="54.0pt"/>
  <fo:region-before region-name="region-header" extent="54.0pt"/>
</xsl:stylesheet>';
APEX_040000.WWV_RENDER_REPORT3.g_prn_template := v_xsl;
end;2, If you have some knowlege in Java change the sequnce of the the nodes in the apex_fop.jsp (or servlet), ie. changing the xsl before you use it for transformation.
The code depends on the solution you are using to parse the xsl string.
Hope this may help someone,
Willi

Similar Messages

  • Format-number doesn't work with XSL and DW preview

    Hi All
    I'm creating XSL files to transform XML into HTML. However,
    the number formatting doesn;t seem to work in Dreamweaver. For
    example, if I specifiy:
    format-number(price,'$###,###.00'), I should get $7596.99. I
    actually get 7596.990000000001 in my Preview (no currency symbol,
    too many decimal places). If I do the same thing in another XSL
    editor (Xseleerator) I get: $7,596.99.
    This is REAL PAIN, as every time I do anything with number
    formatting, I need to open the XML and XSL in another product just
    to check the formattng.
    Can anyone shed any light on this?
    Thnaks
    Mark

    Try to declare the variable out side of the region
    <script> var tp1;</script>
    <div spry region ... >
    tab panel stuff
    <script type="text/javascript">
    tp1 = new Spry.Widget.TabbedPanels("tp1");
    </script>
    </div>

  • Displaying a message when there are no results from an XSL Query

    Using MM_XSLTransform.class.php
    I am querying an XML file to produce a list of places whose town name or address match a letter of the alphabet. The letter is passed as a variable in a URL.
    XSL:
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <xsl:param name="letter"/>
    <xsl:output method="html" encoding="UTF-8"/>
    <xsl:template match="/">
    <xsl:for-each select="dataroot/CPINFOWEB[Town=starts-with(Town, $letter) or Name=starts-with(Name, $letter)]">
          <table width="100%" border="0" cellspacing="0" cellpadding="0">
            <tr>
            <td>
        <a href="detail.php?park={CostCode}"><xsl:value-of select="Name"/></a><br />
              <a href="detail.php?park={CostCode}"><xsl:value-of select="Town"/></a><br />
          <xsl:value-of select="Address"/><br />
          <br />    
          </td>
            </tr>
          </table>
          </xsl:for-each>
    </xsl:template>
    </xsl:stylesheet>
    Destination PHP file:
    setXML("../regions/CPINFOWEB-mobile.xml"); $mm_xsl->setXSL("list.xsl"); $mm_xsl->addParameter("letter",$_GET['letter']); echo $mm_xsl->Transform(); ?> 
    The result Name and Town are displayed as a URL to link to a "more details" page.
    All works fine, but when there are no results for a letter of the alphabet I obviously get a blank page.
    How do I display a "no results" message instead

    I deleted my original reply because the formatting of the XSL code was messed up by the forum. Here's trying again:
    Your current code creates a new table for each result. The opening and closing <table> tags should be outside the the <for-each> loop. To deal with the possibility of no results being found, use a conditional statement and the count() function like this:
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <xsl:param name="letter"/>
    <xsl:output method="html" encoding="UTF-8"/>
    <xsl:template match="/">
    <table width="100%" border="0" cellspacing="0" cellpadding="0">
    <xsl:for-each select="dataroot/CPINFOWEB[Town=starts-with(Town, $letter) or Name=starts-with(Name, $letter)]">
            <tr>
            <td>
        <a href="detail.php?park={CostCode}"><xsl:value-of select="Name"/></a><br />
              <a href="detail.php?park={CostCode}"><xsl:value-of select="Town"/></a><br />
          <xsl:value-of select="Address"/><br />
          <br />    
          </td>
            </tr>
    </xsl:for-each>
    <xsl:if test="count(dataroot/CPINFOWEB/Town) &amp;lt; 1">
        <tr>
        <td>No records found</td>
        </tr>
        </xsl:if>
    </table>
    </xsl:template>
    </xsl:stylesheet>

  • XSL-FO and watermark on PDF file generated.

    I am using XSLT / XSL-FO to convert my XML to PDF file for the users to take a printout. Under certain conditions I need to have a watermark COPY on the printed paper . Can XSL-FO/XSLT do this for me under certain conditions? Or has this something to do with the paper in printer having the COPY watermark.
    Thanks

    See http://xml.apache.org/fop/output.html#pdf-watermark
    I know one more solution with table occupying entire page, with minus padded repeated header:...
    <fo:flow  flow-name="xsl-region-body">
        <fo:table>
            <fo:table-column column-width="170mm"/>
            <fo:table-header>
                <fo:table-row>
                    <fo:table-cell padding-bottom="-257mm">
                        <fo:block>place background here</fo:block>
                    </fo:table-cell>
                </fo:table-row>
            </fo:table-header>
            <fo:table-body>
                <fo:table-row>
                    <fo:table-cell><fo:block>place document content here</fo:block></fo:table-cell>
                </fo:table-row>
            </fo:table-body>
        </fo:table>
    </fo:flow>Customize padding of the header cell to place your watermark where you want on the page.

  • Reports using xsl:fo - include external pdf

    Not strictly an Apex question, but posted here as the application is in Apex.
    I have a report layout defined in xsl:fo in my application. As part of this report, I also need to pick up an external pdf file (scanned document) and print with the report. I have added the external document to my fo definition as follows:
    <fo:page-sequence master-reference="portraitblank">
    <fo:flow flow-name="region-body">
         <fo:block>
              <fox:external-document content-type="pdf" src="url('http://myhostaddress:8088/filepath/docname.pdf')" />
         </fo:block>
    </fo:flow>
    </fo:page-sequence>
    (Obviously the url of the file is not as shown above, this is just for example purposes)
    If I do not have the above, my report generates 100%. When I include the external pdf, however, the report fails with a "File does not begin with '%PDF-'" error. I have opened the external pdf with Notepad, and it does start with '%PDF-'
    Any suggestions?

    After much browbeating and head scratching, I now know where the problem is - but not yet how to fix it. The apex_fop supplied with apex does not contain the java packages which enable the use of xsl:fox extensions. Either a new fop distribution, with servlet, must be created, or the apex_fop distribution must be updated to include the necessary java packages.
    Edited by: Andre Olivier on May 9, 2013 4:02 AM

  • Using multiple XSL files parsing a XML file

    Hi,
    Can a single XML be procesed by a XSL file in which are included many XSL stylesheet?
    I mean, my Java servlet writes the results of the SQL
    queries in a single XML document. Something like this:
    <?xml version="1.0" encoding="UTF-8" ?>
    <body>
    <!-- Part 1 -->
    <record>
    <nombre>Monica</nombre>
    <apellido1>Amann</apellido1>
    <apellido2>Ostos</apellido2>
    </record>
    <!-- Part 2 -->
    <record>
    <domicilio>Rodriguez Arias</domicilio>
    <numero>41</numero>
    <piso>5</piso>
    </record>
    <!-- Part 3 -->
    <record>
    <nombre>Ana</nombre>
    <apellido1>Garcia</apellido1>
    <apellido2>Ostos</apellido2>
    <domicilio>Rodriguez Arias</domicilio>
    <numero>41</numero>
    <piso>5</piso>
    <mano>Decha</mano>
    </record>
    </body>
    I want to be able to apply a particular stylesheet into diferent part of the XML file.
    I mean, i have a XSL (father), in which are included various XSL. My problem is that
    i can apply the bloque1.xsl to process part1 in the xml, and bloque2.xsl to process
    part2 in the xml and the same with the thrid.
    This is my XSL (father), but i don't know whats the way to do it. And i don�t konw if
    it's possible to do it.
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <xsl:stylesheet
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    xmlns:fo="http://www.w3.org/1999/XSL/Format"
    version="1.0">
    <xsl:include href="/aplic/fop/ejemplos/bloque1.xsl" />
    <xsl:include href="/aplic/fop/ejemplos/bloque2.xsl" />
    <xsl:include href="/aplic/fop/ejemplos/bloque3.xsl" />
    <xsl:template match="body">
         <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
              <fo:layout-master-set>
              <fo:simple-page-master master-name="simple"
                   page-height="21cm"
                   page-width="21cm"
                   margin-top="1cm"
                   margin-bottom="1cm"
                   margin-left="1.5cm"
                   margin-right="1.5cm">
                   <fo:region-body margin-top="1.5cm"
                   margin-bottom="1.5cm"/>
              </fo:simple-page-master>
              </fo:layout-master-set>
              <fo:page-sequence master-reference="simple">
              <fo:flow flow-name="xsl-region-body">
              <fo:block text-align="right">
                        <fo:external-graphic src="c:\aplic\fop\ejemplos\barcode.jpeg" width="8.1cm" height="3.7cm"/>
              </fo:block>
                   <xsl:apply-templates/>
              </fo:flow>
              </fo:page-sequence>
         </fo:root>
    </xsl:template>
    <!-- Here i should code the rest of the XSL to join the diferents parts of the XML with its corresponded XSL -->
    </xsl:stylesheet>
    Finally i have to produce a single resultant report into pdf outformat. For this, i am using XSL-FO.
    Thanks a lot, and i'm sorry for my english language.

    The examples of Xalan (check xml.apache.org) do just that.
    Micks

  • XSL-FO cannot be opened

    Hello:
    I created a simple XSL-FO file and saved it as test.xml. Below is the simple code and it generates a PDF report for me when I submit it from outside APEX to
    a XSL-FO formatter using Apache-Cocoon.
    When I try to create this layout in APEX in the report layout, I can save it but it does not open when I try to download it. It gives me a message like:
    "Switch from current encoding to specified encoding not supported. Error processing resource 'file:///C:/Documents and Setti...
    <?xml version = '1.0' encoding = 'utf-8'?>"
    ----------------------------------------------------XSL-FO code ---------------------------------------------------------------------------------
    <?xml version = '1.0' encoding = 'utf-8'?>
    <xsl:stylesheet version="2.0"
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    xmlns:fo="http://www.w3.org/1999/XSL/Format"
    xmlns:ora="http://www.oracle.com/XSL/Transform/java/"
    xmlns:xdofo="http://xmlns.oracle.com/oxp/fo/extensions"
    xmlns:xdoxslt="http://www.oracle.com/XSL/Transform/java/oracle.apps.xdo.template.rtf.XSLTFunctions"
    xmlns:xdoxliff="urn:oasis:names:tc:xliff:document:1.1" xmlns:xlink="http://www.w3.org/1999/xlink">
    <xsl:template match="/">
    <fo:root>
    <fo:layout-master-set>
    <fo:simple-page-master master-name="master0" margin-left="66.6pt" margin-right="66.6pt"
    page-height="#PAGE_HEIGHT#pt" page-width="#PAGE_WIDTH#pt" margin-top="36.0pt"
    margin-bottom="36.0pt">
    <fo:region-body region-name="region-body"
    margin-top="0.5in"
    margin-bottom="1in"
    margin-left="0.5in"
    margin-right="0.5in" />
    </fo:simple-page-master>
    </fo:layout-master-set>
    <fo:page-sequence master-reference="master0">
    <fo:flow flow-name="region-body">
    <fo:block>
    <xsl:apply-templates select="//DEPARTMENT"/>
    </fo:block>
    </fo:flow>
    </fo:page-sequence>
    </fo:root>
    </xsl:template>
    </xsl:stylesheet>
    Any help would be appreciated ...
    Yesh

    Hello:
    I ran my XSL-FO using Marc Sewitz blog below. I can get a PDF output correctly so I know that my print server is working. My report looks and works correctly.
    http://marcsewtz.blogspot.com/2008/06/heres-another-posting-on-pdf-printing.html
    When I take the same XSL-FO layout and save it in APEX and try and run my report .. I get the PDf error.
    Is there something different in APEX when we define custom XSL-FO layouts ? Do we have to follow some special
    logic ? (I notice that the generic XSL-FO layouts has a lot of stuff that maybe Oracle APEX specific ???? )
    I am using APEX 3.1.1.
    Any help is appreciated -- - Yesh

  • Tables in PDF usinx xsl-fo

    Hi
    I have a pdf file defined with 2 page sequences.
    First page with total width of 8.5in. In that i have defined xsl-body with left margin 2.375in. If i display a some data in that region, it displays correctly. If i display a table, then it takes total width (discards the left margin), so some columns are not getting displayed.
    Coming to second page i dont have margin, table should take full width i.e 8.5in. So it displays correctly.
    To display the tables in all the pages, i have used the same logic. If i change for first page, it will effect secong page. So i cant chage the logic
    How can i display the table correctly in first page also, Can anyone suggest?
    Thanks
    Sireesha

    Hello,
    Take a look at this blog post -
    http://www.jroller.com/yokeping/entry/drawing_checkboxes_using_xsl_fo#comments
    Hope this helps,
    John.
    Blog: http://jes.blogs.shellprompt.net
    Work: http://www.apex-evangelists.com
    Author of Pro Application Express: http://tinyurl.com/3gu7cd

  • RFQ and PO XSL-FO reports

    Hello All,
    We are currently implementing R12 (Sourcing, Purchasing etc) for one of the customer in APAC region, and we have to modify standard
    RFQ and PO XSL-FO reports. We are able to modify XSL files.
    But if we have to add new fields, we need to modify base XML file.
    1. In case of PO, we can modify inline views. But after modifying view, how to generate new XML file which in turn will show the new fields?
    2. In case of RFQ, we didn't find any in-line view.
    We need to understand the mechanism how it works and how to change base XML file for new fields?
    Please send-in your inputs/pointers.
    Regards
    Rohit

    For R12
    =====
    1. In case of PO, you can modify inline views.
    After this modification, PO xml file will contain newly added fields.
    Create your custom XSLFO template for PO and attached it to PO document.
    2. In case of RFQ, you need to modify 'PON_PRINTING_PKG' package to add new fields.
    After this modification, RFQ xml file will contain newly added fields.
    Create your custom XSLFO template for RFQ and attached it to RFQ document.
    Before doing this changes keep in mind that both solutions are not advisable because you are going to update standard views and packages.
    ~ MS
    Edited by: MS on Feb 8, 2011 9:11 PM

  • What is the LOB_TYPE for XSL-FO Subtemplate?

    I ran an installation script to move a new data definition and several templates (one of which is an XSL-FO subtemplate) into our test region and the concurrent program is finishing with a warning and no report is generated. The error in the OPP is "no corresponding LOB data" which from reading posts, appears to be related to the sub-template. This is the code I used to upload an .rtf template (which worked fine).
    java oracle.apps.xdo.oa.util.XDOLoader UPLOAD \
    -DB_USERNAME apps \
    -DB_PASSWORD $P_APPS_PWD \
    -JDBC_CONNECTION $JDBC \
    -LOB_TYPE TEMPLATE_SOURCE \
    -APPS_SHORT_NAME XXFIN \
    -LOB_CODE XXFIN_PSBE6_1_TEMPLATE_PDF \
    -LANGUAGE en \
    -TERRITORY CA \
    -XDO_FILE_TYPE RTF \
    -NLS_LANG American_America.WE8ISO8859P1 \
    -FILE_CONTENT_TYPE 'application/rtf' \
    -FILE_NAME $XXFIN_TOP/admin/import/TEMPLATE_SOURCE_XXFIN_XXFIN_PSBE6_1_TEMPLATE_PDF_en_CA.rtf \
    -CUSTOM_MODE FORCE \
    -LOG_FILE XXFIN_PSB_EXP_ANN_SUM_UP_TMP.log
    This is the code I used to upload the XSL file, but no file was uploaded.
    java oracle.apps.xdo.oa.util.XDOLoader UPLOAD \
    -DB_USERNAME apps \
    -DB_PASSWORD $P_APPS_PWD \
    -JDBC_CONNECTION $JDBC \
    -LOB_TYPE TEMPLATE_SOURCE \
    -APPS_SHORT_NAME XXFIN \
    -LOB_CODE XXFIN_PSB_NUMBER_FORMAT \
    -LANGUAGE en \
    -TERRITORY CA \
    -XDO_FILE_TYPE XSL-FO \
    -NLS_LANG American_America.WE8ISO8859P1 \
    -FILE_CONTENT_TYPE 'application/xsl' \
    -FILE_NAME $XXFIN_TOP/admin/import/TEMPLATE_XXFIN_XXFIN_PSB_NUMBER_FORMAT_en_CA.xsl \
    -CUSTOM_MODE FORCE \
    -LOG_FILE XXFIN_PSB_EXP_ANN_SUM_UP_TMP.log
    Is there something wrong with the LOB_TYPE, and if so, what is the LOB_TYPE for a .xsl file?
    Thanks for your help.
    Tam

    -LOB_TYPE TEMPLATE \
    ...and...
    -FILE_CONTENT_TYPE 'text/xml' \

  • How to Replicate Standard Alternating Colors using XSL-FO??

    Hi All
    I am using Apex_3.1, Apache fop and Standard Report Printing to produce PDF reports. We would like to replicate the theme 12 (Blue) standard alternating colors in our PDF output.
    I do realise that this involves modifying the xsl-fo and have tried putting color attributes in the xsl-fo (Generic Columns). I know I can just put the color in the apex print settings but that doesn't give me the alternating colors.
    Edited by: Keith Jamieson on Oct 22, 2009 4:04 PM

    I believe this is the section of the xsl template that needs modified.
                       <fo:table-body>
                            <xsl:for-each select=".//ROW">
                               <fo:table-row >
                                      #PRN_TEMPLATE_BODY_ROW#
                               </fo:table-row>
                            </xsl:for-each>
                         </fo:table-body>and I have found this example which appears to do what I require.
    <xsl:template name="table.row.properties">
      <xsl:variable name="tabstyle">
        <xsl:call-template name="tabstyle"/>
      </xsl:variable>
      <xsl:variable name="bgcolor">
        <xsl:call-template name="dbfo-attribute">
          <xsl:with-param name="pis" select="processing-instruction('dbfo')"/>
          <xsl:with-param name="attribute" select="'bgcolor'"/>
        </xsl:call-template>
      </xsl:variable>
      <xsl:variable name="rownum">
        <xsl:number from="tgroup" count="row"/>
      </xsl:variable>
      <xsl:choose>
        <xsl:when test="$bgcolor != ''">
          <xsl:attribute name="background-color">
            <xsl:value-of select="$bgcolor"/>
          </xsl:attribute>
        </xsl:when>
        <xsl:when test="$tabstyle = 'striped'">
          <xsl:if test="$rownum mod 2 = 0"
            <xsl:attribute name="background-color">#EEEEEE</xsl:attribute>
          </xsl:if>
        </xsl:when>
      </xsl:choose>
    </xsl:template>Every time I try and add that section to the code, I end up breaking it and not getting any pdf output :(
    eg my latest attempt
    <?xml version = '1.0' encoding = 'utf-8'?>
    <xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:xlink="http://www.w3.org/1999/xlink">
          <xsl:variable name="_XDOFOPOS" select="''"/>
          <xsl:variable name="_XDOFOPOS2" select="number(1)"/>
          <xsl:variable name="_XDOFOTOTAL" select="number(1)"/>
        <xsl:variable name="_XDOFOOSTOTAL" select="number(0)"/>
         <xs1:variable name="rownum" />
      <xsl:choose>
        <xsl:when test="$bgcolor != ''">
          <xsl:attribute name="background-color">
            <xsl:value-of select="$bgcolor"/>
          </xsl:attribute>
        </xsl:when>
        <xsl:when test="$tabstyle = 'striped'">
          <xsl:if test="$rownum mod 2 = 0">
            <xsl:attribute name="background-color">#EEEEEE</xsl:attribute>
          </xsl:if>
        </xsl:when>
      </xsl:choose>
       <xsl:attribute-set name="padding">
          <xsl:attribute name="padding-bottom">0.25pt</xsl:attribute>
          <xsl:attribute name="padding-top">0.25pt</xsl:attribute>
       </xsl:attribute-set>
       <xsl:attribute-set name="text">
          <xsl:attribute name="text-align">start</xsl:attribute>
          <xsl:attribute name="orphans">2</xsl:attribute>
          <xsl:attribute name="start-indent">0.0pt</xsl:attribute>
          <xsl:attribute name="linefeed-treatment">preserve</xsl:attribute>
          <xsl:attribute name="padding-top">0.0pt</xsl:attribute>
          <xsl:attribute name="end-indent">0.0pt</xsl:attribute>
          <xsl:attribute name="padding-bottom">0.0pt</xsl:attribute>
          <xsl:attribute name="height">0.0pt</xsl:attribute>
          <xsl:attribute name="widows">2</xsl:attribute>
       </xsl:attribute-set>
       <xsl:attribute-set name="align-left">
          <xsl:attribute name="text-align">left</xsl:attribute>
       </xsl:attribute-set>
       <xsl:attribute-set name="align-center">
          <xsl:attribute name="text-align">center</xsl:attribute>
       </xsl:attribute-set>
       <xsl:attribute-set name="align-right">
          <xsl:attribute name="text-align">right</xsl:attribute>
       </xsl:attribute-set>
       <xsl:attribute-set name="footer">
          <xsl:attribute name="text-align">right</xsl:attribute>
          <xsl:attribute name="start-indent">5.4pt</xsl:attribute>
          <xsl:attribute name="end-indent">5.4pt</xsl:attribute>
       </xsl:attribute-set>
       <xsl:attribute-set name="text_2">
          <xsl:attribute name="start-indent">5.4pt</xsl:attribute>
          <xsl:attribute name="end-indent">23.4pt</xsl:attribute>
       </xsl:attribute-set>
       <xsl:attribute-set name="text_20">
          <xsl:attribute name="height">13.872pt</xsl:attribute>
          <xsl:attribute name="end-indent">5.4pt</xsl:attribute>
       </xsl:attribute-set>
       <xsl:attribute-set name="text_0">
          <xsl:attribute name="end-indent">5.4pt</xsl:attribute>
       </xsl:attribute-set>
       <xsl:attribute-set name="page-header">
          <xsl:attribute name="color">#PAGE_HEADER_FONT_COLOR#</xsl:attribute>
          <xsl:attribute name="font-family">#PAGE_HEADER_FONT_FAMILY#</xsl:attribute>
          <xsl:attribute name="white-space-collapse">false</xsl:attribute>
          <xsl:attribute name="font-size">#PAGE_HEADER_FONT_SIZE#pt</xsl:attribute>
          <xsl:attribute name="font-weight">#PAGE_HEADER_FONT_WEIGHT#</xsl:attribute>
       </xsl:attribute-set>
       <xsl:attribute-set name="page-footer">
          <xsl:attribute name="color">#PAGE_FOOTER_FONT_COLOR#</xsl:attribute>
          <xsl:attribute name="font-family">#PAGE_FOOTER_FONT_FAMILY#</xsl:attribute>
          <xsl:attribute name="white-space-collapse">false</xsl:attribute>
          <xsl:attribute name="font-size">#PAGE_FOOTER_FONT_SIZE#pt</xsl:attribute>
          <xsl:attribute name="font-weight">#PAGE_FOOTER_FONT_WEIGHT#</xsl:attribute>
       </xsl:attribute-set>
       <xsl:attribute-set name="body-font">
          <xsl:attribute name="height">12.0pt</xsl:attribute>
          <xsl:attribute name="font-family">#BODY_FONT_FAMILY#</xsl:attribute>
          <xsl:attribute name="white-space-collapse">false</xsl:attribute>
          <xsl:attribute name="font-size">#BODY_FONT_SIZE#pt</xsl:attribute>
          <xsl:attribute name="font-weight">#BODY_FONT_WEIGHT#</xsl:attribute>
       </xsl:attribute-set>
       <xsl:attribute-set name="page-number">
          <xsl:attribute name="height">13.872pt</xsl:attribute>
       </xsl:attribute-set>
       <xsl:attribute-set name="header-font">
          <xsl:attribute name="height">#HEADER_FONT_SIZE#pt</xsl:attribute>
          <xsl:attribute name="font-family">#HEADER_FONT_FAMILY#</xsl:attribute>
          <xsl:attribute name="white-space-collapse">false</xsl:attribute>
          <xsl:attribute name="font-size">#HEADER_FONT_SIZE#pt</xsl:attribute>
          <xsl:attribute name="font-weight">#HEADER_FONT_WEIGHT#</xsl:attribute>
       </xsl:attribute-set>
       <xsl:attribute-set name="border">
          <xsl:attribute name="border-top">#BORDER_WIDTH#pt solid #BORDER_COLOR#</xsl:attribute>
          <xsl:attribute name="border-bottom">#BORDER_WIDTH#pt solid #BORDER_COLOR#</xsl:attribute>
          <xsl:attribute name="border-start-width">#BORDER_WIDTH#pt</xsl:attribute>
          <xsl:attribute name="border-start-color">#BORDER_COLOR#</xsl:attribute>
          <xsl:attribute name="border-start-style">solid</xsl:attribute>
          <xsl:attribute name="border-end-width">#BORDER_WIDTH#pt</xsl:attribute>
          <xsl:attribute name="border-end-color">#BORDER_COLOR#</xsl:attribute>
          <xsl:attribute name="border-end-style">solid</xsl:attribute>
       </xsl:attribute-set>
       <xsl:attribute-set name="cell">
          <xsl:attribute name="background-color">#BODY_BG_COLOR#</xsl:attribute>
          <xsl:attribute name="color">#BODY_FONT_COLOR#</xsl:attribute>
          <xsl:attribute name="padding-start">5.15pt</xsl:attribute>
          <xsl:attribute name="vertical-align">top</xsl:attribute>
          <xsl:attribute name="padding-top">0.0pt</xsl:attribute>
          <xsl:attribute name="padding-end">5.15pt</xsl:attribute>
          <xsl:attribute name="number-columns-spanned">1</xsl:attribute>
          <xsl:attribute name="height">0.0pt</xsl:attribute>
          <xsl:attribute name="padding-bottom">0.0pt</xsl:attribute>
       </xsl:attribute-set>
       <xsl:attribute-set name="header-color">
          <xsl:attribute name="background-color">#HEADER_BG_COLOR#</xsl:attribute>
          <xsl:attribute name="color">#HEADER_FONT_COLOR#</xsl:attribute>
       </xsl:attribute-set>
       <xsl:template match="/">
          <fo:root>
             <fo:layout-master-set>
                <fo:simple-page-master master-name="master0" margin-left="66.6pt" margin-right="66.6pt" page-height="#PAGE_HEIGHT#pt" page-width="#PAGE_WIDTH#pt" margin-top="36.0pt" margin-bottom="36.0pt">
                   <fo:region-before region-name="region-header" extent="54.0pt"/>
                   <fo:region-body region-name="region-body" margin-top="54.0pt" margin-bottom="54.0pt"/>
                   <fo:region-after region-name="region-footer" extent="54.0pt" display-align="after"/>
                </fo:simple-page-master>
             </fo:layout-master-set>
             <fo:page-sequence master-reference="master0">
                <xsl:variable name="_PW" select="number(#PAGE_HEIGHT#)"/>
                <xsl:variable name="_PH" select="number(#PAGE_WIDTH#)"/>
                <xsl:variable name="_ML" select="number(72.0)"/>
                <xsl:variable name="_MR" select="number(72.0)"/>
                <xsl:variable name="_MT" select="number(90.0)"/>
                <xsl:variable name="_MB" select="number(90.0)"/>
                <xsl:variable name="_HY" select="number(36.0)"/>
                <xsl:variable name="_FY" select="number(36.0)"/>
                <xsl:variable name="_SECTION_NAME" select="string('master0')"/>
                <fo:static-content flow-name="region-header">
                   <fo:block xsl:use-attribute-sets="text text_2 text_0 #PAGE_HEADER_ALIGNMENT#">
                      <fo:inline xsl:use-attribute-sets="page-header">#PAGE_HEADER#</fo:inline>
                   </fo:block>
                </fo:static-content>
                <fo:static-content flow-name="region-footer">
                   <fo:block xsl:use-attribute-sets="text footer">
                      <fo:inline xsl:use-attribute-sets="body-font page-number">
                         <fo:page-number/>
                      </fo:inline>
                   </fo:block>
                   <fo:block xsl:use-attribute-sets="text text_2 #PAGE_FOOTER_ALIGNMENT#">
                      <fo:inline xsl:use-attribute-sets="page-footer">#PAGE_FOOTER#</fo:inline>
                   </fo:block>
                </fo:static-content>
                <fo:flow flow-name="region-body">
                   <fo:block xsl:use-attribute-sets="padding">
                      <fo:table start-indent="0.0pt">
                         <xsl:variable name="_XDOFOPOS2" select="number(1)"/>
                         <xsl:variable name="_XDOFOTOTAL" select="number(1)"/>
                         #PRN_TABLE_CELLS#
                         <fo:table-header>
                            <fo:table-row>
                               #PRN_TEMPLATE_HEADER_ROW#
                            </fo:table-row>
                         </fo:table-header>
                         <fo:table-body>
                            <xsl:for-each select=".//ROW">
                               <xs1:choose>
                                  <xs1:when> test = ".//ROW mod 2 = 0"
                               <fo:table-row bgcolor=#EEEEEE>
                                      #PRN_TEMPLATE_BODY_ROW#
                               </fo:table-row>
                                  </xs1:when>
                                  <xs1:when> test = ".//ROW mod 1 = 0"
                               <fo:table-row bgcolor=#DDDDDD>
                                      #PRN_TEMPLATE_BODY_ROW#
                               </fo:table-row>
                                   </xs1>                          
                            </xsl:for-each>
                         </fo:table-body>
                      </fo:table>
                   </fo:block>
                   <fo:block xsl:use-attribute-sets="text text_2 text_20">
                      <fo:inline id="{concat('page-total-', $_SECTION_NAME, $_XDOFOPOS)}"/>
                      <fo:inline id="{concat('page-total', $_XDOFOPOS)}"/>
                   </fo:block>
                </fo:flow>
             </fo:page-sequence>
          </fo:root>
       </xsl:template>
    </xsl:stylesheet>

  • XSL-1015: (Error) Function 'current-group' not found

    Hi
    I am using BI publisher 10.1.3.4.1 and Back Office 13.0.1 . I have created a report in BI publisher but unable to render it in my Back Office application. My report code is
    <?for-each-group:G_STORE_DATA;./REGION?>
    <?REGION?>
      <?for-each-group:current-group();./UNIT?>
       <?UNIT?>
        <?for-each-group:current-group();./STORE?>
        <?STORE?>
         <?for-each-group:current-group();./TILLID?>
           <?TILLID?>
           <?COLLECTIONOFFICER?>
           <?RECONCILED?>
           <?sum (current-group()/AMOUNT)?>
         <?end for-each?>
         <?UNIT?>
         <?sum (current-group()/AMOUNT)?>
    <?end for-each-group?>{corp}
    Please help in resolving this issue.... any guidance or suggestion is appreciated...                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

    I see if your system xsl parser was 1.0 then current-group would not be recognized.
    I am surprised why the parser did not work. Did you not try out with the Template Builder for Word first?
    I would strongly recommend to use the template builder first because it provide several tools (validate...)
    that make your life easier.
    May I also ask what product you used BI Publisher with? I am concerned that this product has an incomplete
    BI Publisher embedded. There are several libraries needed for BI Publisher to work and you may run into
    more issues if you don't have all the libraries.
    Klaus

  • Rendering Static Images in Report Layouts xsl:fo template

    Hello,
    This is my first posting to the group.
    I have been looking for a simple way to implement static images into the XSL:fo template file in order to export them to .pdf.
    Having searched through the forums and through various Apex blogs, they all seem to refer to the BI Template builder, which doesn't really help me as my company will not allow this sort of plugin to be installed.
    I tried another tactic: looking at XSL:FO howtos on using external images, which suggests using the following syntax:
    <fo:block>
    <fo:external-graphic src="url('insert_image_namehere')"/>
    </fo:block>
    However, when I try to use the #WORKSPACE_IMAGES# substitution to refer to local images, it fails to render - I suspect that #WORKSPACE_IMAGES# is not a valid substitution on the report layout editor page (its not listed in one of the 'approved substitutions' list)
    Other than trying to use this BI Template Builder (out of the question), can anyone suggest a means of resolving this issue?

    update:
    I tried deriving the full path for the image file by viewing the source when I embedded it in an HTML region on the same page and it gives me something similar to the following URL:
    wwv_flow_file_mgr.get_file?p_security_group_id=502133210878128108&p_fname=myImage.gif
    (p.s. it is a .gif file - not sure if this should make any material difference)
    As a result, I tried embedding this into the code:
    <fo:block>
    <fo:external-graphic src="wwv_flow_file_mgr.get_file?p_security_group_id=502133210878128108&p_fname=myImage.gif)"/>
    </fo:block>
    but this time, instead of merely not rendering, when Acrobat opens, an error message appeared reported that the file was corrupted or invalid. When trying different formats, I seem to get a generic: "500 Internal Server Error".
    I'm going to try putting the image file in the server directory tree to see if that will work. I'll post later either way.

  • Add image to XSL

    Hello All,
    Is there anyway I can insert an image stored on disk using this xsl to produce my PDF? Here is the code I am using:
    <?xml version="1.0" encoding="UTF-8"?>
    <xsl:stylesheet version="1.1"
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    xmlns:fo="http://www.w3.org/1999/XSL/Format">
    <xsl:output method="xml" version="1.0"
    omit-xml-declaration="no" indent="yes"/>
    <!-- ========================= -->
    <!-- root element: catalog -->
    <!-- ========================= -->
    <xsl:template match="/catalog">
    <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
    <fo:layout-master-set>
    <fo:simple-page-master master-name="simpleA4" page-height="29.7cm"
              page-width="21cm" margin-top="2cm" margin-bottom="2cm"
    margin-left="2cm" margin-right="2cm">
    <fo:region-body/>
    </fo:simple-page-master>
    </fo:layout-master-set>
    <fo:page-sequence master-reference="simpleA4">
    <fo:flow flow-name="xsl-region-body">
    <fo:block font-size="16pt" font-weight="bold" font-style="italic" color="red" font-family="courier" space-after="5mm">
    Catalog: <xsl:value-of select="@title"/>
    </fo:block>
    <fo:block font-size="16pt" font-weight="bold" space-after="5mm">
    Publisher: <xsl:value-of select="@publisher"/>
    </fo:block>
    <fo:block font-size="10pt">
    <fo:table table-layout="fixed">
    <fo:table-column column-width="4cm"/>
    <fo:table-column column-width="4cm"/>
    <fo:table-column column-width="5cm"/>
    <fo:table-header>
    <fo:table-row font-weight="bold"><fo:table-cell>
    <fo:block>
    <xsl:text>Date</xsl:text>
    </fo:block>
    </fo:table-cell>
    <fo:table-cell>
    <fo:block>
    <xsl:text>Title</xsl:text>
    </fo:block>
    </fo:table-cell>
    <fo:table-cell>
    <fo:block>
    <xsl:text>Author</xsl:text>
    </fo:block>
    </fo:table-cell>
    </fo:table-row>
    </fo:table-header>
    <fo:table-body>
    <xsl:apply-templates select="magazine"/>
    </fo:table-body>
    </fo:table>
    </fo:block>
    </fo:flow>
    </fo:page-sequence>
    </fo:root>
    </xsl:template>
    <xsl:template match="magazine">
    <xsl:for-each select="article">
    <fo:table-row>
    <fo:table-cell>
    <fo:block>
    <xsl:value-of select="../@date"/>
    </fo:block>
    </fo:table-cell>
    <fo:table-cell>
    <fo:block>
    <xsl:value-of select="title"/>
    </fo:block>
    </fo:table-cell>
    <fo:table-cell>
    <fo:block>
    <xsl:value-of select="author"/>
    </fo:block>
    </fo:table-cell>
    </fo:table-row>
    </xsl:for-each>
    </xsl:template>
    </xsl:stylesheet>
    Thanks
    [tim]

    Graphics may be used with Apache FOP.
    http://xmlgraphics.apache.org/fop/0.94/graphics.html

  • Xsl:if creates unwanted newline [SOLVED]

    Hi there.
    I'm making a report, with some images. This works fine (it's just an image of a checkbox, base64 data..). However, when printing many lines, I only want to print the checkbox if it's actually text there.
    Short explanation:
    Q1 Q2
    Q3 Q4
    Q5
    I don't want the last line (which WOULD have been Q6) to print the image aswell. (That is; I only want it to print once for the Q5)
    Here's my code:
    <xsl:if test="Q_NR!='' "><fo:instream-foreign-object content-type="image/jpg"><xsl:value-of select=".//IMG"/></fo:instream-foreign-object></xsl:if>
    And this mess up my entire report with newline with the image.
    If I use only
    <fo:instream-foreign-object content-type="image/jpg"><xsl:value-of select=".//IMG"/></fo:instream-foreign-object>
    then the images print exactly as I want them.
    How can I get around this issue?
    P.S: The if quoting is like this:
    if test=(double quotes)Q_NR != (two single quotes) (double quote)

    if@inlines should do the trick.

Maybe you are looking for

  • Need best practice when accessing an ucm content after being transferred.

    Hi All, I have a business requirement where I need to auto-transfer the content to another UCM when this content expires in the source UCM. This content needs to be deleted after it spends a certain duration in the target UCM. Can anybody advise me t

  • White lines showing around some of my slices (in internet explorer)

    Hi, This is my first time posting, it's an awesome forum. I've put the site up at the url below. It renders fine on my mac in firefox and safari, but on pc in explorer, it is showing white lines around some of my slices. I don't know what is the best

  • Password protecting a web folder with .htaccess

    I'm trying to set up .htaccess for a folder on my website. I've created the .htpasswd file (on the volume root folder) and the .htacess file in the folder I'm trying to protect. I've turned on Allow All Overrides in Server Admin Web>Options. But so f

  • PCK loopback configuration in NW04s

    Hello, my company has a few PCK installations on Unix and Linux machines (NW04s). I am trying to create a loopback scenario. By loopback I mean that the PCK works without an integration server and it sends the messages to itself. I use file sender an

  • Constant send error

    I receive the error message 'Constant send error' when using Outlook. Messages do not appear in 'sent' or 'outbox' folders.