<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="ProcessingInstruction_style" ?>
<?xml-stylesheet type="text/css" href="ProcessingInstruction_style2" ?>
<?xml-stylesheet type='text/css' href='../base.css' ?>
<?xml-stylesheet type="text/css" href="../basexml.css" ?>
<!--DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/strict.dtd"-->

<!-- Work done for Netscape.  Public domain. -->

<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
<head>
<title>DOM Test Suite: Interface ProcessingInstruction</title>
<meta http-equiv="Content-Script-Type" content="text/javascript" />
<link rel="copyright" href="http://dbaron.org/legal.html" />
<link rel="stylesheet" type="text/css" href="../base.css" />
<script type="text/javascript" src="../base.js" />
<script type="text/javascript"><![CDATA[

function testProcessingInstruction() {
	if ( ! ( canOutputWarn() &&
	         existsWarn("document")
	       )) {
		return;
	}

	pione = document.firstChild;
	pitwo = pione.nextSibling;

	outText("Changing the first stylesheet by changing pione.data.");

	pione.data = 'type="text/css" href="ProcessingInstruction_style3"';

	shouldBe("pione.nodeValue", 
		"'type=\"text/css\" href=\"ProcessingInstruction_style3\"'");
	shouldBe("pione.data", 
		"'type=\"text/css\" href=\"ProcessingInstruction_style3\"'");

	outText("Changing the second stylesheet by changing pitwo.nodeValue.");

	pitwo.nodeValue = 'type="text/css" href="ProcessingInstruction_style5"';

	shouldBe("pitwo.data", 
		"'type=\"text/css\" href=\"ProcessingInstruction_style5\"'");
	shouldBe("pitwo.nodeValue", 
		"'type=\"text/css\" href=\"ProcessingInstruction_style5\"'");

	outText("Now that the tests above, both of the samples above should have changed from red backgrounds to green.");

	outTaggedText("header", "Tests finished.");

}

]]></script>
</head>
<body>
<h1>DOM Test Suite: Interface <a href="http://www.w3.org/TR/REC-DOM-Level-1/level-one-core.html#ID-1004215813">ProcessingInstruction</a></h1>

<div>
	<input type="button" onclick="testProcessingInstruction()" value="test ProcessingInstruction" />
</div>

<h2>Testing area</h2>

<p class="test">First test</p>

<p class="test2">Second test</p>

<div id="output">
<h2>Output:</h2>

</div>

<hr title="Beginning of Footer" />
<p>(Back to
<a href="../">DOM Testing Information</a>,
<a href="../../../">David Baron</a>)</p>
<p><a href="/" title="David Baron's Homepage">LDB</a>,
<a rev="made" href="mailto:dbaron@fas.harvard.edu" title="Send e-mail to David Baron">dbaron@fas.harvard.edu</a></p>

</body></html>
