### 3: Links to Web Content in the Workspace

Links to web content within the Eclipse workspace must be treated specially. It is possible to use absolute paths in links to local resources. However, the location of the file might change (when the project is opened on a different machine for example), rendering the links useless. Also, direct linking to HTML files does not allow Gild Web Browser to format the page before displaying it. Special features, like source code embedding, could not be achieved.

As a result, a special tag was created as the only means of navigating to other HTML files in the workspace. Again, the links look just like regular HTML links, but will reference content in the Eclipse workspace rather than on the web.

Below is an example of a page rendered with such a link, and the HTML source that created that link:

`<p>For an even more basic example, select this link: <a href= 'javascript:navigate( "ca.uvic.gild.docs", "webbrowser/docs/HelloWorld.html" )'>Hello World</a>.</p>`

The link works by using a specialized JavaScript function called `navigate`. `navigate` has two parameters:

| Project: The name of the project in which the web content is contained. The project must be openned in the workspace, and it must be a Java project.
| File: The name of the file that contains the web content. The name must include the entire path of the file, relative to the project in which it is contained.