DTD XML and CSS combo

C

cometaj

Hello,

I am having trouble figuring out how to emulate html table behavior as
far as colspan and rowspan goes with my CSS on the XML I am working
with.

the XML has colspan and rowspan attributes for the CELL tag. How do I
use those to get correct rendering behavior in the browser?

the DTD defines custom tags for tables, rows, cells, header, footer,
etc.

In the CSS, I set

TABLE as: table for display property
TBODY as: table-row-group
ROW as: table-row
CELL as: table-cell

with varying values for different properties. It actually looks like a
table but the colspan and rowspan does not seem to influence the
behavior of cells at the rendering engine level. Do I have to take care
of this myself at the CSS level? If this is the case, how do I go about
doing that?

Regards
Jean-Francois Michaud
 
D

David Dorward

I am having trouble figuring out how to emulate html table behavior as
far as colspan and rowspan goes with my CSS on the XML I am working
with.

With current CSS - you can't. Work doesn't appear to have started for the
module that might be able to do it in CSS 2.

http://www.w3.org/Style/CSS/current-work#tables
It actually looks like a table but the colspan and rowspan does not seem
to influence the behavior of cells at the rendering engine level.

They wouldn't - there's nothing magic about the attribute names.
Do I have to take care of this myself at the CSS level?
Yes.

If this is the case, how do I go about doing that?

Wait until CSS supports it :)

You are probably better off transforming the XML into HTML 4.01 Strict
before serving it up to web browser clients.
 
?

=?iso-8859-1?q?Jean-Fran=E7ois_Michaud?=

David said:
With current CSS - you can't. Work doesn't appear to have started for the
module that might be able to do it in CSS 2.
Doh!


They wouldn't - there's nothing magic about the attribute names.


Wait until CSS supports it :)

Is there a way I can recuperate information in XML ( with CSS(1 or 2))
and actually use the values recuperated as values in the CSS stylesheet
(like a variable that would resolve into a string in the CSS at
runtime).

something like (this is pseudocode for what I would like it to do)

CELL[halign]{
text-align: attr(halign);
}

instead of

CELL[halign="left"]{
text-align: left;
}

CELL[halign="center"]{
text-align: center;
}

CELL[halign="right"]{
text-align: right;
}


That would be a good start :).
You are probably better off transforming the XML into HTML 4.01 Strict
before serving it up to web browser clients.

Unfortunately impossible given other circumstances. I am currently
using a browser to view the styling output.

Regards
Jean-Francois Michaud
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,236
Members
46,822
Latest member
israfaceZa

Latest Threads

Top