<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body><section><h1>object 要素 codebase 属性 (HTML, XHTML 1)</h1><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="1" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[1]</anchor-end> <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">HTML</anchor> の <code class="HTMLe"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">object</anchor></code> 要素の
<dfn><code class="HTMLa">codebase</code> 属性</dfn>は、
<code class="HTMLa"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">classid</anchor></code>, <code class="HTMLa"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">data</anchor></code>,
<code class="HTMLa"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">archive</anchor></code> の属性値の<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">相対URI参照</anchor>を解決するための<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">基底URI</anchor>
を指定します。</p><p>詳しくは <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">HTML//基底URI</anchor> もご覧ください。</p><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="2" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[2]</anchor-end> 仕様書: 
<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">HTML 4</anchor>
<anchor-external xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resScheme="IW" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resParameter="HTML4:&quot;struct/objects.html#adef-codebase-OBJECT&quot;">IW:HTML4:&quot;struct/objects.html#adef-codebase-OBJECT&quot;</anchor-external></p><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="11" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[11]</anchor-end>
HTML 4 DTD の<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">注釈</anchor> (参考) には
<q>base URI for classid, data, archive</q>
と書かれています。</p><section><h1>属性値</h1><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="3" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[3]</anchor-end> この属性の値は <code class="SGML">%<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">URI</anchor></code> です。
<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">SGML</anchor> 的には <code class="SGML"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">CDATA</anchor></code> 
です。</p><p><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">相対URI参照</anchor>を使うなというような規定は HTML 4 にはありません。
相対 URI 参照であったら <code class="HTMLe"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">base</anchor></code>
や文書自体の基底 URI を使うのでしょうか。</p><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="4" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[4]</anchor-end> この属性は省略可能です。
省略された場合は現在の文書の基底 URI が使われます。</p><p>(<q a0:resScheme="IW" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resParameter="HTML4:&quot;struct/objects.html#adef-codebase-OBJECT&quot;">default value is the base URI of the current document</q>。
<code class="HTMLe"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">base</anchor></code> による指定が影響するのか曖昧ですが、
意味的には影響するべきでしょう。)</p><form xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" ref="comment"></form></section><section><h1>例</h1><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="10" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[10]</anchor-end>
<code class="HTML"><code class="HTMLa">codebase</code>=&quot;<code class="URI">http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0</code>&quot;</code></p><p>出典: <cite>Macromedia - Flash TechNote : What effect does the version have in the codebase attribute of the OBJECT tag?</cite> <anchor-external xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resScheme="URI" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resParameter="http://www.macromedia.com/cfusion/knowledgebase/index.cfm?id=tn_12685&amp;mode=thankyou">http://www.macromedia.com/cfusion/knowledgebase/index.cfm?id=tn_12685&amp;mode=thankyou</anchor-external></p><form xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" ref="comment"></form></section><section><h1>メモ</h1><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="13" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[13]</anchor-end> <cite>Re: &lt;object&gt; element feedback</cite> (<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">Ian Hickson &lt;ian@...&gt;</anchor> 著, <time>2008-11-20 02:58:59 +09:00</time> 版) <anchor-external xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resScheme="URI" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resParameter="http://permalink.gmane.org/gmane.org.w3c.whatwg.discuss/16705">http://permalink.gmane.org/gmane.org.w3c.whatwg.discuss/16705</anchor-external></p><blockquote><p>It hasn't been removed, it just hasn't been defined yet. Not really sure 
how to define it. In IE it's a pointer to native windows code, in HTML4 
it's a base URL for resolution of relative URLs... Not sure what to do 
with it. Most browsers seem to ignore it.</p></blockquote><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="14" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[14]</anchor-end> <cite>Re: &lt;object&gt; element feedback</cite> (<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">Ian Hickson &lt;ian@...&gt;</anchor> 著, <time>2008-11-20 12:28:44 +09:00</time> 版) <anchor-external xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resScheme="URI" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resParameter="http://permalink.gmane.org/gmane.org.w3c.whatwg.discuss/16707">http://permalink.gmane.org/gmane.org.w3c.whatwg.discuss/16707</anchor-external></p><blockquote><p>Since the browsers all do different things, and since of those, Safari 
doesn't do anything with codebase=&quot;&quot; at all as far as I can tell and has 
not received many bugs about it as far as I can tell, I've continued the 
previous pattern of not doing anything.</p></blockquote></section></section><section><h1>applet 要素 codebase 属性</h1><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="5" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[5]</anchor-end> <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">HTML</anchor> の <code class="HTMLe"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">applet</anchor></code> 要素の
<dfn><code class="HTMLa">codebase</code> 属性</dfn>は、 applet
用の<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">基底URI</anchor> を指定します。</p><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="6" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[6]</anchor-end> 仕様書:<ul><li><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">HTML 4</anchor> <ul><li><code class="HTMLe">applet</code> 要素 <code class="HTMLa">codebase</code> 属性
<anchor-external xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resScheme="IW" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resParameter="HTML4:&quot;struct/objects.html#adef-codebase-APPLET&quot;">IW:HTML4:&quot;struct/objects.html#adef-codebase-APPLET&quot;</anchor-external></li><li><cite>HTML 4 Changes</cite>
<anchor-external xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resScheme="IW" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resParameter="HTML4:&quot;appendix/changes.html#h-A.1.1.9&quot;">IW:HTML4:&quot;appendix/changes.html#h-A.1.1.9&quot;</anchor-external></li></ul></li></ul></p><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="12" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[12]</anchor-end>
HTML 4 DTD の<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">注釈</anchor> (参考) には
<q>optional base URI for applet</q>
と書かれています。
(<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">名無しさん</anchor> [sage])</p><form xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" ref="comment"></form><section><h1>代替</h1><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="9" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[9]</anchor-end> この属性は要素型ごと<strong>非推奨</strong>です。
<code class="HTMLe">applet</code> 要素の代わりに <code class="HTMLe"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">object</anchor></code>
要素が使えます。 <code class="HTMLa">codebase</code> 属性は同名の属性 (<anchor-internal xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="1" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">&gt;&gt;1</anchor-internal>) が代替となります。</p><form xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" ref="comment"></form></section><section><h1>属性値</h1><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="7" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[7]</anchor-end> この属性の値は <code class="SGML">%<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">URI</anchor></code> です。
<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">SGML</anchor> 的には <code class="SGML"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">CDATA</anchor></code> です。</p><p>この属性の値は現在の文書を含んでいる階層 (directory)
の部分 directory を参照するもののみ認められます。 <sup> [HTML 4] </sup>
(この制限は <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">HTML 3.2</anchor> や HTML 4 当時の共通の慣習とは異なりますが、
安全のためにこう規定したそうです。 <src xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:10:">HTML 4.01 13.4</src>)</p><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="8" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[8]</anchor-end> この属性は省略可能です。省略した場合は現在の文書と同じ基底 URI
になります。 <anchor-internal xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="4" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">&gt;&gt;4</anchor-internal> と <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">HTML//基底URI</anchor> も参照してください。</p><form xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" ref="comment"></form></section><section><h1>メモ</h1><form xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" ref="comment"></form></section></section><section><h1>メモ</h1><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="15" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[15]</anchor-end> <cite xml:lang="en-us">codeBase Property (APPLET, OBJECT, HTMLObjectElement Constructor)</cite>
(<time>2010-03-14 22:35:17 +09:00</time> 版)
<anchor-external xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resScheme="URI" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resParameter="http://msdn.microsoft.com/en-us/library/ms533576(VS.85).aspx">http://msdn.microsoft.com/en-us/library/ms533576(VS.85).aspx</anchor-external></p><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="16" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[16]</anchor-end> <cite xml:lang="en">Remove &lt;applet&gt;</cite>
(<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">zcorpan</anchor>著, <time>2017-08-21 22:19:30 +09:00</time>)
<anchor-external xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resScheme="URI" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resParameter="https://github.com/whatwg/html/commit/b9b9d60f9451c05f8e8d542e4094f987ae1a5fb8">https://github.com/whatwg/html/commit/b9b9d60f9451c05f8e8d542e4094f987ae1a5fb8</anchor-external></p><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="17" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[17]</anchor-end> <cite xml:lang="en">Remove &lt;applet&gt;</cite>
(<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">zcorpan</anchor>著, <time>2017-08-21 22:19:30 +09:00</time>)
<anchor-external xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resScheme="URI" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resParameter="https://github.com/whatwg/html/commit/b9b9d60f9451c05f8e8d542e4094f987ae1a5fb8">https://github.com/whatwg/html/commit/b9b9d60f9451c05f8e8d542e4094f987ae1a5fb8</anchor-external></p></section></body></html>