last modified 5th/Oct. 2000
HTML DTD の属性宣言には、パラメタ実体 %attrs;
が頻出します。パラメタ実体とは、要素、属性、属性の値などの集合として定義されるもので、 %attrs;
は殆どの要素に定義される属性の集合として定義されています。
Transitional DTD の抜粋;
<!ENTITY % attrs "%coreattrs; %i18n; %events;">
%attrs; は、パラメタ実体 %coreattrs;, %i18n;, %events; の集合として定義されています。
Transitional DTD の抜粋;
<!ENTITY % coreattrs "id ID #IMPLIED -- document-wide unique id -- class CDATA #IMPLIED -- space-separated list of classes -- style %StyleSheet; #IMPLIED -- associated style info -- title %Text; #IMPLIED -- advisory title --" > <!ENTITY % i18n "lang %LanguageCode; #IMPLIED -- language code -- dir (ltr|rtl) #IMPLIED -- direction for weak/neutral text --" > <!ENTITY % events "onclick %Script; #IMPLIED -- a pointer button was clicked -- ondblclick %Script; #IMPLIED -- a pointer button was double clicked-- onmousedown %Script; #IMPLIED -- a pointer button was pressed down -- onmouseup %Script; #IMPLIED -- a pointer button was released -- onmouseover %Script; #IMPLIED -- a pointer was moved onto -- onmousemove %Script; #IMPLIED -- a pointer was moved within -- onmouseout %Script; #IMPLIED -- a pointer was moved away -- onkeypress %Script; #IMPLIED -- a key was pressed and released -- onkeydown %Script; #IMPLIED -- a key was pressed down -- onkeyup %Script; #IMPLIED -- a key was released --" >
%attrs; に含まれる属性は、殆ど全ての要素に対して定義されています。従って、要素を識別する %coreattrs; に属する属性、文書の国際化のための %i18n; に含まれる属性、 動的なページの為のイベントを指定する %events; に含まれる属性は、殆ど全ての要素に対して定義されています。
%coreattrs;
id
= name [CS]class
= cdata-list [CS]style
= style [CN]title
= text [CS]%events;
onclick
= script [CT]ondblclick
= script [CT]onmousedown
= script [CT]onmouseup
= script [CT]onmouseover
= script [CT]onmousemove
= script [CT]onmouseout
= script [CT]onkeypress
= script [CT]onkeydown
= script [CT]onkeyup
= script [CT]