Do you need to generate HTML table rows from XML in InDesign?

General issue: you export XML and you get a bunch of content for xml elements that were a table in inDesign. But they don't have any rows, just cell after cell. What will make rows in your output?
Solution: XSLT; you need to use the @aid:tcols attribute of exported XML to determine the number of columns that your table should be. This is written in XSLT 1.1 so it shoud work with an export from InDesign. If you have problems with using it on export of XML, try using it on the XML afetr it has been exported, in Oxygen or other XSLT processor. Best to save acopy of your files before using the XSLT with them.  Copy all of the plain text and past into a new file, save with your own filename, ending with .xsl file extension. Then when exporting XML from InDesign CS3-5, browse to your new .xsl file and select it. PLEASE read about XSLT files at w3c.schools or other resource if you want to understand what is going on with this file.
BTW <!-- indicates comments in code -->
<?xml version="1.0" encoding="UTF-8"?>
<!-- NO WARRANTY that this example code will work as written for your XML file in InDesign. You can add more templates to the output to map your heading styles to h1, h2, etc. -->
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.1"
    xmlns:aid="http://ns.adobe.com/AdobeInDesign/4.0/"
    xmlns:aid5="http://ns.adobe.com/AdobeInDesign/5.0/" exclude-result-prefixes="xsl aid aid5">
    <xsl:output method="html" indent="yes" encoding="UTF-8"
        doctype-public="http://www.w3.org/TR/xhtml/DTD/xhtml-transitional.dtd"/>
<!-- parameter to use the name of element with attribute aid:theader as the th output -->
    <xsl:param name="tableElem">//*[local-name()][@aid:table='table']</xsl:param>
    <xsl:param name="colheadStyle">
        <xsl:value-of select="//*[local-name()][@aid:theader][1]"/>
        <!-- i.e. colHead-->
    </xsl:param>
<!-- parameter to use the name of element with attribute aid:cell but not aid:theader as the td  output -->
<!--i.e. tabletext or whatever the name of your Cell level  element is in InDesign -->
    <xsl:param name="cellStyle">
        <xsl:value-of select="//*[local-name()][@aid:table='cell' and not(@aid:theader)][1]"/>
    </xsl:param>
    <!-- handles a Story element marked up with HTML-type elements, but uses the <Table> element of IDD  -->
    <!-- if a true HTML table is in the content, it will be passed through -->
    <xsl:template match="Story"><!-- make a basic HTML file from a Story -->
        <html>
            <head>
                <title>Sample Table</title>
            </head>
            <body>
                <xsl:apply-templates><!-- will handle direct text of the  <Story>, and <Table> -->
                    <xsl:with-param name="colheadStyle" select="$colheadStyle"/>
                    <xsl:with-param name="cellStyle" select="$cellStyle"/>
                </xsl:apply-templates>  
            </body>
        </html>
    </xsl:template>
   <!-- use the styles to find the elements of IDD <Table> element -->
    <xsl:template match="Table">
        <xsl:param name="colheadStyle">
            <xsl:value-of select="$colheadStyle"/>
        </xsl:param>
        <xsl:param name="cellStyle">
            <xsl:value-of select="$cellStyle"/>
        </xsl:param>
        <xsl:variable name="cellsPerRow">
            <xsl:value-of select="@aid:tcols"/>
        </xsl:variable>
        <table><!-- start the table -->
            <!-- xhtml requires lower-case name for table element-->
            <tr>
                <xsl:apply-templates select="*[@aid:theader='']">
                    <xsl:with-param name="colheadStyle" select="$colheadStyle"/>
                    <xsl:with-param name="cellStyle" select="$cellStyle"/>
                </xsl:apply-templates>
            </tr>
            <!--  and @aid:style=$cellStyle -->
            <xsl:for-each
                select="*[@aid:table='cell'][not(@aid:theader='')][position() mod $cellsPerRow = 1]">
