Re: tweet and pin button attributes failing validation

Discussion in 'HTML' started by Jonathan N. Little, Apr 9, 2013.

  1. lipska the kat wrote:
    > Hi
    >
    > I have a web application that uses buttons provided
    > by twitter and pinterest to tweet and pin various images to the relevant
    > social networking sites. I'm trying to get the site to pass w3
    > validation but I'm falling over with the organization specific
    > attributes, the attributes concerned are
    >
    > data-via, data-dnt, data-text, data-url, count-layout
    >
    > How do you pass validation when you have non-standard attributes in an
    > href?


    You won't with the crap code that these social network sites spew. There
    is not really much you can do if you wish to include them. What I did on
    my site was to have a php place target elements on pages and then a
    JavaScript function that post processes to inject the Facebook buttons.
    It "validates" and since these sites like Facebook require JavaScript to
    function the FB fans will get their button and I don't have to look at
    their lousy markup! ;-) It's a bit silly though.

    --
    Take care,

    Jonathan
    -------------------
    LITTLE WORKS STUDIO
    http://www.LittleWorksStudio.com
     
    Jonathan N. Little, Apr 9, 2013
    #1
    1. Advertising

  2. Jonathan N. Little

    dorayme Guest

    In article <>,
    lipska the kat <"nospam at neversurrender dot co dot uk"> wrote:

    > The entire site validates against 4.01 transitional apart from
    > these five attributes so I suppose I can hack it a bit to get the pass :)


    That is the sort of effort that has been rightly questioned in this
    thread. It looks as if OP is fixated on validation for its own sake.

    --
    dorayme
     
    dorayme, Apr 9, 2013
    #2
    1. Advertising

  3. 2013-04-09 12:10, lipska the kat wrote:

    > If you came from a software engineering background you would understand
    > the need to get things 'right' by whatever measure you choose.
    >
    > Either you don't understand this imperative, there is no concept of
    > 'almost compilable', either it compiles or it doesn't - or you find it
    > difficult to write html 'code' that passes validation.


    HTML is not a compiled language, or a programming language at all. Your
    analog is pointless.

    When you compile a program, you get error messages, whether you want
    them or not, and the compiler simply does not produce object code if
    there are compilation errors. (Well, normally. You could write a
    compiler that is permissive in this respect.)

    When you throw something at a web browser as HTML, it will do its best
    to render it somehow, unless you are serving it with a XML media type
    (and if you are, then well-formedness is what matters, not validity).


    --
    Yucca, http://www.cs.tut.fi/~jkorpela/
     
    Jukka K. Korpela, Apr 9, 2013
    #3
  4. Jonathan N. Little

    dorayme Guest

    In article <>,
    lipska the kat <"nospam at neversurrender dot co dot uk"> wrote:

    > On 09/04/13 09:30, dorayme wrote:
    > > In article <>,
    > > lipska the kat <"nospam at neversurrender dot co dot uk"> wrote:
    > >
    > >> The entire site validates against 4.01 transitional apart from
    > >> these five attributes so I suppose I can hack it a bit to get the pass :)

    > >
    > > That is the sort of effort that has been rightly questioned in this
    > > thread. It looks as if OP is fixated on validation for its own sake.

    >
    > If you came from a software engineering background you would understand
    > the need to get things 'right' by whatever measure you choose.
    >


    No one needs an engineering background to understand such an almost
    tautological requirement. No one outside engineering thinks it's ok to
    get things wrong. There is nothing special about engineers in this
    regard. There can certainly be tunnel vision among people of any
    particular specific background. I just happen to be lucky in this
    regard in having an anonymous, unspecific background; enabling me to
    criticise all who have specific onymous backgrounds.

    > Either you don't understand this imperative, there is no concept of
    > 'almost compilable', either it compiles or it doesn't - or you find it
    > difficult to write html 'code' that passes validation.
    >


    I doubt this, you supply no argument for it. If I could not understand
    that a woman cannot be half-pregnant, it would hardly be the
    alternative that I could not do something well to do with pregnancy.

    > In the same way that code that compiles is not necessarily 'right' by
    > some other metric I do understand that html that passes validation is
    > not necessarily meaningful to a human or indeed coherent by any other
    > measure. However, questioning the need for html to pass validation
    > implies a poor understanding of the engineering imperative that has
    > driven human development down the ages.
    >


    You are driven, as I have said before, to validate for it's own sake.
    What if the test of validation is made by humans using some
    questionable or even clearly unreasonable assumptions or decisions.
    Perhaps lots of their decisions are good and worthwhile and some not.
    If all browsers support something that some standard says is not
    kosher, the author has the choice to be practical and consciously
    allow invalidity. Any other attitude runs the danger of being slave to
    an ideal. Sounds like idolatry? We all know idolatry is bad. It sounds
    like you are slurring all engineers in making them so inflexible. You
    should see what engineers in general do to get jobs done, some of them
    the very best too. <g>


    > If you are satisfied by writing invalid html then that's fine, most
    > browsers that I am aware of are fault tolerant. Questioning my need to
    > have my code pass industry standard validation is less understandable.
    >


    I am not questioning the attempt to validate, I question the lengths
    you will go to do it... many of us rarely have much difficulty.

    btw, why would you use 4.01 transitional, what are you transitioning
    from?

    --
    dorayme
     
    dorayme, Apr 9, 2013
    #4
  5. Jukka K. Korpela schrieb:

    > When you throw something at a web browser as HTML, it will do its best
    > to render it somehow [...]


    .... because there are so many crappy websites out there that don't
    validate and if the browser would simply refuse to display them then
    many websites wouldn't be accessible with that browser and nobody would
    use it. So browser vendors are forced to support crappy code as long as
    there are incompetent [censored] producing crappy code. And it's *our*
    job to break out of that vicious circle.

    So, yes, browsers will do their best to render even the most horrible,
    invalid junk thrown at them. Just as the vendor in a shop will still
    sell you stuff even if you're rude or impolite.

    Greetings,
    Thomas

    --
    Ce n'est pas parce qu'ils sont nombreux à avoir tort qu'ils ont raison!
    (Coluche)
     
    Thomas Mlynarczyk, Apr 9, 2013
    #5
  6. Jonathan N. Little

    Lewis Guest

    In message <kk0nub$faf$> Jukka K. Korpela
    <> wrote:
    > 2013-04-09 12:10, lipska the kat wrote:


    >> If you came from a software engineering background you would understand
    >> the need to get things 'right' by whatever measure you choose.
    >>
    >> Either you don't understand this imperative, there is no concept of
    >> 'almost compilable', either it compiles or it doesn't - or you find it
    >> difficult to write html 'code' that passes validation.


    > HTML is not a compiled language,


    True.

    > or a programming language at all.


    False. Sometimes markup languages are segregated, but they ar still
    "an artificial language designed to communicate instructions to a
    computer", and some markup languages are not fault-tolerant linke html
    is, so syntax (validation, if you will) matters.

    > When you throw something at a web browser as HTML, it will do its best
    > to render it somehow,


    That was a choice (a terrible, terrible choice) made by Netscape. It
    is not part of the language specification.

    > unless you are serving it with a XML media type
    > (and if you are, then well-formedness is what matters, not validity).


    Invalid XML is required to generate an error.


    --
    WORDS IN THE HEART CANNOT BE TAKEN --Feet of Clay
     
    Lewis, Apr 9, 2013
    #6
  7. 2013-04-09 13:32, Lewis wrote:

    >> HTML is not a compiled language,

    >
    > True.
    >
    >> or a programming language at all.

    >
    > False.


    Prove that by writing a loop in HTML. Having realized your mistake, you
    can understand it better by reading "Programs vs. markup
    or why HTML authoring is not programming",
    http://www.cs.tut.fi/~jkorpela/prog.html

    >> When you throw something at a web browser as HTML, it will do its best
    >> to render it somehow,

    >
    > That was a choice (a terrible, terrible choice) made by Netscape. It
    > is not part of the language specification.


    It was always part of HTML in real life. Browsers predated the first
    HTML specification by many years, and specifications have always been
    rather unrealistic in part. HTML5 tries to be more realistic, but even
    it is a mixture of describing what browsers do and a wishlist from
    forward-looking designers.

    >> unless you are serving it with a XML media type
    >> (and if you are, then well-formedness is what matters, not validity).

    >
    > Invalid XML is required to generate an error.


    No it isn't (please cite a specification to prove your claim), and an
    XML processor is not even required to read a document type definition if
    one is present or referred to in a document.

    For example, try serving an XHTML document with an XML media type to any
    browser that can cope with that. You will see that <foo></bar> causes an
    only error message to be displayed, but if you have (literally)
    <foo>xyz</foo>, browsers just ignore the tags as if the document had xyz
    there. (Well, not quite. An element gets inserted into the DOM, but as
    such this has no effect on rendering or functionality.)

    This illustrates the difference between well-formedness and validity.

    --
    Yucca, http://www.cs.tut.fi/~jkorpela/
     
    Jukka K. Korpela, Apr 9, 2013
    #7
  8. lipska the kat wrote:
    > On 09/04/13 09:30, dorayme wrote:
    >> In article <>,
    >> lipska the kat <"nospam at neversurrender dot co dot uk"> wrote:
    >>
    >>> The entire site validates against 4.01 transitional apart from
    >>> these five attributes so I suppose I can hack it a bit to get the
    >>> pass :)

    >>
    >> That is the sort of effort that has been rightly questioned in this
    >> thread. It looks as if OP is fixated on validation for its own sake.

    >
    > If you came from a software engineering background you would understand
    > the need to get things 'right' by whatever measure you choose.


    Do you argue, that inserting the invalid markup by some client side
    script is "right", because you'll pass validation?

    --
    Christoph M. Becker
     
    Christoph Becker, Apr 9, 2013
    #8
  9. lipska the kat wrote:
    > On 09/04/13 12:02, Jukka K. Korpela wrote:
    >> 2013-04-09 13:32, Lewis wrote:

    >
    >> Prove that by writing a loop in HTML. Having realized your mistake, you
    >> can understand it better by reading "Programs vs. markup
    >> or why HTML authoring is not programming",
    >> http://www.cs.tut.fi/~jkorpela/prog.html


    You are on the losing side of this argument with Yucca. HTML is not a
    *programming* language. It has no functions, logic flow, variables. It
    is a *markup* language like XML which is only descriptive of how data is
    organized or structured. The programming parts are server and client
    side scripting often used to produce and control HTML, such as PHP and
    JavaScript.

    --
    Take care,

    Jonathan
    -------------------
    LITTLE WORKS STUDIO
    http://www.LittleWorksStudio.com
     
    Jonathan N. Little, Apr 9, 2013
    #9
  10. 2013-04-09 16:09, lipska the kat wrote:

    > On 09/04/13 12:02, Jukka K. Korpela wrote:
    >> 2013-04-09 13:32, Lewis wrote:

    >
    >> Prove that by writing a loop in HTML. Having realized your mistake, you
    >> can understand it better by reading "Programs vs. markup
    >> or why HTML authoring is not programming",
    >> http://www.cs.tut.fi/~jkorpela/prog.html

    >
    > This is priceless, using your own quasi academic paper to justify your
    > own argument,


    It is "quasi academic" in your mind only, so all conclusions you draw
    from the idea are entire on you. And it was referred to for further
    information; a sufficient argument was already given in the text of my
    message.

    How about the loop? If you know any programming language even at the
    most modest level, you can surely write a loop in it faster than you
    wrote your rant. Why is it so that we are still waiting for your loop
    programmed in HTML? Come on, *any* loop? Can anyone imagine a simpler
    programming exercise?

    > BTW 'programming' is what you do to your washing machine or microwave
    > oven.


    With such ideas, you would not have passed any course on programming
    languages that I gave some decades ago.

    By the way, the question whether HTML documents are programs is not
    academic at all. It should be obvious to anyone who knows the elements
    of the basics of programming that they are not. But it might not be that
    evident e.g. to a judge who has never done any programming. And the
    issue is of legal relevance at least in the European Union, where all
    computer programs are protected by copyright without any requirement on
    creativity and originality. Documents, however, are subject to normal
    conditions on copyright protection.

    --
    Yucca, http://www.cs.tut.fi/~jkorpela/
     
    Jukka K. Korpela, Apr 9, 2013
    #10
  11. 2013-04-09 17:19, lipska the kat wrote:

    > What the hell, procrastination be damned, I'll do it anyway, at least I
    > can put that funky W3c HTML 4.01 big red tick icon on my landing page :)


    I can do that anyway, quite independently of whether the page validates
    or not. That's what people do, and that's one of the many reasons why
    those icons are so useful signs of bogosity.

    --
    Yucca, http://www.cs.tut.fi/~jkorpela/
     
    Jukka K. Korpela, Apr 9, 2013
    #11
  12. Jonathan N. Little

    Lewis Guest

    In message <kk0sb4$b9m$>
    Jukka K. Korpela <> wrote:
    > 2013-04-09 13:32, Lewis wrote:


    >>> HTML is not a compiled language,

    >>
    >> True.
    >>
    >>> or a programming language at all.

    >>
    >> False.


    > Prove that by writing a loop in HTML.


    A "loop" is not a requirement of a programming language.

    > Having realized your mistake, you
    > can understand it better by reading "Programs vs. markup
    > or why HTML authoring is not programming",
    > http://www.cs.tut.fi/~jkorpela/prog.html


    Nifty, someone makes up a definition and then proves something doesn't
    meet their definition. So what?

    --
    By the way, I think you might be the prettiest girl I've ever seen
    outside the pages of a really filthy magazine
     
    Lewis, Apr 9, 2013
    #12
  13. 2013-04-09 19:08, Lewis wrote:

    > A "loop" is not a requirement of a programming language.


    Please tell us which programming languages you purport to know. For
    convenience, divide them into those that can be used to create loops and
    those that cannot.

    On the next round, you might be asked to clarify what makes you think
    that the latter group contains programming languages. What is a
    programming language that cannot be used to write computer programs?

    --
    Yucca, http://www.cs.tut.fi/~jkorpela/
     
    Jukka K. Korpela, Apr 9, 2013
    #13
  14. Jonathan N. Little

    Lewis Guest

    In message <kk1gbs$8mj$>
    Jukka K. Korpela <> wrote:
    > 2013-04-09 19:08, Lewis wrote:


    >> A "loop" is not a requirement of a programming language.


    > Please tell us which programming languages you purport to know. For
    > convenience, divide them into those that can be used to create loops and
    > those that cannot.


    > On the next round, you might be asked to clarify what makes you think
    > that the latter group contains programming languages. What is a
    > programming language that cannot be used to write computer programs?


    I see you are one of the idiots who decide that your definition trumps
    everything.

    Your definition is yours, it is not an accepted definition according to
    anyone else.

    Have fun in your bubble.

    --
    It was long ago and it was far away / And it was so much better than it
    is today
     
    Lewis, Apr 9, 2013
    #14
  15. 2013-04-09 19:56, Lewis wrote:

    >> Please tell us which programming languages you purport to know. For
    >> convenience, divide them into those that can be used to create loops and
    >> those that cannot.

    [...]
    > I see you are one of the idiots who decide that your definition trumps
    > everything.


    Thank you for the list of programming languages you purport to know. Its
    length tells a lot.

    --
    Yucca, http://www.cs.tut.fi/~jkorpela/
     
    Jukka K. Korpela, Apr 9, 2013
    #15
  16. Jonathan N. Little

    C A Upsdell Guest

    On 2013-04-09 12:08, Lewis wrote:

    > A "loop" is not a requirement of a programming language.


    True. Back in the early 1980's I created a product named 'Videophile'
    used to implement videotext information systems. Videophile supported a
    simple interpreted programming language which was capable of simple
    computations, C-type switch statements, and interactions with videotext
    pages, but the language did not support loops of any kind. A page could
    invoke programs written in this very simple, limited programming
    language to implement more intelligent, more capable videotext
    information systems.

    Adding loops to this language would have been possible, but the need to
    do so never arose.
     
    C A Upsdell, Apr 9, 2013
    #16
  17. 2013-04-09 20:54, C A Upsdell wrote:

    > On 2013-04-09 12:08, Lewis wrote:
    >
    >> A "loop" is not a requirement of a programming language.

    >
    > True.


    Not in any reasonable interpretation. Loops and conditionality are
    essential in programming languages (though loops might be implicit, e.g.
    via recursive function calls - could anyone show a recursive HTML
    function, or *any* HTML function, please?). On the practical side,
    functions or other subprograms are essential, too, though in theory,
    Turing completeness would suffice. But it means loops, among other things.

    --
    Yucca, http://www.cs.tut.fi/~jkorpela/
     
    Jukka K. Korpela, Apr 9, 2013
    #17
  18. Jonathan N. Little

    C A Upsdell Guest

    On 2013-04-09 14:09, Jukka K. Korpela wrote:
    > 2013-04-09 20:54, C A Upsdell wrote:
    >
    >> On 2013-04-09 12:08, Lewis wrote:
    >>
    >>> A "loop" is not a requirement of a programming language.

    >>
    >> True.

    >
    > Not in any reasonable interpretation. Loops and conditionality are
    > essential in programming languages.


    I gave you an example of a simple programming language which did not
    support loops.

    Another example: ladder programs used by PLCs controlling machinery
    need not contain loops. For example, one line in a ladder program can
    effectively say "unless limit switch 20 is made, energize solenoid 5",
    (though not in these words, as I can't depict the line of the ladder
    program in a text-based email).
     
    C A Upsdell, Apr 10, 2013
    #18
  19. Jonathan N. Little

    dorayme Guest

    In article <>,
    lipska the kat <"nospam at neversurrender dot co dot uk"> wrote:

    > at least I
    > can put that funky W3c HTML 4.01 big red tick icon on my landing page :)


    The evidence piles up that this iconic boast is what you are
    particularly interested in.

    --
    dorayme
     
    dorayme, Apr 10, 2013
    #19
  20. Jonathan N. Little

    dorayme Guest

    In article <>,
    lipska the kat <"nospam at neversurrender dot co dot uk"> wrote:

    > What other people do is of no concern to me, if I put the icon on my
    > site it's because the site validates. I know the site validates, anyone
    > that cares to test the site will know that it validates and that's good
    > enough for me.


    None of this makes sense. You don't put the icon there *because* your
    pages validate but because you want to boast that it validates.
    Furthermore, it is a poor boast because validation is almost always
    quite easy to achieve and you rely on the visitor caring about the
    matter and even actually believing you without checking (if visitors
    check and see they validate and you don't iconically boast, their
    pleasure and respect for you would surely be greater).

    --
    dorayme
     
    dorayme, Apr 10, 2013
    #20
    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. Neil Zanella
    Replies:
    2
    Views:
    1,009
    Neil Zanella
    Oct 26, 2003
  2. =?ISO-8859-1?Q?Andr=E9s?=

    Pin declarations in EC/ECP FPGAs

    =?ISO-8859-1?Q?Andr=E9s?=, Feb 22, 2005, in forum: VHDL
    Replies:
    11
    Views:
    2,566
    cristian
    Mar 11, 2005
  3. Replies:
    1
    Views:
    301
    Steven D'Aprano
    Feb 11, 2013
  4. Jukka K. Korpela
    Replies:
    15
    Views:
    560
    Joy Beeson
    Apr 11, 2013
  5. Terry Reedy
    Replies:
    0
    Views:
    119
    Terry Reedy
    Sep 23, 2013
Loading...

Share This Page