473,509 Members | 2,457 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

XML/CSS - using column-span does not work

Hello,

If anyone could help me with this I would highly appreciate it. I've
tried everything and nothing works. What I am trying to do is so damn
basic and it's just frustrating that it seems there's no support for
this. Either that or I'm doing something wrong. Well, enough venting,
here's what I need.

Using this sample XML file (test.xml):

-----------------------------------------------------------------------------------

<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="test.css"?>
<CATALOGS>
<CATALOG>
<HEADER>
<NAME>Catalog A</NAME>
</HEADER>
<HEADER>
<COLUMN>Title</COLUMN>
<COLUMN>Artist</COLUMN>
<COLUMN>Country</COLUMN>
<COLUMN>Company</COLUMN>
<COLUMN>Price</COLUMN>
<COLUMN>Year</COLUMN>
</HEADER>
<CD>
<TITLE>Empire Burlesque</TITLE>
<ARTIST>Bob Dylan</ARTIST>
<COUNTRY>USA</COUNTRY>
<COMPANY>Columbia</COMPANY>
<PRICE>10.90</PRICE>
<YEAR>1985</YEAR>
</CD>
<CD>
<TITLE>Hide your heart</TITLE>
<ARTIST>Bonnie Tyler</ARTIST>
<COUNTRY>UK</COUNTRY>
<COMPANY>CBS Records</COMPANY>
<PRICE>9.90</PRICE>
<YEAR>1988</YEAR>
</CD>
</CATALOG>
<CATALOG>
<CATALOGS>
-----------------------------------------------------------------------------------

and this style sheet to format it (test.css):

-----------------------------------------------------------------------------------

