W3C home > Mailing lists > Public > www-html-editor@w3.org > April to June 2001

attribute value delimiters

From: Daniel Gomes <dcgomes@xldb.fc.ul.pt>
Date: Thu, 28 Jun 2001 14:34:33 +0100
Message-ID: <01a601c0ffd7$132f91b0$0502a8c0@piupiu>
To: <www-html-editor@w3.org>
 
Hello!

In HTML 4.01, is it correct to use both \' or \" to delimit attribute values? 

As I looked in the specification, it doesn't seem so, for instance we have in the img specification:

<!ELEMENT IMG - O EMPTY                -- Embedded image -->
<!ATTLIST IMG
  %attrs;                              -- %coreattrs, %i18n, %events --
  src         %URI;          #REQUIRED -- URI of image to embed --
...

<!ENTITY % URI "CDATA"
    -- a Uniform Resource Identifier,
       see [URI]


so it seems that 

<img src= "someimage.gif" >

is correct but

<img src= 'someimage.gif' >

isn't.

However the W3C validator considered that all the following cases are correct in HTML 4.01 strict, transitional and xhtml

<img alt='somedesc' src= 'someimage.gif' >
<img alt="somedesc" src= "someimage.gif" >
<img alt=somedescsrc= someimage.gif >


Is there a bug in the published specification that omits that the attribute values could also be delimited by \' or the validator and W3C Tidy don't follow the specification?

Or am I doing somekind of miss interpretation of the specification?



Thanks...

/Daniel Gomes
Grupo xldb-LaSIGE
Received on Thursday, 28 June 2001 09:29:44 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 27 March 2012 18:16:58 GMT