 |
| XSLT General questions and answers about XSLT. For issues strictly specific to the book XSLT 1.1 Programmers Reference, please post to that forum instead. |
Welcome to the p2p.wrox.com Forums.
You are currently viewing the XSLT section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
|
|
|
|

August 31st, 2009, 11:28 PM
|
|
Authorized User
|
|
Join Date: Aug 2009
Posts: 31
Thanks: 16
Thanked 1 Time in 1 Post
|
|
Add another layer of grouping
1.XML
Code:
<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="1.xsl"?>
<records>
<plan planid="CAR1" plantype="CAR">
<field>
<fieldId>DateCreated</fieldId>
<fieldtext>Creation Date</fieldtext>
<fieldvalue>12-Mar-2009</fieldvalue>
</field>
<field>
<fieldId>PlanName</fieldId>
<fieldtext>Name of Plan</fieldtext>
<fieldvalue>Health Care</fieldvalue>
</field>
</plan>
<plan planid="CAR2" plantype="CAR">
<field>
<fieldId>DateCreated</fieldId>
<fieldtext>Creation Date</fieldtext>
<fieldvalue>14-Mar-2009</fieldvalue>
</field>
<field>
<fieldId>PlanName</fieldId>
<fieldtext>Name of Plan</fieldtext>
<fieldvalue>Death Accident</fieldvalue>
</field>
</plan>
<plan planid="DENTAL1" plantype="DENTAL">
<field>
<fieldId>DateCreated</fieldId>
<fieldtext>Creation Date</fieldtext>
<fieldvalue>12-Mar-2009</fieldvalue>
</field>
<field>
<fieldId>PlanName</fieldId>
<fieldtext>Name of Plan</fieldtext>
<fieldvalue>Health Care</fieldvalue>
</field>
</plan>
<plan planid="DENTAL2" plantype="DENTAL">
<field>
<fieldId>DateCreated</fieldId>
<fieldtext>Creation Date</fieldtext>
<fieldvalue>14-Mar-2009</fieldvalue>
</field>
<field>
<fieldId>PlanName</fieldId>
<fieldtext>Name of Plan</fieldtext>
<fieldvalue>Death Accident</fieldvalue>
</field>
</plan>
</records>
1.XSL
Code:
<?xml version="1.0" encoding="UTF-8"?>
<!--html xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xsl:version="1.0"-->
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml" indent="yes"/>
<xsl:template match="/">
<html>
<head><title>Test</title></head>
<body>
<xsl:variable name="r" select="records"/>
<table>
<tr>
<td></td>
<xsl:for-each select="records/plan">
<td><xsl:value-of select="@planid"/></td>
</xsl:for-each>
</tr>
<xsl:for-each select="records/plan[1]/field">
<xsl:variable name="p" select="position()"/>
<tr>
<td><xsl:value-of select="fieldtext"/></td>
<xsl:for-each select="$r/plan">
<td><xsl:value-of select="field[$p]/fieldvalue"/></td>
</xsl:for-each>
</tr>
</xsl:for-each>
</table>
</body>
</html>
</xsl:template>
</xsl:stylesheet>
I've reposted a previous problem and made my scenario simpler.
The transformation is working fine. It outputs one table containing all plan elements. Kindly copy the files and open the xml for reference.
However I need to group it by plantype. If there are two types of plantype, then the output must have two tables (one for each plantype).
In this scenario, there are two distinct plantypes. 1) CAR & 2) DENTAL. The output must have two tables also: Car Table and Dental Table.
Car Table will contain all plan elements with plantype CAR.
Dental Table will contain all plan elements with plantype DENTAL.
I just don't know what to put in the XSL so that plans will be grouped by plantype.
Badly need your help. Thanks in advance.
By the way, I don't know what the possible plantype values are. But regardless, I need to group it per plantype.
Last edited by kokoness; September 1st, 2009 at 12:25 AM..
|
|

September 1st, 2009, 12:23 AM
|
|
Authorized User
|
|
Join Date: Aug 2009
Posts: 31
Thanks: 16
Thanked 1 Time in 1 Post
|
|
I was given this code: (thanks to mrame)
Code:
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format">
<xsl:key name="type" match="plan" use="@plantype"/>
<xsl:template match="records">
<html>
<xsl:copy>
<xsl:for-each select="plan[generate-id() = generate-id(key('type', @plantype)[1])]">
<xsl:sort select="@plantype"/>
<xsl:value-of select="@plantype"/>
<xsl:apply-templates select="key('type', @plantype)"></xsl:apply-templates>
<xsl:text> </xsl:text>
</xsl:for-each>
</xsl:copy>
</html>
</xsl:template>
<xsl:template match="plan">
Planid <xsl:value-of select="@planid"/>
</xsl:template>
</xsl:stylesheet>
But I really have no idea how to incorporate it with my existing xsl
|
|

September 1st, 2009, 06:09 AM
|
|
Friend of Wrox
|
|
Join Date: Jun 2008
Posts: 291
Thanks: 9
Thanked 29 Times in 29 Posts
|
|
Try this:
Code:
<xsl:template match="records">
<html>
<head><title>Test</title></head>
<body>
<xsl:variable name="first" select="plan"></xsl:variable>
<xsl:for-each select="plan[generate-id() = generate-id(key('type', @plantype))]">
<xsl:sort select="@plantype"/>
<table>
<tr>
<td></td>
<xsl:apply-templates select="key('type', @plantype)"></xsl:apply-templates>
</tr>
<xsl:if test="$first[position() =1]">
<xsl:apply-templates select="key('type', @plantype)" mode="first"></xsl:apply-templates>
</xsl:if>
</table>
</xsl:for-each>
</body>
</html>
</xsl:template>
<xsl:template match="plan">
<td><xsl:value-of select="@planid"/></td>
</xsl:template>
<xsl:template match="plan" mode="first">
<tr>
<td><xsl:value-of select="field/fieldtext"/></td>
<td><xsl:value-of select="field/fieldvalue"/></td>
</tr>
</xsl:template>
__________________
Rummy
|
|
The Following User Says Thank You to mrame For This Useful Post:
|
|
|

September 1st, 2009, 06:50 AM
|
|
Authorized User
|
|
Join Date: Aug 2009
Posts: 31
Thanks: 16
Thanked 1 Time in 1 Post
|
|
1.XSL
Code:
<?xml version="1.0" encoding="UTF-8"?>
<!--html xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xsl:version="1.0"-->
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="html" indent="yes"/>
<xsl:template match="records">
<html>
<head><title>Test</title></head>
<body>
<xsl:variable name="first" select="plan"></xsl:variable>
<xsl:for-each select="plan[generate-id() = generate-id(key('type', @plantype))]">
<xsl:sort select="@plantype"/>
<table>
<tr>
<td></td>
<xsl:apply-templates select="key('type', @plantype)"></xsl:apply-templates>
</tr>
<xsl:if test="$first[position() =1]">
<xsl:apply-templates select="key('type', @plantype)" mode="first"></xsl:apply-templates>
</xsl:if>
</table>
</xsl:for-each>
</body>
</html>
</xsl:template>
<xsl:template match="plan">
<td><xsl:value-of select="@planid"/></td>
</xsl:template>
<xsl:template match="plan" mode="first">
<tr>
<td><xsl:value-of select="field/fieldtext"/></td>
<td><xsl:value-of select="field/fieldvalue"/></td>
</tr>
</xsl:template>
</xsl:stylesheet>
I tried the code but I keep getting an error on this line (via XMLSpy):
<xsl:for-each select="plan[generate-id() = generate-id(key('type', @plantype))]">
This file is not valid: Error in XPath expression, Invalid key reference
On IE6 browser, this is the error:
A reference to key 'type' cannot be resolved. An xsl:key instruction of this name must be declared at the top-level of the ...
As of now, I'm really clueless with that error. I'm still currently reading a book regarding XSLT.
|
|

