Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


table

From: a@-----------.---------.---
To: NULL
Date: 4/6/2005 11:29:00 PM
I'm trying to get a particular layout in a table.  In the included files, I 
have data that I want in a table where the simple element tags are used as 
column headers and the values are aligned below the column header in separate 
rows.  What I keep getting is all the element values lined up under the first 
column header.  There are three elements, hence 3 values in each column 
before the next template fills the next colum with 3 more values...that's 
what I want anyway...like this...

Header1   Header2   
Value1     Value1
Value2     Value2
Value3     Value3

In my xml file it would look like this:

FixedAssets         StocksInventory
843000000          2000000
1408000000        2000000
1192000000        2000000

Any ideas on how to solve this?
Thanks,

Paul
====================================================
Here is the xml file:
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="C:\Reuters.xslt"?>
<xbrl xmlns="http://www.xbrl.org/2003/instance" 
xmlns:uk-gaap-ci="http://www.xbrl.org/uk/fr/gaap/ci/2004-05-15">
	<uk-gaap-ci:FixedAssets precision="INF" contextRef="cH104inst" 
unitRef="GBP">843000000</uk-gaap-ci:FixedAssets>
	<uk-gaap-ci:FixedAssets precision="INF" contextRef="cH103inst" 
unitRef="GBP">1408000000</uk-gaap-ci:FixedAssets>
	<uk-gaap-ci:FixedAssets precision="INF" contextRef="cFY03inst" 
unitRef="GBP">1192000000</uk-gaap-ci:FixedAssets>
	<uk-gaap-ci:StocksInventory precision="INF" contextRef="cH104inst" 
unitRef="GBP">2000000</uk-gaap-ci:StocksInventory>
	<uk-gaap-ci:StocksInventory precision="INF" contextRef="cH103inst" 
unitRef="GBP">2000000</uk-gaap-ci:StocksInventory>
	<uk-gaap-ci:StocksInventory precision="INF" contextRef="cFY03inst" 
unitRef="GBP">2000000</uk-gaap-ci:StocksInventory>
	<uk-gaap-ci:Debtors precision="INF" contextRef="cH104inst" 
unitRef="GBP">920000000</uk-gaap-ci:Debtors>
	<uk-gaap-ci:Debtors precision="INF" contextRef="cH103inst" 
unitRef="GBP">1369000000</uk-gaap-ci:Debtors>
	<uk-gaap-ci:Debtors precision="INF" contextRef="cFY03inst" 
unitRef="GBP">981000000</uk-gaap-ci:Debtors>
</xbrl>

====================================================
And the xslt:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="2.0" 
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
xmlns:xs="http://www.w3.org/2001/XMLSchema" 
xmlns:n1="http://www.xbrl.org/2003/instance" 
xmlns:uk-gaap-ci="http://www.xbrl.org/uk/fr/gaap/ci/2004-05-15" 
xmlns:fn="http://www.w3.org/2005/02/xpath-functions" 
xmlns:xdt="http://www.w3.org/2005/02/xpath-datatypes">

	<xsl:output version="1.0" encoding="UTF-8" indent="no" 
omit-xml-declaration="no" media-type="text/html"/>
	<xsl:template match="/">
		<html>
			<head>
				<title/>
			</head>
			<body>
				<br/>

				<table border="1">
					<thead>
						<tr>
							<td>FixedAssets</td>
							<td>Stocks Inventory</td>
						</tr>
					</thead>
					<tbody>
						<xsl:for-each select="n1:xbrl">

								<xsl:for-each select="uk-gaap-ci:FixedAssets">
									<tr>
										<td bgcolor="#FF0000">
											<xsl:apply-templates/>
										</td>
									</tr>
								</xsl:for-each>

								<xsl:for-each select="uk-gaap-ci:StocksInventory">
									<tr>
										<td bgcolor="blue">
											<xsl:apply-templates/>
										</td>
									</tr>
								</xsl:for-each>

						</xsl:for-each>
					</tbody>
				</table>

			</body>
		</html>
	</xsl:template>
</xsl:stylesheet>
 
 
 
Expand AllCollapse All  



transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent