<html>
<link rel="stylesheet" href="josh.css">
<body bgcolor="#FFFFFF">

		<div id="Description">
			<table cellpadding="0" cellspacing="0" border="0" width="100%" class="main">
				<tr><td valign="top" class="name">implementation</td><td valign="top" nowrap class="compatibility">NN <span class="emphasis">6</span>  IE <span class="emphasis">5(Mac)/6(Win)</span>  DOM <span class="emphasis">1</span>&nbsp;&nbsp;</td>
				</tr>
				<tr>
					<td valign="top" nowrap class="usage"><p class="literal"></p>
					</td><td valign="top" nowrap class="requirements">&nbsp;&nbsp;</td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="description">
						<p>The <span class="literal">implementation</span> object (the JavaScript
reference for the W3C <span class="literal">DOMImplementation</span> object)
represents, to a limited degree, the environment that makes up the
document containerthe browser for our purposes. You can reach
this object via the <span class="literal">document.implementation</span>
property.
</p>
							</td>
						</tr>
						<tr>
							<td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
						</tr>
						<tr>
							<td colspan="2"><p>			Methods of the object let you see which DOM modules the browser
reports supporting. In Netscape 6, this object is also a gateway to
creating virtual W3C <span class="literal">Document</span> and
<span class="literal">DocumentType</span> objects outside of the current
document tree. Thus, in Netscape 6 you can use the
<span class="literal">document.implementation</span> property as a start to
generating a nonrendered document for external XML documents.
</p>
												</td>
</tr>
				<tr>
					<td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="objectmodelreference"><span class="title">Object Model Reference</span></td>
				</tr>
				<tr>
					<td colspan="2"><p>			<span class="literal">document.implementation</span></p>
					</td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="objectspecificproperties"><span class="title">Object-Specific Properties</span></td>
				</tr>
				<tr>
					<td colspan="2"><p>			None. </p>
					</td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="objectspecificmethods"><span class="title">Object-Specific Methods</span></td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
				</tr>
				<tr>
					<td>
						<table border="1"><tbody><tr><td><span class="literal">createDocument( )</span></td><td><span class="literal">createDocumentType( )</span></td><td><span class="literal">hasFeature( )</span></td>
								</tr>
							</tbody></table>
					</td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="objectspecificeventhandlerproperties"><span class="title">Object-Specific Event Handler Properties</span></td>
				</tr>
				<tr>
					<td colspan="2"><p>			None. </p>
					</td>
				</tr>
			</table>
		</div><div id="createDocument( )">
			<table cellpadding="0" cellspacing="0" border="0" width="100%" class="main">
				<tr><td valign="top" class="name">createDocument( )</td><td valign="top" nowrap class="compatibility">NN <span class="emphasis">6</span> IE <span class="emphasis">n/a</span>  DOM <span class="emphasis">2</span>&nbsp;&nbsp;</td>
				</tr>
				<tr>
					<td valign="top" nowrap class="usage"><p class="literal">createDocument("<span class="replaceable">namespaceURI</span>",
"<span class="replaceable">qualifiedName</span>",
<span class="replaceable">docTypeReference</span>)</p>
					</td><td valign="top" nowrap class="requirements">&nbsp;&nbsp;</td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="description">
						<p>Returns a reference to a newly created virtual W3C DOM
<span class="literal">Document</span> (not the <span class="literal">document</span> node
of an HTML document) object. Netscape 6 extends this
<span class="literal">Document</span> object with a <span class="literal">load( )</span>
method that permits the loading of XML documents into the browser,
although they are invisible to the user. Scripts may then access the
document tree of the XML document as a data source for rendering
information in the HTML document. If you are loading an external XML
document, you can create the <span class="literal">Document</span> object with
blank values for the three parameters:
</p>
<span class="PROGRAMLISTING"><pre>var myXDoc = document.implementation.createDocument(&quot;&quot;, &quot;&quot;, null);</pre></span>
							</td>
						</tr>
						<tr>
							<td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
						</tr>
						<tr>
							<td colspan="2"><p>			When the external document loads, any namespace and DOCTYPE concerns
will be controlled by the document's content. For an
example, see Section 5.9.2 in Chapter 5.
</p>
												</td>
</tr>
				<tr>
					<td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="parameters"><span class="title">Parameters</span></td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
				</tr>
				<tr>
					<td>
						<ul><li><span class="literal"></span>String of the namespace URI for a new XML document element.</li><li><span class="literal"></span>String identifier for the qualified name for the new document element.</li><li><span class="literal"></span>Reference to a <span class="literal">DocumentType</span> node (which may be
generated from the
<span class="literal">DocumentImplementation.createDocumentType( )</span>
method).
</li></ul>
					</td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="returnedvalue"><span class="title">Returned Value</span></td>
				</tr>
				<tr>
					<td colspan="2"><p>			Reference to an empty <span class="literal">Document</span> object.</p>
					</td>
				</tr>
			</table>
		</div><div id="createDocumentType( )">
			<table cellpadding="0" cellspacing="0" border="0" width="100%" class="main">
				<tr><td valign="top" class="name">createDocumentType( )</td><td valign="top" nowrap class="compatibility">NN <span class="emphasis">6</span> IE <span class="emphasis">n/a</span>  DOM <span class="emphasis">2</span>&nbsp;&nbsp;</td>
				</tr>
				<tr>
					<td valign="top" nowrap class="usage"><p class="literal">createDocumentType("<span class="replaceable">qualifiedName</span>",
"<span class="replaceable">publicID</span>",
"<span class="replaceable">systemID</span>")</p>
					</td><td valign="top" nowrap class="requirements">&nbsp;&nbsp;</td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="description">
						<p>Returns a reference to a newly created virtual W3C DOM
