making up element attributes

Discussion in 'HTML' started by Jeff Thies, Aug 8, 2004.

  1. Jeff Thies

    Jeff Thies Guest

    I have a template that the server is going to process.

    HTML that may look like this:

    <tr>...some_row_type
    <tr>...some other row type

    I'd like to add server processing instruction

    I could just add a class and read that, but that would/could conflict
    with styling.

    I can stick a lot of phony attributes in the tr and the browser will
    ignore them:

    <tr process="email_only">
    or
    <tr email_only>

    Now just because that will work for my purposes, that doesn't mean it's
    the right way to do it. What rules apply?

    Jeff
    Jeff Thies, Aug 8, 2004
    #1
    1. Advertising

  2. Jeff Thies

    Karl Groves Guest

    "Jeff Thies" <> wrote in message
    news:I0tRc.7592$...
    > I have a template that the server is going to process.
    >
    > HTML that may look like this:
    >
    > <tr>...some_row_type
    > <tr>...some other row type
    >
    > I'd like to add server processing instruction
    >
    > I could just add a class and read that, but that would/could conflict
    > with styling.
    >
    > I can stick a lot of phony attributes in the tr and the browser will
    > ignore them:
    >
    > <tr process="email_only">
    > or
    > <tr email_only>
    >
    > Now just because that will work for my purposes, that doesn't mean it's
    > the right way to do it. What rules apply?
    >


    Write your own DTD.
    As long as the document's markup conforms to its own DTD, you'll be fine.
    Or, you can process it properly from the server in the first place. Just
    because the document is processed server-side, that doesn't mean it still
    can't be valid & well-formed.

    -Karl
    Karl Groves, Aug 8, 2004
    #2
    1. Advertising

  3. Jeff Thies wrote:

    > I have a template that the server is going to process.


    > I'd like to add server processing instruction
    >
    > I could just add a class and read that, but that would/could conflict
    > with styling.


    Why would it conflict with styling? Its not as if you can't set multiple
    classes on one element.

    > I can stick a lot of phony attributes in the tr and the browser will
    > ignore them:
    >
    > <tr process="email_only">


    You could have the server remove said attributes.

    --
    David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
    Home is where the ~/.bashrc is
    David Dorward, Aug 8, 2004
    #3
  4. Jeff Thies

    Jeff Thies Guest

    Karl Groves wrote:
    > "Jeff Thies" <> wrote in message
    > news:I0tRc.7592$...
    >
    >>I have a template that the server is going to process.
    >>
    >>HTML that may look like this:
    >>
    >><tr>...some_row_type
    >><tr>...some other row type
    >>
    >>I'd like to add server processing instruction
    >>
    >>I could just add a class and read that, but that would/could conflict
    >>with styling.
    >>
    >>I can stick a lot of phony attributes in the tr and the browser will
    >>ignore them:
    >>
    >><tr process="email_only">
    >>or
    >><tr email_only>
    >>
    >>Now just because that will work for my purposes, that doesn't mean it's
    >>the right way to do it. What rules apply?
    >>

    >
    >
    > Write your own DTD.


    Not having ever done that. Can I still turn on standards modes and off
    quirks mode. Is it a specific url, or the fact it has a url that
    activates this in the DTD?

    Jeff

    > As long as the document's markup conforms to its own DTD, you'll be fine.
    > Or, you can process it properly from the server in the first place. Just
    > because the document is processed server-side, that doesn't mean it still
    > can't be valid & well-formed.
    >
    > -Karl
    >
    >
    Jeff Thies, Aug 9, 2004
    #4
  5. Jeff Thies

    Steve Pugh Guest

    Jeff Thies <> wrote:
    >Karl Groves wrote:
    >>
    >> Write your own DTD.

    >
    >Not having ever done that. Can I still turn on standards modes and off
    >quirks mode.


    Unknown doctypes always trigger standards mode.

    Mozilla:
    http://www.mozilla.org/docs/web-developer/quirks/doctypes.html
    IE:
    http://msdn.microsoft.com/library/en-us/dnie60/html/cssenhancements.asp#cssenhancements_topic2

    I can't think of any reason why Opera or Safari would differ in this
    respect.

    >Is it a specific url, or the fact it has a url that
    >activates this in the DTD?


    Bit of both.
    Standards mode is the default and then certain recognised doctypes
    trigger quirks mode.
    In some case doctypes that reference the same DTD but with and without
    the URL will trigger different modes (e.g. HTML 4.01 Transitional) but
    other doctypes trigger the same mode regardless of whether the doctype
    contains a URL or not.

    Steve

    --
    "My theories appal you, my heresies outrage you,
    I never answer letters and you don't like my tie." - The Doctor

    Steve Pugh <> <http://steve.pugh.net/>
    Steve Pugh, Aug 9, 2004
    #5
  6. Jeff Thies

    Karl Groves Guest

    "Jeff Thies" <> wrote in message
    news:WSKRc.17581$...
    > Karl Groves wrote:
    > > "Jeff Thies" <> wrote in message
    > > news:I0tRc.7592$...
    > >
    > >>I have a template that the server is going to process.
    > >>
    > >>HTML that may look like this:
    > >>
    > >><tr>...some_row_type
    > >><tr>...some other row type
    > >>
    > >>I'd like to add server processing instruction
    > >>
    > >>I could just add a class and read that, but that would/could conflict
    > >>with styling.
    > >>
    > >>I can stick a lot of phony attributes in the tr and the browser will
    > >>ignore them:
    > >>
    > >><tr process="email_only">
    > >>or
    > >><tr email_only>
    > >>
    > >>Now just because that will work for my purposes, that doesn't mean it's
    > >>the right way to do it. What rules apply?
    > >>

    > >
    > >
    > > Write your own DTD.

    >
    > Not having ever done that. Can I still turn on standards modes and off
    > quirks mode. Is it a specific url, or the fact it has a url that
    > activates this in the DTD?
    >


    If you've never done it, I don't advise trying it.


    --
    Karl Core

    Link of the day: http://216.127.86.74/dubyaresume.com/

    http://www.karlcore.com
    http://www.usabilityinfo.com
    http://www.murderthestupid.com
    Karl Groves, Aug 9, 2004
    #6
  7. Jeff Thies

    Toby Inkster Guest

    Jeff Thies wrote:

    > Not having ever done that. Can I still turn on standards modes and off
    > quirks mode. Is it a specific url, or the fact it has a url that
    > activates this in the DTD?


    Pretty easy as it happens (assuming that all you want to do is add a few
    elements and/or attributes to standard HTML). For example, for a few pages
    I made once, I wanted to use <u> to underline some things, but of course
    that wouldn't validate to a Strict DTD. I could have switched to
    Transitional of course, but didn't want a lot of the other crud that came
    with that (such as the ability to have text nodes as direct children of
    <body>).

    Here is my DTD:
    http://goddamn.co.uk/help/MyHTML4

    And if you're curious why I wanted underlines, it was to duplicate the
    appearance of hotkeys for application menus.

    Example:
    http://goddamn.co.uk/help/textsize/instructions

    --
    Toby A Inkster BSc (Hons) ARCS
    Contact Me ~ http://tobyinkster.co.uk/contact
    Now Playing ~ ./tom_mcrae/tom_mcrae/03_2nd_law.ogg
    Toby Inkster, Aug 9, 2004
    #7
  8. Jeff Thies

    Dave Patton Guest

    Toby Inkster <> wrote in
    news:p:

    > For example, for a
    > few pages I made once, I wanted to use <u> to underline some things,
    > but of course that wouldn't validate to a Strict DTD.


    > Here is my DTD:
    > http://goddamn.co.uk/help/MyHTML4
    >
    > And if you're curious why I wanted underlines, it was to duplicate the
    > appearance of hotkeys for application menus.
    >
    > Example:
    > http://goddamn.co.uk/help/textsize/instructions


    Is there any reason, other than cleaner-looking HTML
    and a smaller download size, why using spans, such as
    <span class="ul">Z</span>
    wan't your solution?

    --
    Dave Patton
    Canadian Coordinator, Degree Confluence Project
    http://www.confluence.org/
    My website: http://members.shaw.ca/davepatton/
    Dave Patton, Aug 9, 2004
    #8
  9. Jeff Thies

    Sam Hughes Guest

    "Karl Groves" <> wrote in news:cf5mk2$706$1@ngspool-
    d02.news.aol.com:

    > Write your own DTD.
    > As long as the document's markup conforms to its own DTD, you'll be
    > fine.


    But that's an exercise in ludicrosity.

    It seems like you are making validation the end in itself.

    --
    In a room with thirty-seven people, never have everybody shake each other's
    hand.
    Sam Hughes, Aug 9, 2004
    #9
  10. Jeff Thies

    Jeff Thies Guest

    Toby Inkster wrote:

    > Jeff Thies wrote:
    >
    >
    >>Not having ever done that. Can I still turn on standards modes and off
    >>quirks mode. Is it a specific url, or the fact it has a url that
    >>activates this in the DTD?

    >
    >
    > Pretty easy as it happens (assuming that all you want to do is add a few
    > elements and/or attributes to standard HTML).


    That's pretty cool.

    I wonder if we'll ever get to the point of arguing about how I get my
    DTD to validate my page!

    Jeff

    <snip>
    >
    > Here is my DTD:
    > http://goddamn.co.uk/help/MyHTML4
    >
    Jeff Thies, Aug 9, 2004
    #10
  11. Jeff Thies

    Karl Groves Guest

    "Sam Hughes" <> wrote in message
    news:Xns9540A42215106hughesrpiedu@130.133.1.4...
    > "Karl Groves" <> wrote in

    news:cf5mk2$706$1@ngspool-
    > d02.news.aol.com:
    >
    > > Write your own DTD.
    > > As long as the document's markup conforms to its own DTD, you'll be
    > > fine.

    >
    > But that's an exercise in ludicrosity.


    It sure is!

    > It seems like you are making validation the end in itself.


    No, an easy-to-use website is the end, and validation is an ingredient.


    --
    Karl Core

    Link of the day: http://216.127.86.74/dubyaresume.com/

    http://www.karlcore.com
    http://www.usabilityinfo.com
    http://www.murderthestupid.com
    Karl Groves, Aug 9, 2004
    #11
  12. Karl Groves wrote:

    >> It seems like you are making validation the end in itself.

    >
    > No, an easy-to-use website is the end, and validation is an ingredient.


    Conforming to a standard is an ingredient. Validation is a way to check many
    aspects of conformance. If you make up your own DTD then you aren't
    checking conformance to a standard.

    --
    David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
    Home is where the ~/.bashrc is
    David Dorward, Aug 9, 2004
    #12
  13. Jeff Thies

    Toby Inkster Guest

    Dave Patton wrote:

    > Is there any reason, other than cleaner-looking HTML
    > and a smaller download size, why using spans, such as
    > <span class="ul">Z</span>
    > wan't your solution?


    Because I felt that the underlining was genuinely part of the *content* --
    not an optional extra. (CSS is an *optional* enhancement to a web page.)

    --
    Toby A Inkster BSc (Hons) ARCS
    Contact Me ~ http://tobyinkster.co.uk/contact
    Toby Inkster, Aug 9, 2004
    #13
  14. Jeff Thies

    Mark Parnell Guest

    On Mon, 09 Aug 2004 21:44:45 +0100, David Dorward <>
    declared in alt.html:

    > Conforming to a standard is an ingredient. Validation is a way to check many
    > aspects of conformance. If you make up your own DTD then you aren't
    > checking conformance to a standard.


    Well, technically the W3C is not a standards body anyway - they only
    publish recommendations...

    <ducks>

    --
    Mark Parnell
    http://www.clarkecomputers.com.au
    "Never drink rum&coke whilst reading usenet" - rf 2004
    Mark Parnell, Aug 10, 2004
    #14
  15. Jeff Thies

    Dave Patton Guest

    Toby Inkster <> wrote in
    news:p:

    > Dave Patton wrote:
    >
    >> Is there any reason, other than cleaner-looking HTML
    >> and a smaller download size, why using spans, such as
    >> <span class="ul">Z</span>
    >> wan't your solution?

    >
    > Because I felt that the underlining was genuinely part of the
    > *content* -- not an optional extra. (CSS is an *optional* enhancement
    > to a web page.)


    Thanks. Makes perfect sense :)

    --
    Dave Patton
    Canadian Coordinator, Degree Confluence Project
    http://www.confluence.org/
    My website: http://members.shaw.ca/davepatton/
    Dave Patton, Aug 10, 2004
    #15
  16. Steve Pugh <> wrote:

    > Unknown doctypes always trigger standards mode.


    And this is a good example of the faulty thinking behind doctype
    sniffing. For example, an "authoring tool" that spits out a nonsense
    doctype will have its productions treated in "standards mode".

    > Standards mode is the default and then certain recognised doctypes
    > trigger quirks mode.


    In a sense yes. But lack of any doctype typically triggers "quirks" mode.
    So one might say the default is "quirks", but _any_ doctype turns this to
    "standards", _unless_ the doctype is one of a limited set of doctype
    declarations (with some vagueness in the matching - IE seems to perform a
    little fuzzy match against its list of doctypes, not an exact string
    match but not much more either).

    > In some case doctypes that reference the same DTD but with and
    > without the URL will trigger different modes (e.g. HTML 4.01
    > Transitional) but other doctypes trigger the same mode regardless of
    > whether the doctype contains a URL or not.


    Indeed. So the sniffing goes around the DOCTYPE declaration as a string,
    not the actual document type definition (DTD). This bogosity can, in a
    perverted manner, be justified by the oddity that HTML specifications
    require a particular DOCTYPE declaration to be used, as opposite to
    specifying that a particular DTD shall be announced (which would be
    pointless too - the relevant thing should be actual conformance to a
    DTD).

    (As usual, HTML 2.0 is a great improvement over its successors. It
    specifies conformance in a manner that requires conformance to a specific
    DTD, not in terms of a magic incantation.)

    --
    Yucca, http://www.cs.tut.fi/~jkorpela/
    Pages about Web authoring: http://www.cs.tut.fi/~jkorpela/www.html
    Jukka K. Korpela, Aug 10, 2004
    #16
  17. Mark Parnell wrote:

    > Well, technically the W3C is not a standards body anyway - they only
    > publish recommendations...


    Fair point - however as the authors of most browsers subscribe to their
    recommendations, its a fair substitute (or you could use ISO-HTML).

    --
    David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
    Home is where the ~/.bashrc is
    David Dorward, Aug 10, 2004
    #17
  18. Jeff Thies

    Toby Inkster Guest

    Jukka K. Korpela wrote:

    > Steve Pugh <> wrote:
    >
    >> Unknown doctypes always trigger standards mode.

    >
    > And this is a good example of the faulty thinking behind doctype
    > sniffing. For example, an "authoring tool" that spits out a nonsense
    > doctype will have its productions treated in "standards mode".


    However, it ensures that future standards and doctypes written by people
    who know what they're doing get rendered the right way.

    --
    Toby A Inkster BSc (Hons) ARCS
    Contact Me ~ http://tobyinkster.co.uk/contact
    Now Playing ~ ./queen/somebody_to_love.ogg
    Toby Inkster, Aug 10, 2004
    #18
  19. Jeff Thies

    Mark Parnell Guest

    On Tue, 10 Aug 2004 18:10:49 +0100, David Dorward <>
    declared in alt.html:

    > Fair point - however as the authors of most browsers subscribe to their
    > recommendations, its a fair substitute (or you could use ISO-HTML).


    I was just being facetious anyway. ;-)

    I don't know that I'd say the browsers really subscribe to the
    recommendations, or this newsgroup would be very quiet.

    Damn it! Can't help myself. :-D

    --
    Mark Parnell
    http://www.clarkecomputers.com.au
    "Never drink rum&coke whilst reading usenet" - rf 2004
    Mark Parnell, Aug 11, 2004
    #19
    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. Replies:
    5
    Views:
    1,846
    Andrew Thompson
    Jan 12, 2005
  2. Replies:
    0
    Views:
    475
  3. Tim Chase
    Replies:
    2
    Views:
    321
    James Stroud
    Mar 15, 2006
  4. HANM
    Replies:
    2
    Views:
    693
    Joseph Kesselman
    Jan 29, 2008
  5. Mike N.
    Replies:
    3
    Views:
    562
    Joseph Kesselman
    Mar 17, 2008
Loading...

Share This Page