RE: [WSG] Valid characters in ID attribute

2005-06-07 Thread Ricci Angela

Hi, Chris

As from W3C: 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 (.).  
But I'd avoid using underscore for id/class names... I've already had 
intermitent bugs with IE6 because of it (specially for links).

Cheers,
Angela

-Message d'origine-
De : [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] la
part de Chris Taylor
Envoyé : mardi 7 juin 2005 12:12
À : wsg@webstandardsgroup.org
Objet : [WSG] Valid characters in ID attribute


Hi,

I'm writing a function to do all manner of clever stuff and need to
create very complex ID attributes for links. As far as I know the only
valid characters you can use in an ID (and as a class name, too) are:

A-Z, a-z, 0-9, _, -

Is that true? Are there any other valid characters that I can use in my
IDs, without going the whole hog and creating a new DTD? Example of a
link, just to make it clear which bit I mean:

a href=index.html class=TheFunction
id=TheFunction_%6237%6882/34_923%4623%4-234+6+3-2343Click here to run
The Function/a

Many thanks in advance

Chris
**
The discussion list for  http://webstandardsgroup.org/

 See http://webstandardsgroup.org/mail/guidelines.cfm
 for some hints on posting to the list  getting help
**

**
The discussion list for  http://webstandardsgroup.org/

 See http://webstandardsgroup.org/mail/guidelines.cfm
 for some hints on posting to the list  getting help
**



RE: [WSG] Valid characters in ID attribute

2005-06-07 Thread Chris Taylor
Great, thanks. I'm very pleased that I can use periods and colons, that
makes it much easier. Because this system will only be reading the ID
through the DOM and not referring to it for style reasons I'm going to
stick with the underscores. However I'll remember that advice for the
future.

Many thanks.

Chris

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Nick Gleitzman
Sent: 07 June 2005 14:02
To: wsg@webstandardsgroup.org
Subject: Re: [WSG] Valid characters in ID attribute


On 7 Jun 2005, at 9:35 PM, Ricci Angela wrote:

 But I'd avoid using underscore for id/class names... I've already had 
 intermitent bugs with IE6 because of it (specially for links).

Ditto for Safari... earlier versions, anyway. More recent versions may
have been fixed, but I avoid them (underscores) anyway.

N
___
Omnivision. Websight.
http://www.omnivision.com.au/

**
The discussion list for  http://webstandardsgroup.org/

 See http://webstandardsgroup.org/mail/guidelines.cfm
 for some hints on posting to the list  getting help
**

**
The discussion list for  http://webstandardsgroup.org/

 See http://webstandardsgroup.org/mail/guidelines.cfm
 for some hints on posting to the list  getting help
**



Re: [WSG] Valid characters in ID attribute

2005-06-07 Thread Robin Berjon

Chris Taylor wrote:

Great, thanks. I'm very pleased that I can use periods and colons, that
makes it much easier.


Not sure this applies to your case but note that colons are fine in HTML 
but forbidden in XHTML.


--
Robin Berjon
  Senior Research Scientist
  Expway, http://expway.com/


**
The discussion list for  http://webstandardsgroup.org/

See http://webstandardsgroup.org/mail/guidelines.cfm
for some hints on posting to the list  getting help
**



RE: [WSG] Valid characters in ID attribute

2005-06-07 Thread Chris Taylor
Thanks, obviously ideally I'd like my function to be XHTML-compliant as
well. Fortunately I've worked out a way I can do what I want to do using
just dashes, periods and alphanumeric characters.

Thanks for all the help.

Chris


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Robin Berjon
Sent: 07 June 2005 16:22
To: wsg@webstandardsgroup.org
Subject: Re: [WSG] Valid characters in ID attribute

Chris Taylor wrote:
 Great, thanks. I'm very pleased that I can use periods and colons, 
 that makes it much easier.

Not sure this applies to your case but note that colons are fine in HTML
but forbidden in XHTML.

--
Robin Berjon
   Senior Research Scientist
   Expway, http://expway.com/


**
The discussion list for  http://webstandardsgroup.org/

 See http://webstandardsgroup.org/mail/guidelines.cfm
 for some hints on posting to the list  getting help
**

**
The discussion list for  http://webstandardsgroup.org/

 See http://webstandardsgroup.org/mail/guidelines.cfm
 for some hints on posting to the list  getting help
**