September 1st, 2009, 06:57 AM
|
|
Friend of Wrox
|
|
Join Date: Jun 2008
Posts: 291
Thanks: 9
Thanked 29 Times in 29 Posts
|
|
You should first declare key like the below:
Code:
<xsl:key name="type" match="plan" use="@plantype"/>
You have added this in your second thread in this post.
__________________
Rummy
|
|
The Following User Says Thank You to mrame For This Useful Post:
|
|
|

September 1st, 2009, 07:02 AM
|
|
Authorized User
|
|
Join Date: Aug 2009
Posts: 31
Thanks: 16
Thanked 1 Time in 1 Post
|
|
My bad.
Thanks for pointing it out.
Thank you very much again Rummy.
|
|

September 1st, 2009, 09:51 AM
|
|
Authorized User
|
|
Join Date: Aug 2009
Posts: 31
Thanks: 16
Thanked 1 Time in 1 Post
|
|
I'll just try my best to incorporate it in my existing 1.XSL
|
|

September 1st, 2009, 11:19 PM
|
|
Authorized User
|
|
Join Date: Aug 2009
Posts: 31
Thanks: 16
Thanked 1 Time in 1 Post
|
|
I'm really having a hard time applying the solution to my existing 1.XSL (located above on my initial post). I need to apply the given solution on my existing XSL and not apply it on a new XSL. It's really very hard for me.
It's because the structure in my existing XSL is very different from the given sample. I've been trying since yesterday to integrate the given solution with my existing XSL but I have little success.
If anyone could kindly help me solve my frustrating problem, I would really appreciate it.
Thanks.
Last edited by kokoness; September 1st, 2009 at 11:23 PM..
|
|

September 2nd, 2009, 01:34 AM
|
|
Friend of Wrox
|
|
Join Date: Jun 2008
Posts: 291
Thanks: 9
Thanked 29 Times in 29 Posts
|
|
The first thing you should know that you have to post the needed output xml. When you have changed the input xml, then you should also post the required output from that. Only then you can expect the correct xsl script.
While analysing we would find that there may be a better way of scripting, due to which your original script can be changed.
So post your needed output xml for the input xml and xsl script you ahev posted already.
__________________
Rummy
|
|

