blob: 905a6429ef25044590ed12405cf6ee103e69f9c6 [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2006. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<meta http-equiv="Content-Style-Type" content="text/css">
<link rel="STYLESHEET" href="../book.css" charset="ISO-8859-1" type="text/css">
<script language="JavaScript" src="PLUGINS_ROOT/org.eclipse.help/livehelp.js"></script>
<title>Using XHTML as intro content</title>
</head>
<body>
<h2>Using XHTML as intro content</h2>
<p>Depending on the usage scenario of the intro framework, XHTML files can be contributed as intro content. <span id="tooltip1" style="position: relative; display:none;" onclick="FP_changeProp(/*id*/'tooltip1',0,'style.display','none')"> <font color="#0000FF" style="cursor: hand;">(A reformulation of the three HTML 4 document types as applications of XML 1.0. For M5, only XHTML 1.0 is supported. XHTML 1.1 (module-based XHTML) can be supported, based on fee</font></span>The idea is to use the fact that XHTML is well formed XML and parse each document, manipulating the DOM to allow for contributions and extensions to be merged. Three xml elements from the 3.0 intro markup where used to extend the XHTML 1.0 element list. These where <code>include</code>, <code>anchor</code>, and <code> contentProvider</code>. </p>
<ul>
<li>&nbsp;<code><b>include</b>: </code>this element can be added to a valid XHTML document to include content from another XHTML document. The content to be included must be a valid XHTML snippet.</li>
</ul>
<blockquote>
<dl>
<dd>e.g.: <code>&lt;include path=&quot;root/foo&quot; /&gt;</code> will include an element with id <code>foo</code> from a welcome page with id <code>root</code>. </dd>
</dl>
</blockquote>
<ul>
<li>&nbsp;<code><b>anchor</b>: </code>this element can be added to a valid XHTML document to declare that content can be contributed to this page by other welcome contributions. A page declares locations that are suitable to be extended by defining these anchor points.</li>
</ul>
<blockquote>
<dl>
<dd>e.g.: <code>&lt;anchor id=&quot;anchor1&quot; /&gt;</code> will allow for contribution into this page from other plugins. </dd>
</dl>
</blockquote>
<ul>
<li><code><b>contentProvider</b>: </code>this element can be added to a valid XHTML document to establish a hook into the workbench. When the intro framework encounters this element, an interface is called allowing for the manipulation of the DOM of the XHTML page. &nbsp;&nbsp; </li>
</ul>
<dl>
<dd>
<dl>
<dd>e.g.: <code>&lt;contentProvider id=&quot;contentProviderId&quot; class=&quot;org.eclipse.ui.intro.template2.IntroXHTMLContentProvider&quot; pluginId=&quot;org.eclipse.ui.intro.template2&quot;&gt; &lt;/contentProvider&gt; <br>
</code>&nbsp;will allow for dynamic content to be generated from the <code> org.eclipse.ui.intro.template2.IntroXHTMLContentProvider</code> class.</dd>
</dl>
</dd>
</dl>
<p>With these three elements, XHTML pages can be used to assemble a pluggable and dynamic welcome pages, just like what used to happen with the custom intro xml markup. PDE has a new template that allow for the creation of a sample RCP application with an Intro. That template is a good sample project for using Intro. </p>
</body>
</html>