2004-01-10
ã¡ãã£ã¨é·ãã§ãã
ID屿§å¤ã¯å¤§æåã§ï¼ï¼
<TAG> ã® ID 屿§ã®å¤ `XXXX` ã«ã¯å°æåãå«ããªãããã«ãã¾ãããã
[å¼ç¨ï¼ Another HTML-lint: Explanation ãã]
Another HTML-lint ã§ISO-HTMLåã³HTML4ã®æ¤è¨¼ãè¡ãã¨ãID屿§å¤ã«å°æåãæå®ããã¦ãããè¦åãããããã«ãªãã¾ããã
ãã¦ãISO/IEC 15445:2000 ã® User's Guide to ISO/IEC 15445:2000 ã«ã¯ã次ã®ãããªè¨è¿°ãããã¾ãã
The case sensitivity of the ID attribute is controlled by the SYNTAX NAMING NAMECASE GENERAL YES rule [8879 13.4.5] of the SGML declaration used with ISO-HTML.
[å¼ç¨ï¼ User's Guide to ISO/IEC 15445:2000: 13.1 The A element type - Source and target anchors ãã]
SGML宣è¨ã® SYNTAX NAMING NAMECASE GENERAL YES è¦åã«åºãã¨ãããã¨ã¯ãISO-HTMLã«éããHTML4ï¼SGML Declaration of HTML 4ï¼ã«ãå
±éãããã¨ã ã¨è¨ãã¾ãã
ã§ã¯ãcontrolled by the
ã¨ã¯ãã©ããããã¨ã§ããããï¼SYNTAX NAMING NAMECASE GENERAL YES rule
Authors should take a conservative approach. Do not assume that the values PiZZa and pizza will match; if they are to match, write both as PIZZA.
[å¼ç¨ï¼ User's Guide to ISO/IEC 15445:2000: 13.1 The A element type - Source and target anchors ãã]
ä¾ãã° PiZZa 㨠pizza ã¯ã大æåå°æå以å¤ã«åºå¥ããªãã®ã§ã䏿æ§ã®ç¹ã§ä¸æ£ã§ããåã PIZZA ã¨ãã¦è§£éããããã¨ã«ãªãã¾ãï¼YES ã¨ã¯ã大æåã«ç½®ãæãã¦è§£éãããã¨ãæå³ãã¾ãï¼ã
以ä¸ã«ä¾ãæããã¨ã»ã»ã»
<a id="pizza">ä¸è¨ã¯ãä¸è¨ã®æ§ã«è§£éãããã
<a id="PIZZA">å³ã¡ãID屿§å¤ãå°æåã®ã¢ã³ã«ã¼ãåç
§ããå ´åã«ã¯ãAnother HTML-lint ã® çµæã®è§£èª¬ã«ã¯ã次ã®ä¾ã®æ§ã«ããªããã°ãªããªãã¨ããã¾ãã
ããã§æ³¨æããªããã°ãªããªãã®ã¯ã
<a id="foo">ãåç §ããã«ã¯
<a href="#FOO">ã¨ããªããã°ãªããªãã¨ãããã¨ã§ãã
[å¼ç¨ï¼ Another HTML-lint: Explanation ãã]
ã§ã¯ãæ¬¡ã®æ§ãªå ´åã«ã¯ã©ããªãã®ã§ããããï¼
次ã®ä¾ã¯ãAè¦ç´ ã«åæã«NAME屿§ã¨ID屿§ãåºç¾ããå ´åãä½ããå½ç¶ãªããä¸è¨ã®äºã«æ³¨æããªããã°ãªããªãã
The International Standard recommends that authors of ISO-HTML documents use both the ID attribute and the NAME attribute. If both are used, then they shall be given identical values since this allows an SGML parser to verify that the values for different anchors are distinct.
[å¼ç¨ï¼ User's Guide to ISO/IEC 15445:2000: 13.1 The A element type (defect) - Source and target anchors ãã]
<a id="pizza" name="pizza">ãã®ä¾ã¯ãNAME屿§ã¯ID屿§ã¨åãç®çã§ä½¿ããããNAME屿§ã«ã¯ãã®è¦åãé©ç¨ãããªãã®ã§ãä¸è¨ã®æ§ã«ãªãã
<a id="PIZZA" name="pizza">ããããã¨ãåæã«åºç¾ããID屿§ã¨NAME屿§ã®å±æ§å¤ãåè´ããªãçç¾ãçãããã¨ã«ãªãã¾ããå¾ã£ã¦ãå³å¯ã«ã¯åæã«åºç¾ããåæ¹ã®å±æ§å¤ã大æåã§è¨ããªããã°ãªããªããã¨ã«ãªãã¾ãã
ã¡ãã£ã¨ããããããªãã¾ããããã¤ã¾ãAnother HTML-lint çµæã®è§£èª¬ã«ããã¨ãSGMLçã«æ£ããã¯ã次ã®ãã¨ãæºããå¿ è¦ãããããã§ãã
ID屿§å¤ãå°æåã®ã¢ã³ã«ã¼ãåç §ããã«ã¯ã大æåã§åç §ããå¿ è¦ãããã- åæã«åºç¾ãã
ID屿§ã¨NAME屿§ã¯ãåæ¹ã®å±æ§å¤ãåè´ãããã°ãªããªãã - é¨åèå¥åã¨ã¢ã³ã«ã¼åã¨ã®æ¯è¼ã¯ã大æåå°æåã¾ã§æ£ç¢ºã«åè´ãããã°ãªããªãã
注é
- XHTMLææ¸åã«è¨ããã
id屿§å¤ã¸ã®ã¢ã³ã«ã¼ã®å ´åã«ã¯ããã®ãããªåé¡ã¯çºçãã¾ããã NAME屿§ã®ã¿ã®ä½¿ç¨ã®å ´åã¯æ¯éããã¾ãããä½ããNAME屿§ã¯ID屿§ã¨å ±ã«ç¨ãããã¨ãæ¨å¥¨ããã¦ãã¾ãã