<span class="literal">DocumentType</span> object. You can feed the object
returned from this method to the
<span class="literal">DocumentImplementation.createDocument( )</span> method.
</p>
												</td>
</tr>
				<tr>
					<td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="parameters"><span class="title">Parameters</span></td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
				</tr>
				<tr>
					<td>
						<ul><li><span class="literal"></span>String identifier for the qualified name for the new document element.</li><li><span class="literal"></span>String of the public identifier for the <span class="literal">DOCTYPE</span>.</li><li><span class="literal"></span>String of the system identifier (typically, the URI of the DTD file)
for the <span class="literal">DOCTYPE</span>.
</li></ul>
					</td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="returnedvalue"><span class="title">Returned Value</span></td>
				</tr>
				<tr>
					<td colspan="2"><p>			Reference to a <span class="literal">DocumentType</span> object not yet
associated with a <span class="literal">Document</span> object.
</p>
					</td>
				</tr>
			</table>
		</div><div id="hasFeature( )">
			<table cellpadding="0" cellspacing="0" border="0" width="100%" class="main">
				<tr><td valign="top" class="name">hasFeature( )</td><td valign="top" nowrap class="compatibility">NN <span class="emphasis">6</span> IE <span class="emphasis">5(Mac)/6(Win)</span>  DOM <span class="emphasis">1</span>&nbsp;&nbsp;</td>
				</tr>
				<tr>
					<td valign="top" nowrap class="usage"><p class="literal">hasFeature("<span class="replaceable">feature</span>",
"<span class="replaceable">version</span>")</p>
					</td><td valign="top" nowrap class="requirements">&nbsp;&nbsp;</td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="description">
						<p>Returns a Boolean <span class="literal">true</span> if the browser application
supports (i.e., conforms to the required specifications of) a stated
W3C DOM module and version. The closely related <span class="literal">isSupported(
)</span> method performs the same test on an individual node,
allowing you to verify feature support for the current node type.
Parameter values for the two methods are identical.
</p>
							</td>
						</tr>
						<tr>
							<td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
						</tr>
						<tr>
							<td colspan="2"><p>			It is up to the browser maker to validate that the DOM implemented in
the browser conforms with each module before allowing the browser to
return <span class="literal">true</span> for the module. That
doesn't necessarily mean that the implementation is
bug-free or consistent with other implementations. Caveat scriptor.
</p>
							</td>
						</tr>
						<tr>
							<td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
						</tr>
						<tr>
							<td colspan="2"><p>			In theory, you could use this method to verify module support prior
to accessing a property or invoking a method. The following script
fragment from the head portion of a document dynamically links a
different external style sheet file for
"true" CSS2 support:
</p>
<span class="PROGRAMLISTING"><pre>var cssFile;
if (document.implementation.hasFeature(&quot;CSS&quot;, &quot;2.0&quot;)) {
    cssFile = &quot;styles/corpStyle2.css&quot;;
} else {
    cssFile = &quot;styles/corpStyle1.css&quot;;
}
document.write(&lt;link rel='stylesheet' type='text/css' href='&quot; + cssFile + &quot;'&gt;&quot;);&quot;</pre></span>
							</td>
						</tr>
						<tr>
							<td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
						</tr>
						<tr>
							<td colspan="2"><p>			More browsers support this browser-wide method than the
element-specific method, which may help more developers deploy it
sooner.
</p>
												</td>
</tr>
				<tr>
					<td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="parameters"><span class="title">Parameters</span></td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
				</tr>
				<tr>
					<td>
						<ul><li><span class="literal"></span>As of W3C DOM Level 2, permissible case-sensitive module name strings
are: <span class="literal">Core</span>, <span class="literal">XML</span>,
<span class="literal">HTML</span>, <span class="literal">Views</span>,
<span class="literal">StyleSheets</span>, <span class="literal">CSS</span>,
<span class="literal">CSS2</span>, <span class="literal">Events</span>,
<span class="literal">UIEvents</span>, <span class="literal">MouseEvents</span>,
<span class="literal">MutationEvents</span>, <span class="literal">HTMLEvents</span>,
<span class="literal">Range</span>, and <span class="literal">Traversal</span>.
</li><li><span class="literal"></span>String representation of the major and minor version of the DOM
module cited in the first parameter. For the W3C DOM Level 2, the
version is <span class="literal">2.0</span>, even when the DOM module supports
another W3C standard that has its own numbering system. Thus, the
test for HTML DOM module support is for Version 2.0, even though HTML
is at 4.x.
</li></ul>
					</td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="returnedvalue"><span class="title">Returned Value</span></td>
				</tr>
				<tr>
					<td colspan="2"><p>			Boolean value: <span class="literal">true</span> | <span class="literal">false</span>.</p>
					</td>
				</tr>
			</table>
		</div>

</body>
</html>