CATALOG { display:table; column-count:6; width:500px;
border-color:#d3d3d3; border-style:solid; border-width:1px;
background-color:#ffffff; margin-left:20px; margin-top:20px; }
HEADER { display:table-row; background-color:#eeeeee; }
NAME { display:table-cell; column-span:6; font-family:Arial;
font-family:Arial; font-weight:bold; font-size:12px; padding:3px; }
COLUMN { display:table-cell; font-family:Arial; font-family:Arial;
font-weight:bold; font-size:12px; padding:3px; }
CD { display:table-row; font-family:Arial; font-size:12px;
color:#000000; }
TITLE { display:table-cell; padding:3px; }
ARTIST { display:table-cell; padding:3px; }
COUNTRY { display:table-cell; padding:3px; }
PRICE { display:table-cell; padding:3px; }
YEAR { display:table-cell; padding:3px; }

-----------------------------------------------------------------------------------

All I want is for the NAME to span across the 6 columns. The end
result should be the equivalent of the following HTML:

<table width="500" cellspacing="0" cellpadding="3"
style="border-color:#d3d3d3; border-style:solid; border-width:1px;">
<tr bgColor="#eeeeee">
<td colspan="6"><span style="font-family:Arial; font-size:12px;
font-weight:bold;">Catalog A</span></td>
</tr>
<tr bgColor="#eeeeee">
<td><span style="font-family:Arial; font-size:12px;
font-weight:bold;">Title</span></td>
<td><span style="font-family:Arial; font-size:12px;
font-weight:bold;">Artist</span></td>
<td><span style="font-family:Arial; font-size:12px;
font-weight:bold;">Country</span></td>
<td><span style="font-family:Arial; font-size:12px;
font-weight:bold;">Company</span></td>
<td><span style="font-family:Arial; font-size:12px;
font-weight:bold;">Price</span></td>
<td><span style="font-family:Arial; font-size:12px;
font-weight:bold;">Year</span></td>
</tr>
<tr>
<td><span style="font-family:Arial; font-size:12px;">Empire
Burlesque</span></td>
<td><span style="font-family:Arial; font-size:12px;">Bob
Dylan</span></td>
<td><span style="font-family:Arial; font-size:12px;">USA</span></td>
<td><span style="font-family:Arial;
font-size:12px;">Columbia</span></td>
<td><span style="font-family:Arial;
font-size:12px;">10.90</span></td>
<td><span style="font-family:Arial; font-size:12px;">1985</span></td>
</tr>
<tr>
<td><span style="font-family:Arial; font-size:12px;">Hide Your
Heart</span></td>
<td><span style="font-family:Arial; font-size:12px;">Bonnie
Tyler</span></td>
<td><span style="font-family:Arial; font-size:12px;">UK</span></td>
<td><span style="font-family:Arial; font-size:12px;">CBS
Records</span></td>
<td><span style="font-family:Arial; font-size:12px;">9.90</span></td>
<td><span style="font-family:Arial; font-size:12px;">1988</span></td>
</tr>
</table>
Now, what am I doing wrong? Why doesn't the column span with the TITLE
content span the 6 columns across like I want it to do using the
"column-span" property?

Seems so basic you'd think they'd have gotten it to work.

Using: Firefox 1.5 - don't bother looking at this in IE.

Again, any help would be appreciated.

Thank you,

Ricky

Dec 28 '05 #1
2 3926
ricky wrote:
basic and it's just frustrating that it seems there's no support for
this. Why doesn't the column span with the TITLE content span the 6 columns
across like I want it to do using the "column-span" property?


I've found a reference to column-span in the 18 January 2001 Working Draft
for CSS3 module: Multi-column layout. The latest version of that module
(15th Dec 2005) is also a Working Draft, and *doesn't* include that
property.

--
David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
Home is where the ~/.bashrc is
Dec 28 '05 #2
Thank you for pointing that out. Although things would've been easier
using CSS, I have found that using XSL is more powerful and allows me
to do what I want. But seeing that column-span seems to be deprecated,
it would've forced my hand anyway.

Thanks again...your response is appreciated.

Ricky

Dec 28 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
6146
by: Todd | last post by:
Hello, I'm curious if anyone knows of a way (if one exists) to tell a form (in Access 2002 VBA) to sort on an unbound column of a combo box on the form. Here's what I want to do: A combo box...
1
5034
by: Prasad Karunakaran | last post by:
I am using the C# DirectoryEntry class to retrieve the Properties of an user object in the Active Directory. I need to get the First Name and Last Name as properties. I know it is not supported...
4
1966
by: Rico | last post by:
Hello, I'd like to change a field from an Autonum to a Long data type using DAO. I knwo how to set the attribute, but don't know how to remove it. Any ideas? Thanks!
3
2074
by: Paul | last post by:
I found a great site for CSS tempaltes, http://blog.html.it/layoutgala/ . I downloaded them, and played around with them. Then I tried to use the template in as ASP.Net MasterPage, but everything...
4
10562
by: crazy_jutt | last post by:
hi all, i heard that db2 ignores indexes when using any column function on the column which has index on it. but i have seen db2 using indexes even when using column function. what is the...
5
3853
by: lancer6238 | last post by:
Dear all, I'm trying to implement the Smith-Waterman algorithm for DNA sequence alignment. I'm aligning a 2040 bp query sequence against a 5040 bp sequence. I'll be trying to implement a parallel...
1
1814
by: viv1tyagi | last post by:
Hi everyone ! ! ! I'm just a month old in the world of Python and trying to develop an application using Tkinter in which a new window pops out on a particular button press.The code for this new...
1
2101
by: Achtland | last post by:
Hi all, I'm rather new to XSL (and this forum) and have searched everywhere to find out how to order the output of XML to text using XSLT but haven't found the answer. The XML is similar to...
12
1521
by: G.S. | last post by:
Is it acceptable to use { } blocks to improve readability and maintainability of the code? Example: //add the checkbox column DataGridViewCheckBoxColumn column = new...
6
2930
by: insirawali | last post by:
Hi all, I have this problem, i need to know is there a way i cn use the data adapter's update method in this scenario. i have 3 tables as below create table table1{ id1 int identity(1,1)...
0
7233
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7135
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7342
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
7067
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
5650
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
4729
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3215
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3201
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
440
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.