KD-one: Anker in einer Tabelle - Netscape?

Beitrag lesen

Hi MudGuard,

a) Ankernamen müssen mit einem Buchstaben beginnen.

Unsinn.

Warum?

<cite src=http://www.w3.org/TR/html401/struct/links.html#h-12.2>:

<cite src=http://edition-w3.de/TR/1999/REC-html401-19991224/types.html#type-cdata>:

Auszug:
"CDATA ist eine Folge von Zeichen des Dokument-Zeichensatzes und kann Zeichen-Entities enthalten. Benutzerprogramme sollten Attributwerte folgendermaßen interpretieren:

* Zeichen-Entities durch Zeichen ersetzen
    * Zeilenumbrüche ignorieren
    * Jeden Zeilenwechsel oder Tabulatorsprung durch ein einzelnes Leerzeichen ersetzen"
[...]
"ID- und NAME-tokens müssen mit einem Buchstaben ([A-Za-z]) beginnen, diesem kann eine beliebige Anzahl von Buchstaben, Ziffern ([0-9]), Bindestrichen (»-«), Unterstrichen (»_«), Doppelpunkten (»:«) und Punkten (».«) folgen."</cite>
Name-Attribute sind doch vom Typ cdata und auch casesensitiv.

<cite src=http://www.w3.org/TR/html401/struct/links.html#adef-name-A>
name = cdata [CS]
    This attribute names the current anchor so that it may be the destination of another link. The value of this attribute must be a unique anchor name. The scope of this name is the current document. Note that this attribute shares the same name space as the id attribute.
</cite>

Ja und?
Das Dokument sagt nur aus, dass das Name-Attribut denselben Namensraum beansprucht wie "id".

<cite src=http://www.w3.org/TR/html401/types.html#type-cdata>

CDATA is a sequence of characters from the document character set and may include character entities. User agents should interpret attribute values as follows:

* 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.
</cite>

Es gibt keine Einschränkung, die besagt, daß Ankernamen mit einem Buchstaben beginnen müssen.

Doch.
Du hättest nur eine einzige Zeile wqeiterlesen müssen.
Das Dokument wird nämlich damit fortgesetzt:
<cite src=http://edition-w3.de/TR/1999/REC-html401-19991224/types.html#type-cdata>

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]).</cite>

Und das Ganze nochmals auf Deutsch:

<cite src=http://edition-w3.de/TR/1999/REC-html401-19991224/types.html#type-cdata># ID- und NAME-tokens müssen mit einem Buchstaben ([A-Za-z]) beginnen, diesem kann eine beliebige Anzahl von Buchstaben, Ziffern ([0-9]), Bindestrichen (»-«), Unterstrichen (»_«), Doppelpunkten (»:«) und Punkten (».«) folgen.

IDREF und IDREFS sind Verweise auf durch andere Attribute definierte ID-tokens. IDREF ist ein Einzel-Token und IDREFS ist eine durch Leerzeichen getrennte Liste von Tokens.

NUMBER-tokens müssen mindestens eine Ziffer ([0-9]) enthalten.</cite>

Gruß

Kurt

--
Nein, ich beantworte keine Anfragen per e-mail.
ss:( zu:) ls:[ fo:) de:] va:| ch:| sh:( n4:° rl:( br:? js:| ie:% fl:( mo:?
"Man sieht nur mit dem Herzen gut. Das Wesentliche ist fuer die Augen unsichtbar."  (Antoine de Saint-Exupéry; fr. Schriftsteller u. Kampfflieger; 1900-1944)
http://elektro-dunzinger.at
http://shop.elektro-dunzinger.at