[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Tidy warnings and IDs and names



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 11/26/2005 10:38 AM, Jutta Wrage wrote:
> Hi!
> 
> http://people.debian.org/~alfie/tidy/ shows warnings about not being 
> able to copy name attribute to id.
> 
> I want to know, what to do with these warnings.

	Let's try to solve it. :)


> This can be caused mainly be two reasons:
> 
> 1. There is already an Id with the same name in that page
> 2. The name attribute contains characters not allowed in name or id [1]
> 
> The current errors are completely or mainly of kind 2.
> 
> HTML Spec [2] allows the following characters in name and id attributes:
> - the attribute mus begin wit a letter ([A-Za-z])
> - the following characters ma be letters, digits, hyphens, 
> underscores, colons and periods
> 
> The attributes ma not contain spaces, commas, or characters from non 
> ascii range and others.
> 
> Some examples of wrong usage:
> 
> - http://www.debian.org/devel/people contains name attributes with 
> spaces. The spaces should be deleted or replaced by unterscores. As 
> people.names is genereated outside, there may be a replace directive  in
> the wml file?
> - http://www.debian.org/CD/releases/ has names like "3.1 rev0a" which 
> contain spaces and a digist as first character. This can be replaced  by
> "debian3.1rev0a" or "debian3.1_rev0a"
> 
> For the second page I have already had a look, if something inside  the
> tree is pointing to the anchors, but seems nothing does.  References
> from other places will always reach the page though, if we  replace
> those names.
> 
> Another point to keep in mind here is using names or ids. In nost of 
> the cases, I'd just change the names to Ids, becaus we get in trouble 
> with the css fpr links. IN other cases, where the a-tag does not 
> contain a href, the atag just can be opened and shut again  immediately
> behind the name.

	From both cases, I believe the best approach is remove spaces and
get it replaced by "_". I don't know if it is better to use "-" or to
just cut out the space and get the text together. But looks like the
space replacement with "_" is a good choice. :)

	Kind regards,

- --
Felipe Augusto van de Wiel (faw)
"Debian. Freedom to code. Code to freedom!"
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)
Comment: Using GnuPG with Debian - http://enigmail.mozdev.org

iD4DBQFDnnSGCjAO0JDlykYRAhMPAJiN8aC7U2CLSm7vE/AiSRFCz3dnAJ98cLka
K8P38oG2FYzUJv1zeqoBlQ==
=GWAb
-----END PGP SIGNATURE-----



Reply to: