W3C home > Mailing lists > Public > www-html@w3.org > June 2003

RE: ID and NAME tokens (CDATA problems)

From: Peter Foti (PeterF) <PeterF@SystolicNetworks.com>
Date: Wed, 4 Jun 2003 17:30:59 -0400
Message-ID: <A10A983C9DFBD4119F0300104B2EA6B72602D5@ZIPPY>
To: "'David Woolley'" <david@djwhome.demon.co.uk>, "'www-html@w3.org'" <www-html@w3.org>

According to the DOM specs, it is.


Interface HTMLInputElement:

attribute  DOMString            name;

Form control or object name when submitted with a form. See the name
attribute definition in HTML 4.0. 


name = cdata [CI] 
This attribute assigns the control name.

CDATA is a sequence of characters from the document character set and may
include character entities. User agents should interpret attribute values as
Replace character entities with characters, 
Ignore line feeds, 
Replace each carriage return or tab with a single space. 
User agents may ignore leading and trailing white space in CDATA attribute
values (e.g., "   myval   " may be interpreted as "myval"). Authors should
not declare attribute values with leading or trailing white space.

For some HTML 4 attributes with CDATA attribute values, the specification
imposes further constraints on the set of legal values for the attribute
that may not be expressed by the DTD.

Although the STYLE and SCRIPT elements use CDATA for their data model, for
these elements, CDATA must be handled differently by user agents. Markup and
entities must be treated as raw text and passed to the application as is.
The first occurrence of the character sequence "</" (end-tag open delimiter)
is treated as terminating the end of the element's content. In valid
documents, this would be the end tag for the element.

ID and NAME tokens must begin with a letter ([A-Za-z]) and may be followed
by any number of letters, digits ([0-9]), hyphens ("-"), underscores ("_"),
colons (":"), and periods ("."). 
IDREF and IDREFS are references to ID tokens defined by other attributes.
IDREF is a single token and IDREFS is a space-separated list of tokens. 
NUMBER tokens must contain at least one digit ([0-9]). 


PS-The solution to my problem was to use the bracket notation instead of the
dot notation, where:
MemberExpression.Identifier == MemberExpression[ <Identifier-string> ]
As defined in the ECMA-262 spec.

>-----Original Message-----
>From: www-html-request@w3.org [mailto:www-html-request@w3.org]On Behalf
>Of David Woolley
>Sent: Wednesday, June 04, 2003 5:05 PM
>To: www-html@w3.org
>Subject: Re: ID and NAME tokens (CDATA problems)
>> document.myform.readme.txt-title
>This is not valid in the W3C document object model.
Received on Wednesday, 4 June 2003 17:17:52 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 15:06:04 UTC