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.
Similar Messages
-
Coloring individual table rows based on a condition
Hi Experts,
I have a table bound to a node in the context via datasource property.
I was trying to color an individual row based on a certain value in the context node.
Can anyone help my achieve this please?
For example:
for( int i=0; i<table.size(); i++)
if(wdContext.tableNode().getTableElementAt(i).getFieldA().equals("Y"))
// then color the table row
Any suggestions?
MSolved.
-
How to retrieving latest row based on a column value
Hi,
Lets consider a scenario. I have a table which has a order number, count column which is our fact, a type column which contains types e.g. (A,B) with A has more priority then B. Now in our graph we are getting all rows i.e. if we have two rows in db for order #1 one for type A and one for type B, then it shows us data from both rows in graph.
But I need only to show one row of type A in this case as A has higher priority than B. The row with type B should not contribute in construction of my graph if type A for same row also exists.
I tried a solution, for which i created a new column at logical level which contain 1 for A and 0 for B. Now i put Max aggregation rule in it to get maximum value which will be row with Type A in our case. But it did not work.
How we will can achieve it in OBIEE?
Thanks.
Aasim Khan.Hi Steve,
I have a similar requirement... one of the columns in my table is a calculated value based on several xml fields,
<?xdofx:(MATH01+MATH02+MATH03+MATH04+MATH05+AA+AA1)+((FNDCD01+FNDCD02+FNDCD03+FNDCD04+FNDCD05+MCHCD01+MCHCD02) div '8')?>
if the resultant value above is less than 62, i do no want to display this entire row in the output. could you help me wout with this?
thanks
Domnic -
Formating the Row Based on one column value
Hi Friends
I am trying to format the Entire row based on the value of the first column in my Answers.
Example if first column value in 'F' now i want the Entire row to be colored
I can do conditional formating on one column but i want to do it on the entire row
F 8.1 % 12.0 %
E 5.2 % 3.5 %
M 2.3 % 3.3 %
If any one has done this or any suggestions please respond
Thanks
SangIts a Pivot View
F 8.1 % 12.0 %
E 5.2 % 3.5 %
M 2.3 % 3.3 %
the column 1 --> F,E,M are the Product
the column 2 --> 8.1% , 5.2% , 2.3% are the sales in year 2008
the column 3 --> 12.0 % , 3.5 %, 3.3 % are the sales in year 2009
So will i be able to apply the formating in pivot view based on one column to other column If yes please let me know how or
suggest if this can be done using the BI Office , or BI publisher
sing the BI Office i can do the formating in Excel but once i refresh the data all the formating is gone ... :(
I am donno BI Publisher if we have to use BIP please suggest any solution its very very very urgent and important report formating they need here ....
Thanks in advance David
sango -
I'm dealing with an old database that's being phased out, and here's the version info (yes, it's really old):
Oracle8i Enterprise Edition Release 8.1.7.2.0 - Production
PL/SQL Release 8.1.7.2.0 - Production
CORE 8.1.7.0.0 Production
TNS for HPUX: Version 8.1.7.2.0 - Production
NLSRTL Version 3.4.1.0.0 - Production
I believe Frank Kulash gave me the solution to my original question, which was:
Sample data:
CREATE TABLE testabc
( item CHAR(25)
, qty NUMBER(13,4)
INSERT INTO testabc
VALUES ('Item1',1);
INSERT INTO testabc
VALUES ('Item2',3);
INSERT INTO testabc
VALUES ('Item3',1);
INSERT INTO testabc
VALUES ('Item4',2); Desired results:
ITEM QTY
Item1 1.000
Item2 3.000
--blank row
--blank row
Item3 1.000
Item4 2.000
--blank rowAnd the solution:
SELECT CASE
WHEN c.n = 1 THEN t.item
END AS item_col
, CASE
WHEN c.n = 1 THEN t.qty
END AS qty
FROM testabc t
SELECT ROWNUM AS n
FROM all_objects
WHERE ROWNUM <= 10 -- If you know an upper bound
) c
WHERE c.n <= t.qty
ORDER BY t.item
, c.n
;Now, it turns out there are only some items which need these extra rows, but I'm not sure if it's possible to only include extra rows for certain items or not...
Here's my new sample data:
CREATE TABLE testabc1
( s CHAR(1)
, item CHAR(25)
, qty NUMBER(13,4)
INSERT INTO testabc1
VALUES ('*','Item1',1);
INSERT INTO testabc1
VALUES ('','Item2',3);
INSERT INTO testabc1
VALUES ('*','Item3',3);
INSERT INTO testabc1
VALUES ('*','Item4',2);And my new desired results: (any row with an asterisk gets extra rows, if the qty is greater than 1)
S ITEM QTY
* Item1 1.000
Item2 3.000
* Item3 3.000
--blank row
--blank row
* Item4 2.000
--blank rowEdited by: user11033437 on Jan 3, 2012 9:27 AM (fixed missing asterisk in desired results)Hi,
Here's a slightly simpler way:
SELECT CASE
WHEN c.n = 1 THEN t.item
END AS item_col
, CASE
WHEN c.n = 1 THEN t.qty
END AS qty
FROM testabc1 t
SELECT ROWNUM AS n
FROM all_objects
WHERE ROWNUM <= 10 -- If you know an upper bound
) c
WHERE c.n <= CASE
WHEN t.s = '*'
THEN t.qty
ELSE 1
END
ORDER BY t.item
, c.n
;This is just like the previous solution, except that the WHERE clause, which was originally
WHERE c.n <= t.qtyis now
WHERE c.n <= CASE ... END
user11033437 wrote:... And my new desired results: (any row with an asterisk gets extra rows, if the qty is greater than 1)
S ITEM QTY
* Item1 1.000
Item2 3.000
Item3 3.000
--blank row
--blank row
* Item4 2.000
--blank row
S should be '*' on the output row where item='Item3', right?
I'm sure you know how to get the s column in the output, but, since I've already tried it:
SELECT CASE
WHEN c.n = 1 THEN '*'
END AS s
, CASE
WHEN c.n = 1 THEN t.item
END AS item_col
, CASE
WHEN c.n = 1 THEN t.qty
END AS qty
FROM testabc1 t
SELECT ROWNUM AS n
FROM all_objects
WHERE ROWNUM <= 10 -- If you know an upper bound
) c
WHERE c.n <= CASE
WHEN t.s = '*'
THEN t.qty
ELSE 1
END
ORDER BY t.item
, c.n
;Edited by: Frank Kulash on Jan 3, 2012 11:11 AM -
Counting rows based on a column value
Tricky Query.No offence if this is a repeat please.
This is a PROD issue in SYBASE.
TableA has id_flag_listing column
TableA
id_flag_listing
N
N
N
N
N
1) If all rows are set to 'N',then my count should be 0.
PrimaryListing
0
2) If there is one row which is 'Y' then this shoud be:
id_flag_listing
N
N
Y
N
N
PrimaryListing
1
How can I count in this manner?
Do i use decode? I am using
Select sum(decode(flg_active),'Y',1,0))
from TABLEA
Will the above work.??
I am using SQL for Sybase.
Please guide?Did you even tried the SQL query I've given?
Your table A
SQL> SELECT flg_listing
2 FROM
3 (
4 SELECT 'N' flg_listing FROM DUAL
5 UNION ALL
6 SELECT 'N' FROM DUAL
7 UNION ALL
8 SELECT 'N' FROM DUAL
9 UNION ALL
10 SELECT 'N' FROM DUAL
11 UNION ALL
12 SELECT 'N' FROM DUAL
13 ) TABLEA;
FLG_LISTING
N
N
N
N
N
Your table A, from which I count where are of 'Y' value. In these queries, I change TableA contents.
SQL> SELECT count(*)
2 FROM
3 (
4 SELECT 'N' flg_listing FROM DUAL
5 UNION ALL
6 SELECT 'N' FROM DUAL
7 UNION ALL
8 SELECT 'N' FROM DUAL
9 UNION ALL
10 SELECT 'N' FROM DUAL
11 UNION ALL
12 SELECT 'N' FROM DUAL
13 ) TABLEA
14 WHERE flg_listing = 'Y';
COUNT(*)
0
SQL> SELECT count(*)
2 FROM
3 (
4 SELECT 'N' flg_listing FROM DUAL
5 UNION ALL
6 SELECT 'N' FROM DUAL
7 UNION ALL
8 SELECT 'Y' FROM DUAL
9 UNION ALL
10 SELECT 'N' FROM DUAL
11 UNION ALL
12 SELECT 'N' FROM DUAL
13 ) TABLEA
14 WHERE flg_listing = 'Y';
COUNT(*)
1
SQL> SELECT count(*)
2 FROM
3 (
4 SELECT 'N' flg_listing FROM DUAL
5 UNION ALL
6 SELECT 'N' FROM DUAL
7 UNION ALL
8 SELECT 'Y' FROM DUAL
9 UNION ALL
10 SELECT 'Y' FROM DUAL
11 UNION ALL
12 SELECT 'Y' FROM DUAL
13 ) TABLEA
14 WHERE flg_listing = 'Y';
COUNT(*)
3Yoann. -
Getting error while setting color to table rows?
Hi All
I am trying to setting colors to table rows based on dropdown value.
lv_Dropdown vaue =1 i want to set one color, 2-another color like that.
For this I create attribute CELL_DESIGN of type WDUI_TABLE_CELL_DESIGN in node, and i bind this attribute to every column celldesign property in table. and my code in on select of dropdown.
data lr_column type ref to cl_wd_table_column.
data:obj_table type ref to cl_wd_table.
lr_column = obj_table->get_column( id = 'TABLE_WEEK1' ).
if lv_dropdown = 1.
lr_column->set_cell_design(
cl_wd_table_column=>e_cell_design-badvalue_dark ).
endif.
lr_column->bind_cell_design( path = 'SEGMENT1.CELL_DESIGN' ). ...Giving dump at r_colum = get_column( )
I follow correct code or not??
Cheers,
Venkys.Sorry Sarbjeet and baskaran i am not getting,
I want to set colors to row of a table on dropdown selection. In dropdown i ahve a code like
DATA lo_nd_segment1 TYPE REF TO if_wd_context_node.
DATA lo_el_segment1 TYPE REF TO if_wd_context_element.
DATA ls_segment1 TYPE wd_this->Element_segment1.
data lt_segment1 type wd_this->elements_segment1.
DATA lv_segment TYPE wd_this->Element_segment1-segment.
navigate from <CONTEXT> to <SEGMENT1> via lead selection
lo_nd_segment1 = wd_context->get_child_node( name = wd_this->wdctx_segment1 ).
get element via lead selection
lo_el_segment1 = lo_nd_segment1->get_element( ).
lo_el_segment1 = WDEVENT->GET_CONTEXT_ELEMENT( 'CONTEXT_ELEMENT' ).
get all declared attributes
lo_el_segment1->get_static_attributes(
IMPORTING
static_attributes = ls_segment1 ).
DATA : lv_dropdown type string .
lv_dropdown = ls_segment1-segment.
if lv_dropdown = 1. SET ONE COLOR TO THAT ROW
endif.
if lv_dropdown = 2. SET ONE COLOR TO THAT ROW
endif.
Now what should be the code in WDMODIFYVIEW method to set table row with colors.
Cheers,
Venkys. -
How to restrict a table with its set of data based on a column value in it?
Hi,
I have a scenario in which I have to show a set of data of a pivot table by restricting data based on a column value. I am creating BIP report whose source is from BIA ie.RPD. Based on a column value I want to restrict the data being displayed in the table. Since I also want the hidden data in the first table to be displayed in another table in the same report I cannot restrict the data at the query level i.e at RPD or at BIA. For this reason I used
<?xdofx:if saw3_ = 1?>
the pivot table
<?end if?>
But it does not restrict any data.
Also I tried using the if condition inside the table before the row level looping happens. But no good show even then.
How can I forgo this problem?
Regards,
The MMHi,
See : http://download.oracle.com/docs/cd/E12096_01/books/PubUser/T421739T481157.htm#4535373 regarding column and row.
Regards,
Colectionaru -
Search help for a field in table control based on another field value
Hi,
I want to attach the Search help for a field in table control based on another field value.
Please help me asap.
Will be highly rewardedHI,..
Check these links
search help in table control
Re: How to create Search Help for a field in Table control !!
How to create Search Help for a field in Table control !!
F4 Help In Table Control
Control table F4 help
Problem in F4 help in screen field
check this code
DATA: BEGIN OF it_value4 OCCURS 0,
TEXTCODE LIKE ZXX-TEXTCODE,
TEXTDESC LIKE ZXX-TEXTDESC,
END OF it_value4.
progname = sy-repid.
dynnum = sy-dynnr.
SELECT TEXTCODE TEXTDESC
FROM xxxx
INTO CORRESPONDING FIELDS OF TABLE<b> it_value4</b>
WHERE LOSS_CODE =<b> IT_VALUE1 .</b>
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = 'TEXTCODE'
dynpprog = progname
dynpnr = dynnum
dynprofield = 'ITVALUE-TEXTCODE' "-->UR 4 th filed value in screen
value_org = 'S'
TABLES
value_tab = it_value4.
endmodule.
Message was edited by:
veereshbabu ponnada -
Deleting duplicate rows based on three columns in Oracle 8i
Hi all,
The database we use is Oracle 8i.
The query below raises the too_many_rows exception when I launch an application. So I want to delete the duplicated rows :
select polarisation_1, polarisation_2
into v_pol1_tech, v_pol2_tech
from v_cfh_lien_element
where nom_lien = p_nom_lien
AND num_canal_1 = p_num_canal_1
AND freq_emise_1 = p_freq_emise_1;
Notice that with many possible values of the parameters p_nom_lien, p_num_canal_1 and p_freq_emise_1 then the exception is raised.
So how to delete generally the duplicated rows based on the three columns "nom_lien" , "num_canal_1" and "freq_emise_1" ?
Thank you very much indeed.Check the other thread with same question deleting duplicate rows based on three columns in Oracle 8i
-
How to reject external table rows with some blank columns
How to reject external table rows with some blank columns
I have an external table and I would like to reject rows when a number of fields are empty. Here are the details.
CREATE TABLE EXTTAB (
ID NUMBER(10),
TSTAMP DATE,
C1 NUMBER(5,0),
C2 DATE,
C3 FLOAT(126)
ORGANIZATION EXTERNAL (
TYPE ORACLE_LOADER
DEFAULT DIRECTORY EXT_DAT_DIR
ACCESS PARAMETERS (
RECORDS DELIMITED BY NEWLINE
LOAD WHEN (NOT (c1 = BLANKS AND c2 = BLANKS AND c3 = BLANKS))
LOGFILE EXT_LOG_DIR:'exttab.log'
BADFILE EXT_BAD_DIR:'exttab.bad'
DISCARDFILE EXT_BAD_DIR:'exttab.dsc'
FIELDS TERMINATED BY "|"
LRTRIM
MISSING FIELD VALUES ARE NULL
REJECT ROWS WITH ALL NULL
FIELDS (
ID,
TSTAMP DATE 'YYYYMMDDHH24MISS',
C1,
C2 DATE 'YYYYMMDDHH24MISS',
C3
) LOCATION ('dummy.dat')
REJECT LIMIT UNLIMITED
So, as you can see from the LOAD WHEN clause, I'd like to reject rows when C1, C2 and C3 are empty.
The above statement works fine and creates the table. However when I am trying to load data using it, the following error is produced:
ORA-29913: error in executing ODCIEXTTABLEOPEN callout
ORA-29400: data cartridge error
KUP-00554: error encountered while parsing access parameters
KUP-01005: syntax error: found "not": expecting one of: "double-quoted-string, identifier, (, number, single-quoted-string"
KUP-01007: at line 1 column 41
ORA-06512: at "SYS.ORACLE_LOADER", line 14
ORA-06512: at line 1
It seems that external tables driver does not understand the "NOT (...)" condition. Could anyone suggest how I can achieve what I want in a different way?
Thank you.
DenisAnother method would be to simply remove the "LOAD WHEN condition" and create a view on the external table which filters the data.
CREATE EXTTAB_VIEW AS
SELECT * FROM EXTTAB
WHERE not (c1 is null and c2 is null and c3 is null); -
Join all rows bases on one column value
Hi All,
I have requrement like Join all rows bases on one column value, i am not getting how to accomplish that. Here is my requrement. i have table test(id,id_desc) with no key
table:Test
id id_desc
1 desc_a
1 desc_b
1 desc_c
Now the requremnet i have one more table as test1(id,id_desc) here id is primary key. where record i need to insert as
id id_desc
1 desc_a
desc_b
desc_corza wrote:
Hi All,
I have requrement like Join all rows bases on one column value, i am not getting how to accomplish that. Here is my requrement. i have table test(id,id_desc) with no key
table:Test
id id_desc
1 desc_a
1 desc_b
1 desc_c
Now the requremnet i have one more table as test1(id,id_desc) here id is primary key. where record i need to insert as
id id_desc
1 desc_a
desc_b
desc_cI'm guessing you want to pivot the results in TEST and use that to insert into TEST1?
If so this may be useful
http://www.oracle-base.com/articles/misc/StringAggregationTechniques.php -
Retrieve records based on a column value
Hi,
I want to retrieve all the records from a table where the first name column value is
George but i don't know in which case the name is stored.. should i use the Upper or Lower function in the WHERE clause?
Thank in advance for anyone who might reply.
Arjuneither of the two is ok.
where upper(name) = 'GEORGE' -
Hello Everyone,
How to update zero to a column value when record does not exist in table but should display the column value when it exists in table
Regards
Regards Gautam SAs per my understanding...
You Would like to see this
Code:
SELECT COALESCE(Salary,0) from Employee;
Regards
Shivaprasad S
Please mark as answer if helpful
Shiv -
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() < $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() < $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() < $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() < $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   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> </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.
Maybe you are looking for
-
any guru here have the experience of deploying Jasper report under Oracle Application Server? thought is not something popular, as I can not get much info by searching this forum and internet. i manage to generate a jrxml file using ireport, but just
-
Our product automates the deployment of reports using the COM object of Crystal Reports XI. We have a requirement to update to 2008/2010 so I have been investigating the use of the Visual Studio 2010 SDK and redistributable. I have successfully load
-
Exporting layers to Illustrator
Hey guys, Can anyone explain why exporting layers from InDesign to Illustrator isn't working properly? Maybe I've missed something but my layers in InDesign look like this: My export settings look like this: However no matter if I use Adobe 1.6 or ab
-
Macbook pro crashing after trying to update iWork's 2009
I am running Mountain Lion and have had iWorks 09 for some time however when I try and install the latest update for iWorks it causes my MacBook Pro to crash, any suggestions, please?
-
Insurgents (Action scene)
Hey everyone, I've shot and edited an action film. Please watch and review this film. Thank you. What do you think about the: cinematography? editing? sound mixing? music? Color Correction? Thank you