DTD XML and CSS combo

Discussion in 'XML' started by cometaj@comcast.net, Feb 1, 2006.

  1. Guest

    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
    , Feb 1, 2006
    #1
    1. Advertising

  2. wrote:

    > 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.

    --
    David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
    Home is where the ~/.bashrc is
    David Dorward, Feb 1, 2006
    #2
    1. Advertising

  3. David Dorward wrote:
    > wrote:
    >
    > > 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.


    Doh!

    > 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 :)


    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
    =?iso-8859-1?q?Jean-Fran=E7ois_Michaud?=, Feb 1, 2006
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Joseph Tilian
    Replies:
    0
    Views:
    351
    Joseph Tilian
    Dec 21, 2004
  2. Ronald Fischer
    Replies:
    4
    Views:
    1,753
    Ronald Fischer
    Mar 17, 2005
  3. test
    Replies:
    2
    Views:
    2,025
    Oliver Wong
    Jul 28, 2006
  4. dthmtlgod

    Fill Combo Box based on another Combo Box

    dthmtlgod, Nov 16, 2005, in forum: ASP General
    Replies:
    1
    Views:
    588
    Bob Barrows [MVP]
    Nov 16, 2005
  5. SM
    Replies:
    2
    Views:
    365
Loading...

Share This Page