blob: 561c315370baa50902b477c0950923bf77595c6e [file] [log] [blame]
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" >
<title>Xdoc Samples</title>
<link href="book.css" rel="stylesheet" type="text/css">
<link href="code.css" rel="stylesheet" type="text/css">
<link rel="home" href="xtext.html" title="">
</head>
<body>
<a name="samples"></a>
<h1>Xdoc Samples</h1>
<p>
This is text for the introduction. You can <em>emphasize</em> elements and create multiple
paragraphs by adding a newline, like this. As you can see we also have splel checking
with corrections.
</p>
<p>
In the following the different syntactical elements are explained by example.
</p>
<a name="Links"></a>
<h2>References</h2>
<p>
The following is an <a href="http://www.google.com">external link</a>
and if you want to refer internally you can <a href="01-Introduction.html#Introduction" title="Go to &quot;Introduction&quot;">do so as well</a>.You can even
refer to Java code like this : <a class="jdoc" href="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html" title="View JavaDoc"><abbr title="java.lang.String" >String</abbr></a>.
</p>
<a name="CodeSections"></a>
<h2>Code Sections</h2>
<p>
A code section looks like this:
</p>
<p>
<div class="literallayout">
<div class="incode">
<p class="code">
&nbsp;&nbsp;&nbsp;&nbsp;<span class="keyword">class</span>&nbsp;HelloWorld&nbsp;{
<br/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="keyword">public</span>&nbsp;<span class="keyword">void</span>&nbsp;sayHello(String&nbsp;name)&nbsp;{
<br/>
System.out.println(<span class="string">"Hello&nbsp;"</span>+name);
<br/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
<br/>
&nbsp;&nbsp;&nbsp;&nbsp;}
<br/>
</p>
</div>
</div>
</p>
<p>
Note how the code is highlighted according to the language you choose.
It is even possible to have different language configurations to get different coloring.
</p>
<a name="Lists"></a>
<h2>Lists and Tables</h2>
<p>
Lists are very similar to HTML.
We&apos;ve got ordered lists:
<ol>
<li>
First
</li>
<li>
Second
</li>
<li>
Third
</li>
</ol>
</p>
<p>
and unordered lists:
</p>
<p>
<ul>
<li>
Foo
</li>
<li>
Bar
</li>
<li>
Baz
</li>
</ul>
</p>
<a name="Tables"></a>
<h2>Tables</h2>
<p>
<table>
<tr>
<td>
This is a table cell
</td>
<td>
and another one
</td>
</tr>
<tr>
<td>
table rows can contain many cells
</td>
<td>
but each row has to contain the same number of cells
</td>
</tr>
</table>
</p>
<a name="TODO"></a>
<h2>TODO</h2>
<p>
<div class="todo" >
document todo elements
</div>
</p>
<a name="Images"></a>
<h2>Images</h2>
<p>
Images are not fully supported by the new Xtend generator,
but will of course be readded soon :-)
</p>
</body>
</html>