<!-- some code adapted with  permission, from http://www.computorcompanion.com/LPMArticle.asp?ID=202
Building HTML Tables with XSL by James Byrd; please include this acknowledgement in all files that use his code -->
<!-- this is the tricky bit of the code that James Byrd set up
p-class-tabletext-[position() mod $cellsPerRow = 1 continues looping until the position of the active element divided by $cellperRow (@aid:tcols value) tried with [@aid:style=$cellStyle] has a remainder of 1 -->
<!--  .|following-sibling::p-class-tabletext-[position() &lt;  $cellsPerRow] applies first to the currently selects cell with "." then continues with the following-siblings whose position is less than  the value of cells per row (@aid:tcols value) -->
                <tr>
                    <xsl:apply-templates
                        select=".|following-sibling::*[@aid:table='cell'][not(@aid:theader='')][position() &lt; $cellsPerRow]"
                    />
                </tr>
            </xsl:for-each>
        </table>
    </xsl:template>
    <xsl:template match="*">
        <xsl:param name="colheadStyle">
            <xsl:value-of select="$colheadStyle"/>
        </xsl:param>
        <xsl:param name="cellStyle">
            <xsl:value-of select="$cellStyle"/>
        </xsl:param>
        <xsl:variable name="cellsPerRow">
            <xsl:value-of select="parent::Table/@aid:tcols"/>
        </xsl:variable>
        <xsl:choose>
            <!-- colHead aid:table="cell" aid:theader=""-->
            <xsl:when test="parent::Table and @aid:theader">
                <th>
                    <xsl:apply-templates>
                        <xsl:with-param name="colheadStyle" select="$colheadStyle"/>
                        <xsl:with-param name="cellStyle" select="$cellStyle"/>
                    </xsl:apply-templates>
                </th>
                <xsl:if test="(position() = last()) and (position() &lt; $cellsPerRow)">
                    <xsl:call-template name="FillerCells">
                        <xsl:with-param name="cellCount" select="$cellsPerRow - position()"/>
                    </xsl:call-template>
                </xsl:if>
            </xsl:when>
            <xsl:when test="parent::Table and @aid:table='cell' and not(@aid:theader)">
                <td>
                    <xsl:apply-templates>
                        <xsl:with-param name="colheadStyle" select="$colheadStyle"/>
                        <xsl:with-param name="cellStyle" select="$cellStyle"/>
                    </xsl:apply-templates>
                </td>
                <xsl:if test="(position() = last()) and (position() &lt; $cellsPerRow)">
                    <xsl:call-template name="FillerCells">
                        <xsl:with-param name="cellCount" select="$cellsPerRow - position()"/>
                    </xsl:call-template>
                </xsl:if>
            </xsl:when>
<!-- for non-table elements this generic element handler will  pick up an aid:pstyle (if present) and create a class attribute from it. Works for any element that has the same name as HTML element such as <p> but it doesn't add wrapper elements like <ul> or <ol> for lists. -->
            <xsl:otherwise>
                <xsl:element name="{name()}">
                    <xsl:if test="@aid:pstyle">
                        <xsl:attribute name="class">
                            <xsl:value-of select="@aid:ptyle"/>
                        </xsl:attribute>
                    </xsl:if>
                    <xsl:apply-templates>
                        <xsl:with-param name="colheadStyle" select="$colheadStyle"/>
                        <xsl:with-param name="cellStyle" select="$cellStyle"/>
                    </xsl:apply-templates>
                </xsl:element>
            </xsl:otherwise>
        </xsl:choose>
    </xsl:template>
    <!-- take care of text that is a direct child of the <Story> by wrapping it in a <p> to make valid HTML -->
    <xsl:template match="text()">
        <xsl:variable name="myString">
            <xsl:value-of select="string-length(normalize-space(.))"/>
        </xsl:variable>
        <xsl:choose>
            <xsl:when test="parent::Story">
                <xsl:if test="$myString > 0">
                    <xsl:element name="p">
                        <xsl:attribute name="class">text</xsl:attribute>
                        <xsl:value-of select="normalize-space(.)"/>
                    </xsl:element>
                </xsl:if>
            </xsl:when>
            <xsl:otherwise>
                <xsl:value-of select="normalize-space(.)"/>
            </xsl:otherwise>
        </xsl:choose>
    </xsl:template>
   <!-- make br element conform to good HTML markup -->
    <xsl:template match="br">
        <br />
    </xsl:template>
    <!-- this recursive template calls itself until its test condition is satified -->
    <!-- it outputs a cell whose only content is a non-breaking space -->
    <!-- do not use   in place of Unicode &#160; for the non-breaking space -->
    <!-- the value of $cellCount is set in the main XSL template -->
    <xsl:template name="FillerCells">
        <xsl:param name="cellCount"/>
        <td>&#160;</td>
        <xsl:if test="$cellCount > 1">
            <xsl:call-template name="FillerCells">
                <xsl:with-param name="cellCount" select="$cellCount - 1"/>
            </xsl:call-template>
        </xsl:if>
    </xsl:template>
</xsl:stylesheet>
Message was edited by: HoneoyeFalls
Sample XML file exported from IDD
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Story><Table xmlns:aid="http://ns.adobe.com/AdobeInDesign/4.0/" xmlns:aid5="http://ns.adobe.com/AdobeInDesign/5.0/" aid:table="table" aid:trows="2" aid:tcols="2"><colHead aid:table="cell" aid:theader="" aid:crows="1" aid:ccols="1" aid:ccolwidth="44">1 colHead</colHead><colHead aid:table="cell" aid:theader="" aid:crows="1" aid:ccols="1" aid:ccolwidth="56">2 colHead</colHead><tabletext aid:table="cell" aid:crows="1" aid:ccols="1" aid:ccolwidth="44">1 tabletext</tabletext><tabletext aid:table="cell" aid:crows="1" aid:ccols="1" aid:ccolwidth="56">2 tabletext</tabletext><tabletext aid:table="cell" aid:crows="1" aid:ccols="1" aid:ccolwidth="44">row 2 1 tabletext</tabletext><tabletext aid:table="cell" aid:crows="1" aid:ccols="1" aid:ccolwidth="56">row 2 2 tabletext</tabletext></Table>
<table><tr><th>normal HTML table heading</th></tr>
<tr><td>normal HTML table<br/>cell text</td></tr></table></Story>

You can use RECORD type declaration:
SQL> declare
  2   type rec_type is record (
  3    ename emp.ename%type,
  4    sal emp.sal%type
  5   );
  6   type rc is ref cursor return rec_type;
  7   rc1 rc;
  8   rec1 rec_type;
  9  begin
10   open rc1 for select ename, sal from emp;
11   loop
12    fetch rc1 into rec1;
13    exit when rc1%notfound;
14    dbms_output.put_line(rec1.ename || ' ' || rec1.sal);
15   end loop;
16   close rc1;
17  end;
18  /
SMITH 800
ALLEN 1600
WARD 1250
JONES 2975
MARTIN 1250
BLAKE 2850
CLARK 2450
SCOTT 3000
KING 5000
TURNER 1500
ADAMS 1100
JAMES 950
FORD 3000
MILLER 1300or use, for example, VIEW to declare rowtype:
SQL> create view dummy_view as select ename, sal from emp;
View created.
SQL> declare
  2   type rc is ref cursor return dummy_view%rowtype;
  3   rc1 rc;
  4   rec1 dummy_view%rowtype;
  5  begin
  6   open rc1 for select ename, sal from emp;
  7   loop
  8    fetch rc1 into rec1;
  9    exit when rc1%notfound;
10    dbms_output.put_line(rec1.ename || ' ' || rec1.sal);
11   end loop;
12   close rc1;
13  end;
14  /
SMITH 800
ALLEN 1600
WARD 1250
JONES 2975
MARTIN 1250
BLAKE 2850
CLARK 2450
SCOTT 3000
KING 5000
TURNER 1500
ADAMS 1100
JAMES 950
FORD 3000
MILLER 1300 Rgds.

Similar Messages

  • How can i generate html tables

    i have a ArrayList of string arrays with following type of data
    u1 d1 1 t
    u1 d1 2 f
    u1 d1 3 t
    u1 d2 4 f
    u1 d2 5 t
    u2 d1 6 f
    u2 d1 7 t
    u2 d2 8 f
    what is the most efficeint logic to generate html table for this data with all reepeated values are merged (using <td rowspan>

    for
    u1 d1 1 t
    u1 d2 1 f
    only first column need to be merged
    Is the data capable of being mapped to a tree?
    ie:u1 d1 1 t
    u1 d1 2 fis OK, butu1 d1 1 t
    u1 d2 1 fEither can't happen, or the third
    column isn't merged.
    Pete

  • Copying table rows from one table to another table form

    Hi
    I have a problem about Copying table rows from one table to another table form.On jsf pages if you enter command button go anather jsf page and it copy one row to another table row. But when i execute this process for table FORM it doesn't copy I wrote a code under "createRowFromResultSet - overridden for custom java data source support." Code block is:
    ViewRowImpl value = super.createRowFromResultSet(qc, resultSet);
    try{
    AdfFacesContext fct = AdfFacesContext.getCurrentInstance();
    Number abc = (Number)fct.getProcessScope().get("___");
    value.setAttribute("___",abc);
    }catch(Exception ex){System.out.println(ex);  }
    return value;

    Table may be copied with the
    expdp and impdp utilities.
    http://www.oracle.com/technology/products/database/utilities/index.html

  • I need to generate a still shot from from a video. I would like to accomplish this task using a single application. If this is not possible with my MacBook Pro as purchased from Apple, please recommend which applications I can purchase.

    I need to generate a still shot from from a video I made with my camera. I would like to accomplish this task using a single application. If this is not possible with my MacBook Pro as purchased from Apple, please recommend which applications I can purchase that include this feature. Thanks in advance.

    For FREE do the following:
    When you get to othe part of the video you want a still shot from, put the video on pause. 
    Take a screen shot:  Apple>Shift>4 - which will produce a cross hair so you can manually select which part of the video you want.Check inside either your Applications or Utility folder for an app called Grab.  Will do the above with just a single click.
    If you still want to purchase software, suggest that you do a Google & MacUpdate search.  This way, you can find exactly what you want. 

  • Passing Multiple table row from one view to another view

    Hi,
    How to Passing Multiple table row from one view to another view in Web Dynpro Abap. (Table UI Element)
    thanx....

    Hi Ganesh,
    Kindly do search before posting.. this discussed many times..
    First create your context in component controller, and do context mapping in two views so that you can get values from
    one veiw to any views.
    and for multiple selection, for table we have property selection mode.. set as multi and remember context node selection
    selection cardinality shoud be 0-n.
    so, select n no of rows and based on some action call sec view and display data.( i think you know navigation between veiw ).
    Pelase check this...for multi selection
    Re: How to copy data from one node to another or fromone table to another table
    for navigation.. check
    navigation between the views
    Cheers,
    Kris.

  • I need a resultset with 10 rows from dual

    Which is the easiest SELECT I have to write, when the question is: "I need a resultset with 10 rows from dual"
    one solution is
    SELECT 'X' FROM EMP WHERE ROWNUM <= 10;
    problem: if emp has fewer than 10 rows, I have an incorrect resultset
    another problem: if I need 1000 and not 10 dummy-rows, than is emp definitely the wrong way, because the default-emp table has only 14 rows.
    Is there an easy generic solution for this problem? If I need only one row, Oracle has the workaround with the DUAL-table.

    What about this new method (dedicated by me to this great FORUM!). It is easy to use, easy to understand, and very fast:
    SQL> set echo on
    SQL> set timing on
    SQL> select rownum
      2    from all_objects
      3   where rownum <=10;
        ROWNUM
             1
             2
             3
             4
             5
             6
             7
             8
             9
            10
    10 rows selected.
    Elapsed: 00:00:00.00
    SQL> select COUNT(rownum)
      2    from all_objects
      3   where rownum <=1000;
    COUNT(ROWNUM)
             1000
    Elapsed: 00:00:00.00
    SQL> with r1000
      2  as (select rownum
      3        from all_objects
      4        where rownum <=1000)
      5  select count(rownum)
      6    from r1000, r1000
      7   where rownum <= 1000000;
    COUNT(ROWNUM)
          1000000
    Elapsed: 00:00:00.05 -- !for 1 million numbers!
    SQL> with r1000
      2  as (select rownum
      3        from all_objects
      4        where rownum <=1000)
      5  select count(rownum)
      6    from r1000, r1000, r1000
      7   where rownum <= 10000000;
    COUNT(ROWNUM)
         10000000
    Elapsed: 00:00:04.09  -- !for 10 millions numbers!

  • Do you need an AirPrint printer to print from an iPad or can you print using any wifi enabled printer?

    do you need an AirPrint printer to print from an iPad or can you print using any wifi enabled printer?

    How to Print from Your iPad: Summary of Printer and Printing Options
    http://ipadacademy.com/2012/03/how-to-print-from-your-ipad-summary-of-printer-an d-printing-options
    Print from iPad / iPhone without AirPrint
    http://ipadhelp.com/ipad-help/print-from-ipad-iphone-without-airprint/
    How to Enable AirPrint on a Mac and Use Any Printer
    http://ipadhelp.com/ipad-help/how-to-use-airprint-with-any-printer/
    iPad Power: How to Print
    http://www.macworld.com/article/1160312/ipad_printing.html
    Check out these print apps for the iPad.
    Print Utility for iPad  ($3.99) http://itunes.apple.com/us/app/print-utility-for-ipad/id422858586?mt=8
    Print Agent Pro for iPad ($5.99) http://itunes.apple.com/us/app/print-agent-pro-for-ipad/id421782942?mt=8   Print Agent Pro can print to many non-AirPrint and non-wireless printers on your network, even if they are only connected to a Mac or PC via USB.
    FingerPrint turns any printer into an AirPrint printer
    http://reviews.cnet.com/8301-19512_7-57368414-233/fingerprint-turns-any-printer- into-an-airprint-printer/
     Cheers, Tom

  • If you have a smart phone, can you conect it to the new wrieless ipad's or do you need to order the wireless service from verizon?

    If you have a smart phone, can you connect it to the new wireless ipad's or do you need to order the wireless service from Verizon for ipad's or do you need to order the wireless service from verizon?

    Kneehightoughguy,
    You do not need to purchase service from a carrier unless you want to utilize the iPads connection to a 3G Network on it's own (directly).  You may choose to add a Tethering plan onto your existing cell phone plan and to have an iPad connect to the Wifi connection that the Tethered phone would offer.
    Always compare your usage and your costs, as your mileage may vary.
    Brad

  • How can I copy and paste table cells from Pages into InDesign with minimum reformating?

    How can I copy and paste table cells from Pages into InDesign with minimum reformating?

    Do you mean you want to retain the formatting from Pages, or retain formatting already applied in ID?

  • Problem in generating HTML tables in apex

    Hi friends,
    I coulnt able to generate an email in the HTML table format with a background color since im receiving only in a plain text manner.
    The below is the coding only based on HTML in which i can able to view it in the HTML tables and this is it
    <html>
    <head><title>Report 1</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <base href="http://erpdev01.ti.com:7777/pls/apex/" />
    <style type="text/css">
    table.apex_ir_html_export {
    background-color:#F2F2F5;
    border-width:1px 1px 0px 1px;
    border-color:#C9CBD3;
    border-style:solid;
    table.apex_ir_html_export td {
    color:#000000;
    font-family:Tahoma,Arial,Helvetica,Geneva,sans-serif;
    font-size:9pt;
    background-color:#EAEFF5;
    padding:8px;
    background-color:#F2F2F5;
    border-color:#ffffff #ffffff #cccccc #ffffff;
    border-style:solid solid solid solid;
    border-width:1px 0px 1px 0px;
    table.apex_ir_html_export th {
    font-family:Tahoma,Arial,Helvetica,Geneva,sans-serif;
    font-size:9pt;
    padding:8px;
    background-color:#CFE0F1;
    border-color:#ffffff #ffffff #cccccc #ffffff;
    border-style:solid solid solid none;
    border-width:1px 0px 1px 0px;
    white-space:nowrap;
    </style>
    </head>
    <style type="text/css">
    body{font-family: Arial, Helvetica, sans-serif;
                        font-size:10pt;
                        margin:30px;
                        background-color:#ffffff;}
    span.sig{font-style:italic;
    font-weight:bold;
    color:#811919;}
    </style>
    </head>
    <body>
    <table border="0" cellpadding="0" cellspacing="0" class="apex_ir_html_export">
    <thead><tr><th id=></th><th id=></th></tr></thead>
    <tr>
    <td>Employee Number</td>
    <td>:P36_EMPLOYEE_NUMBER</td>
    </tr>
    <td>Reason</td>
    <td>:P36_REASON</td>
    </tr>
    <td>Position Title</td>
    <td>:P36_POSITION_TITLE</td>
    </tr>
    <td>Qualification Displayed</td>
    <td>:P36_QUALIFICATION_DISPLAYED</td>
    </tr>
    <td>Qualification Title</td>
    <td>:P36_QUALIFICATION_TITLE</td>
    </tr>
    <td>Mobile Number</td>
    <td>:P36_MOBILE_NUMBER</td>
    </tr>
    <td>Desk Number</td>
    <td>:P36_DESK_NUMBER</td>
    </tr>
    <td>Fax Number</td>
    <td>:P36_FAX_NUMBER</td>
    </tr>
    <td>Email Address</td>
    <td>:P36_EMAIL</td>
    </tr>
    <td>Effective Date</td>
    <td>:P36_EFFECTIVE_DATE</td>
    </tr>
    <td>Location</td>
    <td>:P36_LOCATION</td>
    </tr>
    <td>Type-I</td>
    <td>:P36_TYPE1</td>
    </tr>
    <td>Type-II</td>
    <td>:P36_TYPE2</td>
    </tr>
    <td>Status</td>
    <td>:P36_STATUS</td>
    </tr>
    </table>
    </body>
    </html>
    kindly ignore div class="jive-quote" and div
    as it is generated by the forum software in the above coding. The above is working perfectly as i can able to see it in the table manner with a background color.
    The same thing it needs to work on in apex while clicking the button, the html table with contents has to be send as an email when an button is pressed, i tried with the below coding, but i couldnt able to see the HTML table with a background color, it is showing in the plain text only. it is not showng html table with a background color in it. This is the coding.
    DECLARE
    l_mail_id NUMBER;
    l_body VARCHAR2(4000);
    l_body_html VARCHAR2(4000);
    BEGIN
    l_body_html := '<html>'||
    ' <head><title>Report 1</title>'||
    '<meta http-equiv="Content-Type" content="text/html; charset=utf-8">'||
    '<base href="http://erpdev01.ti.com:7777/pls/apex/" />'||
    '<style type="text/css">'||
    'table.apex_ir_html_export {'||
    'background-color:#F2F2F5;'||
    'border-width:1px 1px 0px 1px;'||
    'border-color:#C9CBD3;border-style:solid;}'||
    'table.apex_ir_html_export td {'||
    'color:#000000;'||
    'font-family:Tahoma,Arial,Helvetica,Geneva,sans-serif;'||
    'font-size:9pt;'||
    'background-color:#EAEFF5;'||
    'padding:8px;'||
    'background-color:#F2F2F5;'||
    'border-color:#ffffff #ffffff #cccccc #ffffff;'||
    'border-style:solid solid solid solid;'||
    'border-width:1px 0px 1px 0px;'||
    '}'||
    'table.apex_ir_html_export th {'||
    'font-family:Tahoma,Arial,Helvetica,Geneva,sans-serif;'||
    'font-size:9pt;'||
    'padding:8px;'||
    'background-color:#CFE0F1;'||
    'border-color:#ffffff #ffffff #cccccc #ffffff;'||
    'border-style:solid solid solid none;'||
    'border-width:1px 0px 1px 0px;'||
    'white-space:nowrap;'||
    '}'||
    '</style>'||
    '</head>'||
    '<style type="text/css">'||
    'body{font-family: Arial, Helvetica, sans-serif;'||
                        'font-size:10pt;'||
                        'margin:30px;'||
                        'background-color:#ffffff;}'||
    'span.sig{font-style:italic;'||
    'font-weight:bold;'||
    'color:#811919;}'||
    '</style>'||
    '</head>'||
    '<body>'||utl_tcp.crlf;
    l_body_html :=
    '<table border="0" cellpadding="0" cellspacing="0" class="apex_ir_html_export">'||
    '<thead><tr><th id=></th><th id=></th></tr></thead>'||
    '<tr><td>Employee Number</td><td>'||:P36_EMPLOYEE_NUMBER||'</td></tr>'||
    '<tr><td>Reason</td><td>'||:P36_Reason||'</td></tr>'||
    '<td>Position Title</td><td>'||:P36_POSITION_TITLE||'</td></tr>'||
    '<td>Qualification Displayed</td><td>'||:P36_QUALIFICATION_DISPLAYED||'</td></tr>'||
    '<td>Qualification Title</td><td>'||:P36_QUALIFICATION_TITLE||'</td></tr>'||
    '<td>Mobile Number</td><td>'||:P36_MOBILE_NUMBER||'</td></tr>'||
    '<td>Desk Number</td><td>'||:P36_DESK_NUMBER||'</td></tr>'||
    '<td>Fax Number</td><td>'||:P36_FAX_NUMBER||'</td></tr>'||
    '<td>Email Address</td><td>'||:P36_EMAIL||'</td></tr>'||
    '<td>Effective Date</td><td>'||:P36_EFFECTIVE_DATE||'</td></tr>'||
    '<td>Location</td><td>'||:P36_LOCATION||'</td></tr>'||
    '<td>Type-I</td><td>'||:P36_TYPE1||'</td></tr>'||
    '<td>Type-II</td><td>'||:P36_TYPE2||'</td></tr>'||
    '<td>Status</td><td>'||:P36_STATUS||'</td></tr></table>'||utl_tcp.crlf;
    l_body_html := l_body_html ||'<p>Thank you for your interest in the <strong>APEX MAIL</strong></p>'||utl_tcp.crlf;
    l_body_html := l_body_html ||' Sincerely,
    '||utl_tcp.crlf;
    l_body_html := l_body_html ||' <span class="sig">The APEX Dev Team</span>
    '||utl_tcp.crlf;
    l_body := 'Request for an Salary Certificate Request'||utl_tcp.crlf;
    l_mail_id := apex_mail.send(
    p_to => '<[email protected]>',
    p_bcc => '<[email protected]>',
    p_from => :P36_EMAIL,
    p_body => l_body,
    p_body_html => l_body_html,
    p_subj => 'Salary Certificate Request With Request No' ||:P36_DIS_REQ_ID
    apex_mail.push_queue();
    END;
    kindly ignore div class="jive-quote" and div in the above codings too.
    Why it is not generating in a table via email, what is the issue.
    Thanks
    Saro.
    Edited by: Saro on May 17, 2011 12:50 PM

    Hello Saro,
    first of all: the html code you are generating is not valid html. There is no closing body and html tag. Ther eis one closing head tag to much. In your table many opening row tags are missing.
    second: have a closer look at what you are doing with your variable l_body_html. At first, you add your styles to it and then you overwrite it with your table instead of adding it.
    Regards,
    Dirk

  • How to generate unique table row id's in a cfoutput query?

    I am trying to implement a jQuery drag and drop table row function to my CF pages but in order to save my "drop" positioning to the database I need to serialize all the table row id's.What coding would I need to add so that after the cfoutput query is run, each table row would have a unique id (ie. tr id="1", tr id="2", etc.)? Thanks.

    Utilize the CurrentRow variable that's automatically available within your query output:
    <cfoutput query="myQry">
              <tr id="row#currentRow#">
                        <td>...</td>
              </tr>
    </cfoutput>
    that will give you:
    <tr id="row1">
              <td>...</td>
    </tr>
    <tr id="row2">
              <td>...</td>
    </tr>
    <tr id="row3">
              <td>...</td>
    </tr>
    etc...

  • Need to  color a Table row based on a Column value

    Dear Alll
    I have a requirement to color the rows of a table based on a column value in it. I have tried and surfed many useful materials over the net. but none of them solves my purpose. Please help me, I know that i can used OADataBoundValueViewObject and create a custom css file and apply color to a particular column of a table using a decode in the select statement of that VO.
    But all i need is to color a particular row with a particular color. Need your help with this ........
    Please do reply
    Best Regards
    Edited by: Antony Jayaraj on Mar 27, 2012 8:54 PM

    These posts might help you.
    How to change the row color based on Condition
    Can we colour the rows in the column of a table
    Regards,
    Peddi.

  • I Need Help In Deleting Table row by clicking on "Delete" button inside the

    Dear all,
    first i'm new to Swing
    i have created table with customized table model, i fill this table using 2d array, this table rows contains JButtons rendered using ButtonRenderer.java class and action listeners attached by the AbstractButtonEditor.java
    what iam trying to do is when i click on a specified button in table row i want this row to be deleted, i found some examples that uses defaultTableModelRef.removeRow(index), but iam using customized table model and the following is my code
    JTable tblPreview = new JTable();
              DbExpFormTableModel model = new DbExpFormTableModel();               
              tblPreview.setModel(model);
    //adding the edit button          
              tblPreview.getColumn("Edit").setCellRenderer(new ButtonRenderer());
              tblPreview.getColumn("Edit").setCellEditor(new AbstractButtonEditor(new JCheckBox()));
              //adding the delete button
              tblPreview.getColumn("Delete").setCellRenderer(new ButtonRenderer());
              tblPreview.getColumn("Delete").setCellEditor(new AbstractButtonEditor(new JCheckBox()));
    and here is the code of the code of my customized table model ( DbExpFormTableModel )
    public class DbExpFormTableModel extends GeneralTableModel
         public DbExpFormTableModel()
              setColumnsNames();
              fillTable();          
         private void setColumnsNames()
              columnNames = new String [5];
              columnNames[0] = "ID";
              columnNames[1] = "Database ID";
              columnNames[2] = "Prestatement";
              columnNames[3] = "Edit";
              columnNames[4] = "Delete";
         private void fillTable()
              int numOfRows = 2;     // = getNumberOfRows();
              data = new Object[numOfRows][5];          
              data[0][0] = "1"; //we must get this value from the database, it is incremental identity
              data[0][1] = "AAA";
              data[0][2] = "insert into table 1 values(? , ? , ?)";
              data[0][3] = "Edit";
              data[0][4] = "Del";
              data[1][0] = "2"; //we must get this value from the database, it is incremental identity
              data[1][1] = "BBB";
              data[1][2] = "insert into table2 values(? , ? , ? , ?)";
              data[1][3] = "Edit";
              data[1][4] = "Del";
    and this is the GeneralTableModel class
    public class GeneralTableModel extends AbstractTableModel implements Serializable
         public static Object [][] data;
         public static String[] columnNames;
         //these functions should be implemented to fill the grid
         public int getRowCount()
              return data.length;
         public int getColumnCount()
              return columnNames.length;
         public String getColumnName(int col)
    return columnNames[col];
         public Object getValueAt(int row , int col)
              return data[row][col];
         //i've implemented this function to enable events on added buttons
         public boolean isCellEditable(int rowIndex, int columnIndex)
              return true;
         public Class getColumnClass(int c)
    return getValueAt(0, c).getClass();
    public void setValueAt(Object value, int row, int col)
    //fireTableDataChanged();          
    data[row][col] = value;          
    fireTableCellUpdated(row, col);     
    And Now what i want to do is to delete the clicked row from the table, so please help me...
    thank you in advance

    Hi Sureshkumar,
    1. Create a value attribute named <b>select</b> of type boolean.
    2. Bind the <b>checked property</b> of all the checkboxes to this attribute.
    3. Create an action called <b>click</b> and bind it to <b>OnAction</b> event of the button(whose click will check all the checkboxes) and write this code in that action.
    <b>wdContext.currentContextElement().setSelect(true);</b>
    Warm Regards,
    Murtuza

  • Excel issues with importing CSV or HTML table data from URL - Sharepoint? Office365?

    Greetings,
    We have a client who is having issues importing CSV or HTML table data as one would do using Excel's Web Query import from a reporting application.  As the error message provided by Excel is unhelpful I'm reaching out to anyone who can help us begin to
    troubleshoot problems affecting what is normal standard Excel functionality.  I'd attach the error screenshot, but I can't because my account is not verified....needless to say it says "Microsoft Excel cannot access  the file https://www.avantalytics.com/reporting_handler?func=wquery&format=csv&logid=XXXX&key=MD5
    Where XXXX is a number and MD5 is an md5 code.  The symptoms stated in the error message are:
    - the file name or path does not exist
    -The file is being used by another program
    -The workbook you are trying to save has the same name as a currently open workbook.
    None of these symptoms are the case, naturally. The user encountered this with Excel2010, she was then upgraded to Excel2013 and is still experiencing the same issue. The output of this URL in a browser (IE, Chrome, Firefox) is CSV data for the affected
    user, so it is not a network connectivity issue.  In our testing environment using both Excel2010 or 2013 this file is imported successfully, so we cannot replicate.  The main difference I can determine between our test environment and the end-user
    is they have a Sharepoint installation and appear to have Office365 as well.
    So,  my question might more appropriately be for Sharepoint or Office365 folks, but I can't be sure they're  a culprit.  Given this - does anyone have any knowledge of issues which might cause this with Sharepoint or Office365 integrated with
    Excel and/or have suggestions for getting more information from Excel or Windows other than this error message?  I've added the domain name as a trusted publisher in IE as I thought that might be the issue, but that hasn't solved anything.  As you
    can see its already https and there is no authentication or login - the md5 key is the authentication.  The certificate for the application endpoint is valid and registered via GoDaddy CA.
    I'm at a loss and would love some suggestions on things to check/try.
    Thanks  -Ross

    Hi Ross,
    >> In our testing environment using both Excel 2010 and 2013 this file is imported successfully, so we cannot replicate.
    I suspect it is caused by the difference of web server security settings.
    KB: Error message when you use Web query to a secure Web page (HTTPS://) in Excel: "Unable to open"
    Hope it will help.
    By the way, this forum is mainly for discussing questions about Office Development (VSTO, VBA and Apps for Office .etc.). For Office products feature specific questions, you could consider posting them on
    Office IT Pro forum or Microsoft Office Community.
    Regards,
    Jeffrey
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Generate html post request from form9i applet

    I need to interact with a 3rd party credit card processing server form my form9i application.I need to create a html post request with all the input information encapsulated in it and also receive the http response and parse it and display an alert in the form(approved or rejected).Can I do that?
    any answer is going to help me greatly
    Sathi

    GET method may be the easier way. web.show_document('your_url?v1=123&v2=abc'); as of POST method, I guess you need JSP to do it, but how to do it from applet, I like to know too.
    getting back info, I used perl to read the html POST data on web server, then perl parses it and writes to a file on server, then use text_io or utl_file to read data into webform applet fields.
    The drawback I found that the cursor will not get back to webform applet from html pages. I tried to print every possible Javascript methods to wake up it, but it cannot get it.

Maybe you are looking for