September 2nd, 2009, 02:50 AM
|
|
Authorized User
|
|
Join Date: Aug 2009
Posts: 31
Thanks: 16
Thanked 1 Time in 1 Post
|
|
My output is html. I'll post the html output. Sorry if this is long. OK. Here it goes.
1. Main.XML
Code:
<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" encoding='utf-8' href="Side-By-Side.xsl"?>
<records>
<plan planid="XXXX" plantype="HCFAS" breadcrumb="Jan > Health Care > FAS 106 > 06-Jul-2009" plantypedescription="HC FAS">
<field>
<fieldId>A</fieldId>
<fieldtext>Health Care Fas 158</fieldtext>
<fieldvalue/>
<fieldvalue2>[NULL]</fieldvalue2>
<type>SectionTitle</type>
<sequence>1</sequence>
<stylemarker>0</stylemarker>
</field>
<field>
<fieldId>PlanName</fieldId>
<fieldtext>Name of Plan</fieldtext>
<fieldvalue>Battle Plan</fieldvalue>
<fieldvalue2>[NULL]</fieldvalue2>
<type>NormalField</type>
<sequence>2</sequence>
<stylemarker>1</stylemarker>
</field>
<field>
<fieldId>ResultsAsOf</fieldId>
<fieldtext>Result as of</fieldtext>
<!--fieldvalue><b>BATTLE PLAN<b></fieldvalue-->
<fieldvalue>12-Mar-2009</fieldvalue>
<fieldvalue2>[NULL]</fieldvalue2>
<type>NormalField</type>
<sequence>3</sequence>
<stylemarker>0</stylemarker>
</field>
<field>
<fieldId>[NULL]</fieldId>
<fieldtext>[NULL]</fieldtext>
<fieldvalue>
<detailrow detailrowid="aaaa" stylemarker="0">
<field>
<fieldid>LEVEL</fieldid>
<fieldtext>Level</fieldtext>
<fieldvalue>1</fieldvalue>
</field>
<field>
<fieldid>MAKE</fieldid>
<fieldtext>Make</fieldtext>
<fieldvalue>Make-up 1</fieldvalue>
</field>
<field>
<fieldid>Model</fieldid>
<fieldtext>Model</fieldtext>
<fieldvalue>750i</fieldvalue>
</field>
<field>
<fieldid>Brand</fieldid>
<fieldtext>Brand</fieldtext>
<fieldvalue>Toyota</fieldvalue>
</field>
</detailrow>
<detailrow detailrowid="bbbb" stylemarker="1">
<field>
<fieldid>LEVEL</fieldid>
<fieldtext>Level</fieldtext>
<fieldvalue>2</fieldvalue>
</field>
<field>
<fieldid>MAKE</fieldid>
<fieldtext>Make</fieldtext>
<fieldvalue>Make-up 2</fieldvalue>
</field>
<field>
<fieldid>Model</fieldid>
<fieldtext>Model</fieldtext>
<fieldvalue>750j</fieldvalue>
</field>
<field>
<fieldid>Brand</fieldid>
<fieldtext>Brand</fieldtext>
<fieldvalue>Honda</fieldvalue>
</field>
</detailrow>
<detailrow detailrowid="cccc" stylemarker="0">
<field>
<fieldid>LEVEL</fieldid>
<fieldtext>Level</fieldtext>
<fieldvalue>3</fieldvalue>
</field>
<field>
<fieldid>MAKE</fieldid>
<fieldtext>Make</fieldtext>
<fieldvalue>Make-up 3</fieldvalue>
</field>
<field>
<fieldid>Model</fieldid>
<fieldtext>Model</fieldtext>
<fieldvalue>750k</fieldvalue>
</field>
<field>
<fieldid>Brand</fieldid>
<fieldtext>Brand</fieldtext>
<fieldvalue>BMW</fieldvalue>
</field>
</detailrow>
</fieldvalue>
<fieldvalue2>[NULL]</fieldvalue2>
<type>DynamicDetailsField</type>
<sequence>4</sequence>
</field>
<field>
<fieldId>F</fieldId>
<fieldtext>Annual Expense</fieldtext>
<fieldvalue/>
<fieldvalue2>[NULL]</fieldvalue2>
<type>SectionTitle</type>
<sequence>5</sequence>
<stylemarker>1</stylemarker>
</field>
<field>
<fieldId/>
<fieldtext/>
<fieldvalue>Local Currency</fieldvalue>
<fieldvalue2>Corporate Currency</fieldvalue2>
<type>CorpHeader</type>
<sequence>5</sequence>
<stylemarker>1</stylemarker>
</field>
<field>
<fieldId>G</fieldId>
<fieldtext>Company Service Cost</fieldtext>
<fieldvalue>1</fieldvalue>
<fieldvalue2>100</fieldvalue2>
<type>LocalCurrencyField</type>
<sequence>6</sequence>
<stylemarker>0</stylemarker>
</field>
<field>
<fieldId>H</fieldId>
<fieldtext>Interest Cost</fieldtext>
<fieldvalue>2</fieldvalue>
<fieldvalue2>200</fieldvalue2>
<type>LocalCurrencyField</type>
<sequence>8</sequence>
<stylemarker>0</stylemarker>
</field>
<field>
<fieldId>ExchangeRate</fieldId>
<fieldtext>Exchange Rate</fieldtext>
<fieldvalue>125.55</fieldvalue>
<fieldvalue2>[NULL]</fieldvalue2>
<type>CorpCurrencyField</type>
<sequence>10</sequence>
<stylemarker>0</stylemarker>
</field>
<field>
<fieldId>I</fieldId>
<fieldtext>Other Adustments</fieldtext>
<fieldvalue>3</fieldvalue>
<fieldvalue2>300</fieldvalue2>
<type>LocalCurrencyField</type>
<sequence>11</sequence>
<stylemarker>1</stylemarker>
</field>
<field>
<fieldId/>
<fieldtext/>
<fieldvalue>
<header label="Market Value of Assets">
<text>A</text>
<text>B</text>
<text>C</text>
<text>D</text>
</header>
</fieldvalue>
<fieldvalue2>[NULL]</fieldvalue2>
<type>Header</type>
<sequence>1</sequence>
<stylemarker>1</stylemarker>
</field>
<field>
<fieldId>BTAB</fieldId>
<fieldtext>Breakdown of Total Assets Between</fieldtext>
<fieldvalue>[NULL]</fieldvalue>
<fieldvalue2>[NULL]</fieldvalue2>
<type>SectionTitle</type>
<sequence>1</sequence>
<stylemarker>0</stylemarker>
</field>
<field>
<fieldId>Equities</fieldId>
<fieldtext>Equities</fieldtext>
<fieldvalue>[NULL]</fieldvalue>
<fieldvalue2>[NULL]</fieldvalue2>
<type>SectionTitle</type>
<sequence>1</sequence>
<stylemarker>1</stylemarker>
</field>
<field>
<fieldId>[NULL]</fieldId>
<fieldtext>[NULL]</fieldtext>
<fieldvalue>
<detailrow detailrowid="aaaa" text="Local Country Equities" stylemarker="0">
<field>
<fieldid>LCEA</fieldid>
<fieldtext>LCEA</fieldtext>
<fieldvalue>Local Country Equities - A</fieldvalue>
</field>
<field>
<fieldid>LCEB</fieldid>
<fieldtext>LCEB</fieldtext>
<fieldvalue>Local Country Equities - B</fieldvalue>
</field>
<field>
<fieldid>LCEC</fieldid>
<fieldtext>LCEC</fieldtext>
<fieldvalue>Local Country Equities - C</fieldvalue>
</field>
<field>
<fieldid>LCED</fieldid>
<fieldtext>LCED</fieldtext>
<fieldvalue>Local Country Equities - D</fieldvalue>
</field>
</detailrow>
<detailrow detailrowid="bbbb" text="-Large Cap" stylemarker="1">
<field>
<fieldid>LCELCA</fieldid>
<fieldtext>LCELCA</fieldtext>
<fieldvalue>Local Country Equities (Large Cap)- A</fieldvalue>
</field>
<field>
<fieldid>LCELCB</fieldid>
<fieldtext>LCELCB</fieldtext>
<fieldvalue>Local Country Equities (Large Cap)- B</fieldvalue>
</field>
<field>
<fieldid>LCELCC</fieldid>
<fieldtext>LCELCC</fieldtext>
<fieldvalue>Local Country Equities (Large Cap)- C</fieldvalue>
</field>
<field>
<fieldid>LCELCD</fieldid>
<fieldtext>LCELCD</fieldtext>
<fieldvalue>Local Country Equities (Large Cap)- D</fieldvalue>
</field>
</detailrow>
<detailrow detailrowid="cccc" text="-Mid Cap" stylemarker="0">
<field>
<fieldid>LCEMCA</fieldid>
<fieldtext>LCEMCA</fieldtext>
<fieldvalue>Local Country Equities (Mid Cap) - A</fieldvalue>
</field>
<field>
<fieldid>LCEMCB</fieldid>
<fieldtext>LCEMCB</fieldtext>
<fieldvalue>Local Country Equities (Mid Cap) - B</fieldvalue>
</field>
<field>
<fieldid>LCEMCC</fieldid>
<fieldtext>LCEMCC</fieldtext>
<fieldvalue>Local Country Equities (Mid Cap) - C</fieldvalue>
</field>
<field>
<fieldid>LCEMCD</fieldid>
<fieldtext>LCEMCD</fieldtext>
<fieldvalue>Local Country Equities (Mid Cap) - D</fieldvalue>
</field>
</detailrow>
</fieldvalue>
<fieldvalue2>[NULL]</fieldvalue2>
<type>FixedDetailsField</type>
<sequence>4</sequence>
</field>
<field>
<fieldId>X</fieldId>
<fieldtext>Date Completed By</fieldtext>
<fieldvalue>Jan</fieldvalue>
<fieldvalue2>[NULL]</fieldvalue2>
<type>SectionTitle</type>
<sequence>13</sequence>
<stylemarker>1</stylemarker>
</field>
<field>
<fieldId>Y</fieldId>
<fieldtext>Completion Date</fieldtext>
<fieldvalue>19-Aug-2009</fieldvalue>
<fieldvalue2>[NULL]</fieldvalue2>
<type>NormalField</type>
<sequence>14</sequence>
<stylemarker>0</stylemarker>
</field>
<field>
<fieldId>Z</fieldId>
<fieldtext>Current Status</fieldtext>
<fieldvalue>No data</fieldvalue>
<fieldvalue2>[NULL]</fieldvalue2>
<type>NormalField</type>
<stylemarker>1</stylemarker>
</field>
</plan>
<plan planid="YYYY" plantype="CAR" breadcrumb="Jan > Health Care > CAR > 07-Jul-2009" plantypedescription="CAR">
<field>
<fieldId>A</fieldId>
<fieldtext>CAR</fieldtext>
<fieldvalue/>
<fieldvalue2>[NULL]</fieldvalue2>
<type>SectionTitle</type>
<sequence>1</sequence>
<stylemarker>0</stylemarker>
</field>
<field>
<fieldId>PlanName</fieldId>
<fieldtext>Name of Plan</fieldtext>
<fieldvalue>CAR Plan</fieldvalue>
<fieldvalue2>[NULL]</fieldvalue2>
<type>NormalField</type>
<sequence>2</sequence>
<stylemarker>1</stylemarker>
</field>
<field>
<fieldId>ResultsAsOf</fieldId>
<fieldtext>Result as of</fieldtext>
<!--fieldvalue><b>BATTLE PLAN<b></fieldvalue-->
<fieldvalue>11-Mar-2009</fieldvalue>
<fieldvalue2>[NULL]</fieldvalue2>
<type>NormalField</type>
<sequence>3</sequence>
<stylemarker>0</stylemarker>
</field>
<field>
<fieldId>[NULL]</fieldId>
<fieldtext>[NULL]</fieldtext>
<fieldvalue>
<detailrow detailrowid="eeee" stylemarker="0">
<field>
<fieldid>LEVEL</fieldid>
<fieldtext>Level</fieldtext>
<fieldvalue>CAR1</fieldvalue>
</field>
<field>
<fieldid>MAKE</fieldid>
<fieldtext>Make</fieldtext>
<fieldvalue>CARMake-up 1</fieldvalue>
</field>
<field>
<fieldid>Model</fieldid>
<fieldtext>Model</fieldtext>
<fieldvalue>CAR 750i</fieldvalue>
</field>
<field>
<fieldid>Brand</fieldid>
<fieldtext>Brand</fieldtext>
<fieldvalue>CAR Toyota</fieldvalue>
</field>
</detailrow>
<detailrow detailrowid="ffff" stylemarker="1">
<field>
<fieldid>LEVEL</fieldid>
<fieldtext>Level</fieldtext>
<fieldvalue>CAR 2</fieldvalue>
</field>
<field>
<fieldid>MAKE</fieldid>
<fieldtext>Make</fieldtext>
<fieldvalue>CAR Make-up 2</fieldvalue>
</field>
<field>
<fieldid>Model</fieldid>
<fieldtext>Model</fieldtext>
<fieldvalue>CAR 750j</fieldvalue>
</field>
<field>
<fieldid>Brand</fieldid>
<fieldtext>Brand</fieldtext>
<fieldvalue>CAR Honda</fieldvalue>
</field>
</detailrow>
<detailrow detailrowid="gggg" stylemarker="0">
<field>
<fieldid>LEVEL</fieldid>
<fieldtext>Level</fieldtext>
<fieldvalue>CAR 3</fieldvalue>
</field>
<field>
<fieldid>MAKE</fieldid>
<fieldtext>Make</fieldtext>
<fieldvalue>CAR Make-up 3</fieldvalue>
</field>
<field>
<fieldid>Model</fieldid>
<fieldtext>Model</fieldtext>
<fieldvalue>CAR 750k</fieldvalue>
</field>
<field>
<fieldid>Brand</fieldid>
<fieldtext>Brand</fieldtext>
<fieldvalue>CAR BMW</fieldvalue>
</field>
</detailrow>
</fieldvalue>
<fieldvalue2>[NULL]</fieldvalue2>
<type>DynamicDetailsField</type>
<sequence>4</sequence>
</field>
<field>
<fieldId>F</fieldId>
<fieldtext>CAR Annual Expense</fieldtext>
<fieldvalue/>
<fieldvalue2>[NULL]</fieldvalue2>
<type>SectionTitle</type>
<sequence>5</sequence>
<stylemarker>1</stylemarker>
</field>
<field>
<fieldId/>
<fieldtext/>
<fieldvalue>CAR Local Currency</fieldvalue>
<fieldvalue2>CAR Corporate Currency</fieldvalue2>
<type>CorpHeader</type>
<sequence>5</sequence>
<stylemarker>1</stylemarker>
</field>
<field>
<fieldId>G</fieldId>
<fieldtext>CAR Company Service Cost</fieldtext>
<fieldvalue>CAR 1</fieldvalue>
<fieldvalue2>CAR 100</fieldvalue2>
<type>LocalCurrencyField</type>
<sequence>6</sequence>
<stylemarker>0</stylemarker>
</field>
<field>
<fieldId>H</fieldId>
<fieldtext>CAR Interest Cost</fieldtext>
<fieldvalue>CAR 2</fieldvalue>
<fieldvalue2>CAR 200</fieldvalue2>
<type>LocalCurrencyField</type>
<sequence>8</sequence>
<stylemarker>0</stylemarker>
</field>
<field>
<fieldId>ExchangeRate</fieldId>
<fieldtext>CAR Exchange Rate</fieldtext>
<fieldvalue>CAR 125.55</fieldvalue>
<fieldvalue2>[NULL]</fieldvalue2>
<type>CorpCurrencyField</type>
<sequence>10</sequence>
<stylemarker>0</stylemarker>
</field>
<field>
<fieldId>I</fieldId>
<fieldtext>CAR Other Adustments</fieldtext>
<fieldvalue>CAR 3</fieldvalue>
<fieldvalue2>CAR 300</fieldvalue2>
<type>LocalCurrencyField</type>
<sequence>11</sequence>
<stylemarker>1</stylemarker>
</field>
<field>
<fieldId/>
<fieldtext/>
<fieldvalue>
<header label="CAR Market Value of Assets">
<text>CAR A</text>
<text>CAR B</text>
<text>CAR C</text>
<text>CAR D</text>
</header>
</fieldvalue>
<fieldvalue2>[NULL]</fieldvalue2>
<type>Header</type>
<sequence>1</sequence>
<stylemarker>1</stylemarker>
</field>
<field>
<fieldId>BTAB</fieldId>
<fieldtext>CAR Breakdown of Total Assets Between</fieldtext>
<fieldvalue>[NULL]</fieldvalue>
<fieldvalue2>[NULL]</fieldvalue2>
<type>SectionTitle</type>
<sequence>1</sequence>
<stylemarker>0</stylemarker>
</field>
<field>
<fieldId>Equities</fieldId>
<fieldtext>CAR Equities</fieldtext>
<fieldvalue>[NULL]</fieldvalue>
<fieldvalue2>[NULL]</fieldvalue2>
<type>SectionTitle</type>
<sequence>1</sequence>
<stylemarker>1</stylemarker>
</field>
<field>
<fieldId>[NULL]</fieldId>
<fieldtext>[NULL]</fieldtext>
<fieldvalue>
<detailrow detailrowid="aaaa" text="Local Country Equities" stylemarker="0">
<field>
<fieldid>LCEA</fieldid>
<fieldtext>CAR LCEA</fieldtext>
<fieldvalue>CAR Local Country Equities - A</fieldvalue>
</field>
<field>
<fieldid>LCEB</fieldid>
<fieldtext>CAR LCEB</fieldtext>
<fieldvalue>CAR Local Country Equities - B</fieldvalue>
</field>
<field>
<fieldid>LCEC</fieldid>
<fieldtext>CAR LCEC</fieldtext>
<fieldvalue>CAR Local Country Equities - C</fieldvalue>
</field>
<field>
<fieldid>LCED</fieldid>
<fieldtext>CAR LCED</fieldtext>
<fieldvalue>CAR Local Country Equities - D</fieldvalue>
</field>
</detailrow>
<detailrow detailrowid="bbbb" text="-Large Cap" stylemarker="1">
<field>
<fieldid>LCELCA</fieldid>
<fieldtext>CAR LCELCA</fieldtext>
<fieldvalue>CAR Local Country Equities (Large Cap)- A</fieldvalue>
</field>
<field>
<fieldid>LCELCB</fieldid>
<fieldtext>CAR LCELCB</fieldtext>
<fieldvalue>CAR Local Country Equities (Large Cap)- B</fieldvalue>
</field>
<field>
<fieldid>LCELCC</fieldid>
<fieldtext>CAR LCELCC</fieldtext>
<fieldvalue>CAR Local Country Equities (Large Cap)- C</fieldvalue>
</field>
<field>
<fieldid>LCELCD</fieldid>
<fieldtext>CAR LCELCD</fieldtext>
<fieldvalue>CAR Local Country Equities (Large Cap)- D</fieldvalue>
</field>
</detailrow>
<detailrow detailrowid="cccc" text="-Mid Cap" stylemarker="0">
<field>
<fieldid>LCEMCA</fieldid>
<fieldtext>CAR LCEMCA</fieldtext>
<fieldvalue>CAR Local Country Equities (Mid Cap) - A</fieldvalue>
</field>
<field>
<fieldid>LCEMCB</fieldid>
<fieldtext>CAR LCEMCB</fieldtext>
<fieldvalue>CAR Local Country Equities (Mid Cap) - B</fieldvalue>
</field>
<field>
<fieldid>LCEMCC</fieldid>
<fieldtext>CAR LCEMCC</fieldtext>
<fieldvalue>CAR Local Country Equities (Mid Cap) - C</fieldvalue>
</field>
<field>
<fieldid>LCEMCD</fieldid>
<fieldtext>CAR LCEMCD</fieldtext>
<fieldvalue>CAR Local Country Equities (Mid Cap) - D</fieldvalue>
</field>
</detailrow>
</fieldvalue>
<fieldvalue2>[NULL]</fieldvalue2>
<type>FixedDetailsField</type>
<sequence>4</sequence>
</field>
<field>
<fieldId>X</fieldId>
<fieldtext>CAR Date Completed By</fieldtext>
<fieldvalue>CAR Jan</fieldvalue>
<fieldvalue2>[NULL]</fieldvalue2>
<type>SectionTitle</type>
<sequence>13</sequence>
<stylemarker>1</stylemarker>
</field>
<field>
<fieldId>Y</fieldId>
<fieldtext>CAR Completion Date</fieldtext>
<fieldvalue>CAR 19-Aug-2009</fieldvalue>
<fieldvalue2>[NULL]</fieldvalue2>
<type>NormalField</type>
<sequence>14</sequence>
<stylemarker>0</stylemarker>
</field>
<field>
<fieldId>Z</fieldId>
<fieldtext>CAR Current Status</fieldtext>
<fieldvalue>CAR No data</fieldvalue>
<fieldvalue2>[NULL]</fieldvalue2>
<type>NormalField</type>
<stylemarker>1</stylemarker>
</field>
</plan>
</records>
2. Side-By-Side.XSL
Code:
<?xml version="1.0"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="html" indent="yes"/>
<xsl:template match="/">
<html>
<head><title>Test</title></head>
<body>
<xsl:variable name="r" select="records"/>
<!--xsl:key name="f" match="records" use="@plantype" /-->
<xsl:variable name="color1" select="'#D6F2EE'" /> <!-- light green-->
<xsl:variable name="color2" select="'#F5F5F5'" /> <!-- white-->
<xsl:variable name="sectioncolor" select="'#0B2265'" /> <!-- white-->
<xsl:variable name="dynamicdetailcolor" select="'#6D4488'" />
<xsl:variable name="headercolor" select="'skyblue'" />
<style>
.rowstyle1 { background-color: #D6F2EE;min-height: 50px;font-size: 10px;vertical-align: middle;padding-left: 4px;font-family: Arial, Helvetica, sans-serif;border-top: solid 1px black;border-bottom: solid 1px black;border-left: solid 1px black;border-right: solid 1px black;}
.rowstyle2 { background-color: #F5F5F5;min-height: 50px;font-size: 10px;vertical-align: middle;padding-left: 4px;font-family: Arial, Helvetica, sans-serif;border-top: solid 1px black;border-bottom: solid 1px black;border-left: solid 1px black;border-right: solid 1px black;' }
</style>
<xsl:variable name="rowstyle3" select="'background-color: #D6F2EE;'" />
<xsl:variable name="green" select="'#D6F2EE'" />
<!--xsl:variable name="rowstyle1" select="background-color: #D6F2EE;min-height: 50px;font-size: 10px;vertical-align: middle;padding-left: 4px;font-family: Arial, Helvetica, sans-serif;border-top: solid 1px black;border-bottom: solid 1px black;border-left: solid 1px black;border-right: solid 1px black;" /-->
<!--xsl:variable name="rowstyle2" select="'background-color: #F5F5F5;min-height: 50px;font-size: 10px;vertical-align: middle;padding-left: 4px;font-family: Arial, Helvetica, sans-serif;border-top: solid 1px black;border-bottom: solid 1px black;border-left: solid 1px black;border-right: solid 1px black;'" /-->
<table border="1" width="100%">
<tr bgcolor="{$color2}">
<td></td>
<xsl:for-each select="records/plan">
<td><xsl:value-of select="@breadcrumb"/></td>
</xsl:for-each>
<xsl:for-each select="records/plan">
<td><xsl:value-of select="@breadcrumb"/></td>
</xsl:for-each>
</tr>
<xsl:for-each select="records/plan[1]/field">
<xsl:variable name="color">
<xsl:choose>
<xsl:when test="position() mod 2 = 1">#D6F2EE</xsl:when>
<xsl:otherwise>#F5F5F5</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<!--xsl:variable name="fieldposition" select="position()" />
<xsl:variable name="style" select="if ((position mod 2) = 1) then '#aaccff' else '#ffccaa'"/-->
<xsl:variable name="p" select="position()"/>
<xsl:choose>
<xsl:when test="type = 'SectionTitle'">
<tr>
<td colspan='100%' bgcolor="{$sectioncolor}" style="color:white;"><xsl:value-of select="fieldtext"/></td>
</tr>
</xsl:when>
<xsl:when test="type = 'NormalField'">
<tr bgcolor="{$color}">
<!--td width='20%'><xsl:value-of select="fieldtext"/></td-->
<!--td width='20%' class="rowstyle1"><xsl:value-of select="fieldtext"/></td-->
<td width='20%'><xsl:value-of select="fieldtext"/></td>
<!--td width='20%' bgcolor="{$style1}"><xsl:value-of select="fieldtext"/></td-->
<xsl:for-each select="$r/plan">
<td><xsl:value-of select="field[$p]/fieldvalue" disable-output-escaping="yes"/></td>
</xsl:for-each>
<xsl:for-each select="$r/plan">
<td><xsl:value-of select="'N/A'"/></td>
</xsl:for-each>
</tr>
</xsl:when>
<xsl:when test="type = 'CorpHeader'">
<tr bgcolor="{$headercolor}">
<td width='20%' bgcolor="{$color}"></td>
<xsl:for-each select="$r/plan">
<td><xsl:value-of select="field[$p]/fieldvalue"/></td>
</xsl:for-each>
<xsl:for-each select="$r/plan">
<td><xsl:value-of select="field[$p]/fieldvalue2"/></td>
</xsl:for-each>
</tr>
</xsl:when>
<xsl:when test="type = 'LocalCurrencyField'">
<tr bgcolor="{$color}">
<td width='20%'><xsl:value-of select="fieldtext"/></td>
<xsl:for-each select="$r/plan">
<td><xsl:value-of select="field[$p]/fieldvalue"/></td>
</xsl:for-each>
<xsl:for-each select="$r/plan">
<td><xsl:value-of select="field[$p]/fieldvalue2"/></td>
</xsl:for-each>
</tr>
</xsl:when>
<xsl:when test="type = 'CorpCurrencyField' and fieldvalue2='[NULL]'">
<tr bgcolor="{$color}">
<td width='20%'><xsl:value-of select="fieldtext"/></td>
<xsl:for-each select="$r/plan">
<td><xsl:value-of select="'N/A'"/></td>
</xsl:for-each>
<xsl:for-each select="$r/plan">
<td><xsl:value-of select="field[$p]/fieldvalue"/></td>
</xsl:for-each>
</tr>
</xsl:when>
<xsl:when test="type='Header'">
<tr bgcolor="{$sectioncolor}">
<td width="20%">
<table border="1" width="100%" cellpadding="0" cellspacing="0">
<tr>
<td style="color:white;"><b><xsl:value-of select="fieldvalue/header/@label"/></b></td>
</tr>
</table>
</td>
<xsl:for-each select="$r/plan">
<td>
<table border="1" cellpadding="0" cellspacing="0" width="100%">
<tr>
<xsl:for-each select="field[$p]/fieldvalue/header/text">
<td align="center" style="color:white;">
<b><xsl:value-of select="."/></b>
</td>
</xsl:for-each>
</tr>
</table>
</td>
</xsl:for-each>
<xsl:for-each select="$r/plan">
<td style="color:white;">N/A</td>
</xsl:for-each>
</tr>
</xsl:when>
<xsl:when test="type='DynamicDetailsField'">
<tr bgcolor="{$color}">
<td width='20%'></td>
<xsl:for-each select="$r/plan">
<td>
<table border="1" width="100%">
<tr bgcolor="{$dynamicdetailcolor}">
<xsl:for-each select="field[$p]/fieldvalue/detailrow[1]/field">
<td style="color:white;">
<xsl:value-of select="fieldtext"/>
</td>
</xsl:for-each>
</tr>
<xsl:for-each select="field[$p]/fieldvalue/detailrow">
<xsl:variable name="detailrowcolor">
<xsl:choose>
<xsl:when test="position() mod 2 = 1">#D6F2EE</xsl:when>
<xsl:otherwise>#F5F5F5</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<tr bgcolor="{$detailrowcolor}">
<xsl:for-each select="field">
<td>
<xsl:value-of select="fieldvalue"/>
</td>
</xsl:for-each>
</tr>
</xsl:for-each>
</table>
</td>
</xsl:for-each>
<xsl:for-each select="$r/plan">
<td>N/A</td>
</xsl:for-each>
</tr>
</xsl:when>
<xsl:when test="type='FixedDetailsField'">
<xsl:for-each select="fieldvalue/detailrow">
<xsl:variable name="detailrowposition" select="position()"/>
<xsl:variable name="detailrowcolor">
<xsl:choose>
<xsl:when test="position() mod 2 = 1">#D6F2EE</xsl:when>
<xsl:otherwise>#F5F5F5</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<tr bgcolor="{$detailrowcolor}">
<td width="20%">
<table border="0" width="100%" cellpadding="0" cellspacing="0">
<tr>
<td><xsl:value-of select="@text"/></td>
</tr>
</table>
</td>
<xsl:for-each select="$r/plan">
<td>
<table border="1" width="100%" cellpadding="0" cellspacing="0">
<tr>
<xsl:for-each select="field[$p]/fieldvalue/detailrow[$detailrowposition]/field">
<td width="25%">
<xsl:value-of select="fieldvalue"/>
</td>
</xsl:for-each>
</tr>
</table>
</td>
</xsl:for-each>
<xsl:for-each select="$r/plan">
<td>N/A</td>
</xsl:for-each>
</tr>
</xsl:for-each>
</xsl:when>
</xsl:choose>
</xsl:for-each>
</table>
</body>
</html>
</xsl:template>
</xsl:stylesheet>
3. Output HTML
Code:
<html><head> <META http-equiv="Content-Type" content="text/html; charset=UTF-16"><title>Test</title></head><body><style>
.rowstyle1 { background-color: #D6F2EE;min-height: 50px;font-size: 10px;vertical-align: middle;padding-left: 4px;font-family: Arial, Helvetica, sans-serif;border-top: solid 1px black;border-bottom: solid 1px black;border-left: solid 1px black;border-right: solid 1px black;}
.rowstyle2 { background-color: #F5F5F5;min-height: 50px;font-size: 10px;vertical-align: middle;padding-left: 4px;font-family: Arial, Helvetica, sans-serif;border-top: solid 1px black;border-bottom: solid 1px black;border-left: solid 1px black;border-right: solid 1px black;' }
</style><table border="1" width="100%">
<tr bgcolor="#F5F5F5">
<td /><td>Jan > Health Care > FAS 106 > 06-Jul-2009</td><td>Jan > Health Care > CAR > 07-Jul-2009</td><td>Jan > Health Care > FAS 106 > 06-Jul-2009</td><td>Jan > Health Care > CAR > 07-Jul-2009</td>
</tr>
<tr><td colspan="100%" bgcolor="#0B2265" style="color:white;">Health Care Fas 158</td>
</tr>
<tr bgcolor="#F5F5F5"><td width="20%">Name of Plan</td><td>Battle Plan</td><td>CAR Plan</td><td>N/A</td><td>N/A</td>
</tr>
<tr bgcolor="#D6F2EE"><td width="20%">Result as of</td><td>12-Mar-2009</td><td>11-Mar-2009</td><td>N/A</td><td>N/A</td>
</tr>
<tr bgcolor="#F5F5F5">
<td width="20%" />
<td>
<table border="1" width="100%">
<tr bgcolor="#6D4488"><td style="color:white;">Level</td><td style="color:white;">Make</td><td style="color:white;">Model</td><td style="color:white;">Brand</td>
</tr>
<tr bgcolor="#D6F2EE"><td>1</td><td>Make-up 1</td><td>750i</td><td>Toyota</td>
</tr>
<tr bgcolor="#F5F5F5"><td>2</td><td>Make-up 2</td><td>750j</td><td>Honda</td>
</tr>
<tr bgcolor="#D6F2EE"><td>3</td><td>Make-up 3</td><td>750k</td><td>BMW</td>
</tr>
</table>
</td>
<td>
<table border="1" width="100%">
<tr bgcolor="#6D4488"><td style="color:white;">Level</td><td style="color:white;">Make</td><td style="color:white;">Model</td><td style="color:white;">Brand</td>
</tr>
<tr bgcolor="#D6F2EE"><td>CAR1</td><td>CARMake-up 1</td><td>CAR 750i</td><td>CAR Toyota</td>
</tr>
<tr bgcolor="#F5F5F5"><td>CAR 2</td><td>CAR Make-up 2</td><td>CAR 750j</td><td>CAR Honda</td>
</tr>
<tr bgcolor="#D6F2EE"><td>CAR 3</td><td>CAR Make-up 3</td><td>CAR 750k</td><td>CAR BMW</td>
</tr>
</table>
</td><td>N/A</td><td>N/A</td>
</tr>
<tr><td colspan="100%" bgcolor="#0B2265" style="color:white;">Annual Expense</td>
</tr>
<tr bgcolor="skyblue">
<td width="20%" bgcolor="#F5F5F5" /><td>Local Currency</td><td>CAR Local Currency</td><td>Corporate Currency</td><td>CAR Corporate Currency</td>
</tr>
<tr bgcolor="#D6F2EE"><td width="20%">Company Service Cost</td><td>1</td><td>CAR 1</td><td>100</td><td>CAR 100</td>
</tr>
<tr bgcolor="#F5F5F5"><td width="20%">Interest Cost</td><td>2</td><td>CAR 2</td><td>200</td><td>CAR 200</td>
</tr>
<tr bgcolor="#D6F2EE"><td width="20%">Exchange Rate</td><td>N/A</td><td>N/A</td><td>125.55</td><td>CAR 125.55</td>
</tr>
<tr bgcolor="#F5F5F5"><td width="20%">Other Adustments</td><td>3</td><td>CAR 3</td><td>300</td><td>CAR 300</td>
</tr>
<tr bgcolor="#0B2265">
<td width="20%">
<table border="1" width="100%" cellpadding="0" cellspacing="0">
<tr>
<td style="color:white;"><b>Market Value of Assets</b></td>
</tr>
</table>
</td>
<td>
<table border="1" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td align="center" style="color:white;"><b>A</b></td>
<td align="center" style="color:white;"><b>B</b></td>
<td align="center" style="color:white;"><b>C</b></td>
<td align="center" style="color:white;"><b>D</b></td>
</tr>
</table>
</td>
<td>
<table border="1" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td align="center" style="color:white;"><b>CAR A</b></td>
<td align="center" style="color:white;"><b>CAR B</b></td>
<td align="center" style="color:white;"><b>CAR C</b></td>
<td align="center" style="color:white;"><b>CAR D</b></td>
</tr>
</table>
</td><td style="color:white;">N/A</td><td style="color:white;">N/A</td>
</tr>
<tr><td colspan="100%" bgcolor="#0B2265" style="color:white;">Breakdown of Total Assets Between</td>
</tr>
<tr><td colspan="100%" bgcolor="#0B2265" style="color:white;">Equities</td>
</tr>
<tr bgcolor="#D6F2EE">
<td width="20%">
<table border="0" width="100%" cellpadding="0" cellspacing="0">
<tr><td>Local Country Equities</td>
</tr>
</table>
</td>
<td>
<table border="1" width="100%" cellpadding="0" cellspacing="0">
<tr><td width="25%">Local Country Equities - A</td><td width="25%">Local Country Equities - B</td><td width="25%">Local Country Equities - C</td><td width="25%">Local Country Equities - D</td>
</tr>
</table>
</td>
<td>
<table border="1" width="100%" cellpadding="0" cellspacing="0">
<tr><td width="25%">CAR Local Country Equities - A</td><td width="25%">CAR Local Country Equities - B</td><td width="25%">CAR Local Country Equities - C</td><td width="25%">CAR Local Country Equities - D</td>
</tr>
</table>
</td><td>N/A</td><td>N/A</td>
</tr>
<tr bgcolor="#F5F5F5">
<td width="20%">
<table border="0" width="100%" cellpadding="0" cellspacing="0">
<tr><td>-Large Cap</td>
</tr>
</table>
</td>
<td>
<table border="1" width="100%" cellpadding="0" cellspacing="0">
<tr><td width="25%">Local Country Equities (Large Cap)- A</td><td width="25%">Local Country Equities (Large Cap)- B</td><td width="25%">Local Country Equities (Large Cap)- C</td><td width="25%">Local Country Equities (Large Cap)- D</td>
</tr>
</table>
</td>
<td>
<table border="1" width="100%" cellpadding="0" cellspacing="0">
<tr><td width="25%">CAR Local Country Equities (Large Cap)- A</td><td width="25%">CAR Local Country Equities (Large Cap)- B</td><td width="25%">CAR Local Country Equities (Large Cap)- C</td><td width="25%">CAR Local Country Equities (Large Cap)- D</td>
</tr>
</table>
</td><td>N/A</td><td>N/A</td>
</tr>
<tr bgcolor="#D6F2EE">
<td width="20%">
<table border="0" width="100%" cellpadding="0" cellspacing="0">
<tr><td>-Mid Cap</td>
</tr>
</table>
</td>
<td>
<table border="1" width="100%" cellpadding="0" cellspacing="0">
<tr><td width="25%">Local Country Equities (Mid Cap) - A</td><td width="25%">Local Country Equities (Mid Cap) - B</td><td width="25%">Local Country Equities (Mid Cap) - C</td><td width="25%">Local Country Equities (Mid Cap) - D</td>
</tr>
</table>
</td>
<td>
<table border="1" width="100%" cellpadding="0" cellspacing="0">
<tr><td width="25%">CAR Local Country Equities (Mid Cap) - A</td><td width="25%">CAR Local Country Equities (Mid Cap) - B</td><td width="25%">CAR Local Country Equities (Mid Cap) - C</td><td width="25%">CAR Local Country Equities (Mid Cap) - D</td>
</tr>
</table>
</td><td>N/A</td><td>N/A</td>
</tr>
<tr><td colspan="100%" bgcolor="#0B2265" style="color:white;">Date Completed By</td>
</tr>
<tr bgcolor="#F5F5F5"><td width="20%">Completion Date</td><td>19-Aug-2009</td><td>CAR 19-Aug-2009</td><td>N/A</td><td>N/A</td>
</tr>
<tr bgcolor="#D6F2EE"><td width="20%">Current Status</td><td>No data</td><td>CAR No data</td><td>N/A</td><td>N/A</td>
</tr>
</table>
</body></html>
4. This is the output HTML I want to achieve. I want it to be grouped by plantype. ALL HC FAS plantypes should be in one table and ALL CAR plantypes should be in another table.
Code:
<html><head> <META http-equiv="Content-Type" content="text/html; charset=UTF-16"><title>Test</title></head><body><style>
.rowstyle1 { background-color: #D6F2EE;min-height: 50px;font-size: 10px;vertical-align: middle;padding-left: 4px;font-family: Arial, Helvetica, sans-serif;border-top: solid 1px black;border-bottom: solid 1px black;border-left: solid 1px black;border-right: solid 1px black;}
.rowstyle2 { background-color: #F5F5F5;min-height: 50px;font-size: 10px;vertical-align: middle;padding-left: 4px;font-family: Arial, Helvetica, sans-serif;border-top: solid 1px black;border-bottom: solid 1px black;border-left: solid 1px black;border-right: solid 1px black;' }
</style><table border="1" width="100%">
<tr bgcolor="#F5F5F5">
<td /><td>Jan > Health Care > FAS 106 > 06-Jul-2009</td><td>Jan > Health Care > FAS 106 > 06-Jul-2009</td>
</tr>
<tr><td colspan="100%" bgcolor="#0B2265" style="color:white;">Health Care Fas 158</td>
</tr>
<tr bgcolor="#F5F5F5"><td width="20%">Name of Plan</td><td>Battle Plan</td><td>N/A</td>
</tr>
<tr bgcolor="#D6F2EE"><td width="20%">Result as of</td><td>12-Mar-2009</td><td>N/A</td>
</tr>
<tr bgcolor="#F5F5F5">
<td width="20%" />
<td>
<table border="1" width="100%">
<tr bgcolor="#6D4488"><td style="color:white;">Level</td><td style="color:white;">Make</td><td style="color:white;">Model</td><td style="color:white;">Brand</td>
</tr>
<tr bgcolor="#D6F2EE"><td>1</td><td>Make-up 1</td><td>750i</td><td>Toyota</td>
</tr>
<tr bgcolor="#F5F5F5"><td>2</td><td>Make-up 2</td><td>750j</td><td>Honda</td>
</tr>
<tr bgcolor="#D6F2EE"><td>3</td><td>Make-up 3</td><td>750k</td><td>BMW</td>
</tr>
</table>
</td><td>N/A</td>
</tr>
<tr><td colspan="100%" bgcolor="#0B2265" style="color:white;">Annual Expense</td>
</tr>
<tr bgcolor="skyblue">
<td width="20%" bgcolor="#F5F5F5" /><td>Local Currency</td><td>Corporate Currency</td>
</tr>
<tr bgcolor="#D6F2EE"><td width="20%">Company Service Cost</td><td>1</td><td>100</td>
</tr>
<tr bgcolor="#F5F5F5"><td width="20%">Interest Cost</td><td>2</td><td>200</td>
</tr>
<tr bgcolor="#D6F2EE"><td width="20%">Exchange Rate</td><td>N/A</td><td>125.55</td>
</tr>
<tr bgcolor="#F5F5F5"><td width="20%">Other Adustments</td><td>3</td><td>300</td>
</tr>
<tr bgcolor="#0B2265">
<td width="20%">
<table border="1" width="100%" cellpadding="0" cellspacing="0">
<tr>
<td style="color:white;"><b>Market Value of Assets</b></td>
</tr>
</table>
</td>
<td>
<table border="1" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td align="center" style="color:white;"><b>A</b></td>
<td align="center" style="color:white;"><b>B</b></td>
<td align="center" style="color:white;"><b>C</b></td>
<td align="center" style="color:white;"><b>D</b></td>
</tr>
</table>
</td><td style="color:white;">N/A</td>
</tr>
<tr><td colspan="100%" bgcolor="#0B2265" style="color:white;">Breakdown of Total Assets Between</td>
</tr>
<tr><td colspan="100%" bgcolor="#0B2265" style="color:white;">Equities</td>
</tr>
<tr bgcolor="#D6F2EE">
<td width="20%">
<table border="0" width="100%" cellpadding="0" cellspacing="0">
<tr><td>Local Country Equities</td>
</tr>
</table>
</td>
<td>
<table border="1" width="100%" cellpadding="0" cellspacing="0">
<tr><td width="25%">Local Country Equities - A</td><td width="25%">Local Country Equities - B</td><td width="25%">Local Country Equities - C</td><td width="25%">Local Country Equities - D</td>
</tr>
</table>
</td><td>N/A</td>
</tr>
<tr bgcolor="#F5F5F5">
<td width="20%">
<table border="0" width="100%" cellpadding="0" cellspacing="0">
<tr><td>-Large Cap</td>
</tr>
</table>
</td>
<td>
<table border="1" width="100%" cellpadding="0" cellspacing="0">
<tr><td width="25%">Local Country Equities (Large Cap)- A</td><td width="25%">Local Country Equities (Large Cap)- B</td><td width="25%">Local Country Equities (Large Cap)- C</td><td width="25%">Local Country Equities (Large Cap)- D</td>
</tr>
</table>
</td><td>N/A</td>
</tr>
<tr bgcolor="#D6F2EE">
<td width="20%">
<table border="0" width="100%" cellpadding="0" cellspacing="0">
<tr><td>-Mid Cap</td>
</tr>
</table>
</td>
<td>
<table border="1" width="100%" cellpadding="0" cellspacing="0">
<tr><td width="25%">Local Country Equities (Mid Cap) - A</td><td width="25%">Local Country Equities (Mid Cap) - B</td><td width="25%">Local Country Equities (Mid Cap) - C</td><td width="25%">Local Country Equities (Mid Cap) - D</td>
</tr>
</table>
</td><td>N/A</td>
</tr>
<tr><td colspan="100%" bgcolor="#0B2265" style="color:white;">Date Completed By</td>
</tr>
<tr bgcolor="#F5F5F5"><td width="20%">Completion Date</td><td>19-Aug-2009</td><td>N/A</td>
</tr>
<tr bgcolor="#D6F2EE"><td width="20%">Current Status</td><td>No data</td><td>N/A</td>
</tr>
</table><table border="1" width="100%">
<tr bgcolor="#F5F5F5">
<td /><td>Jan > Health Care > CAR > 07-Jul-2009</td><td>Jan > Health Care > CAR > 07-Jul-2009</td>
</tr>
<tr><td colspan="100%" bgcolor="#0B2265" style="color:white;">CAR</td>
</tr>
<tr bgcolor="#F5F5F5"><td width="20%">Name of Plan</td><td>CAR Plan</td><td>N/A</td>
</tr>
<tr bgcolor="#D6F2EE"><td width="20%">Result as of</td><td>11-Mar-2009</td><td>N/A</td>
</tr>
<tr bgcolor="#F5F5F5">
<td width="20%" />
<td>
<table border="1" width="100%">
<tr bgcolor="#6D4488"><td style="color:white;">Level</td><td style="color:white;">Make</td><td style="color:white;">Model</td><td style="color:white;">Brand</td>
</tr>
<tr bgcolor="#D6F2EE"><td>CAR1</td><td>CARMake-up 1</td><td>CAR 750i</td><td>CAR Toyota</td>
</tr>
<tr bgcolor="#F5F5F5"><td>CAR 2</td><td>CAR Make-up 2</td><td>CAR 750j</td><td>CAR Honda</td>
</tr>
<tr bgcolor="#D6F2EE"><td>CAR 3</td><td>CAR Make-up 3</td><td>CAR 750k</td><td>CAR BMW</td>
</tr>
</table>
</td><td>N/A</td>
</tr>
<tr><td colspan="100%" bgcolor="#0B2265" style="color:white;">CAR Annual Expense</td>
</tr>
<tr bgcolor="skyblue">
<td width="20%" bgcolor="#F5F5F5" /><td>CAR Local Currency</td><td>CAR Corporate Currency</td>
</tr>
<tr bgcolor="#D6F2EE"><td width="20%">CAR Company Service Cost</td><td>CAR 1</td><td>CAR 100</td>
</tr>
<tr bgcolor="#F5F5F5"><td width="20%">CAR Interest Cost</td><td>CAR 2</td><td>CAR 200</td>
</tr>
<tr bgcolor="#D6F2EE"><td width="20%">CAR Exchange Rate</td><td>N/A</td><td>CAR 125.55</td>
</tr>
<tr bgcolor="#F5F5F5"><td width="20%">CAR Other Adustments</td><td>CAR 3</td><td>CAR 300</td>
</tr>
<tr bgcolor="#0B2265">
<td width="20%">
<table border="1" width="100%" cellpadding="0" cellspacing="0">
<tr>
<td style="color:white;"><b>CAR Market Value of Assets</b></td>
</tr>
</table>
</td>
<td>
<table border="1" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td align="center" style="color:white;"><b>CAR A</b></td>
<td align="center" style="color:white;"><b>CAR B</b></td>
<td align="center" style="color:white;"><b>CAR C</b></td>
<td align="center" style="color:white;"><b>CAR D</b></td>
</tr>
</table>
</td><td style="color:white;">N/A</td>
</tr>
<tr><td colspan="100%" bgcolor="#0B2265" style="color:white;">CAR Breakdown of Total Assets Between</td>
</tr>
<tr><td colspan="100%" bgcolor="#0B2265" style="color:white;">CAR Equities</td>
</tr>
<tr bgcolor="#D6F2EE">
<td width="20%">
<table border="0" width="100%" cellpadding="0" cellspacing="0">
<tr><td>Local Country Equities</td>
</tr>
</table>
</td>
<td>
<table border="1" width="100%" cellpadding="0" cellspacing="0">
<tr><td width="25%">CAR Local Country Equities - A</td><td width="25%">CAR Local Country Equities - B</td><td width="25%">CAR Local Country Equities - C</td><td width="25%">CAR Local Country Equities - D</td>
</tr>
</table>
</td><td>N/A</td>
</tr>
<tr bgcolor="#F5F5F5">
<td width="20%">
<table border="0" width="100%" cellpadding="0" cellspacing="0">
<tr><td>-Large Cap</td>
</tr>
</table>
</td>
<td>
<table border="1" width="100%" cellpadding="0" cellspacing="0">
<tr><td width="25%">CAR Local Country Equities (Large Cap)- A</td><td width="25%">CAR Local Country Equities (Large Cap)- B</td><td width="25%">CAR Local Country Equities (Large Cap)- C</td><td width="25%">CAR Local Country Equities (Large Cap)- D</td>
</tr>
</table>
</td><td>N/A</td>
</tr>
<tr bgcolor="#D6F2EE">
<td width="20%">
<table border="0" width="100%" cellpadding="0" cellspacing="0">
<tr><td>-Mid Cap</td>
</tr>
</table>
</td>
<td>
<table border="1" width="100%" cellpadding="0" cellspacing="0">
<tr><td width="25%">CAR Local Country Equities (Mid Cap) - A</td><td width="25%">CAR Local Country Equities (Mid Cap) - B</td><td width="25%">CAR Local Country Equities (Mid Cap) - C</td><td width="25%">CAR Local Country Equities (Mid Cap) - D</td>
</tr>
</table>
</td><td>N/A</td>
</tr>
<tr><td colspan="100%" bgcolor="#0B2265" style="color:white;">CAR Date Completed By</td>
</tr>
<tr bgcolor="#F5F5F5"><td width="20%">CAR Completion Date</td><td>CAR 19-Aug-2009</td><td>N/A</td>
</tr>
<tr bgcolor="#D6F2EE"><td width="20%">CAR Current Status</td><td>CAR No data</td><td>N/A</td>
</tr>
</table> </body></html>
|
|
 |