| <?xml version="1.0" encoding="UTF-8"?> |
| <!-- |
| Copyright 2004, 2005, 2006 The Apache Software Foundation |
| |
| Licensed under the Apache License, Version 2.0 (the "License"); |
| you may not use this file except in compliance with the License. |
| You may obtain a copy of the License at |
| |
| http://www.apache.org/licenses/LICENSE-2.0 |
| |
| Unless required by applicable law or agreed to in writing, software |
| distributed under the License is distributed on an "AS IS" BASIS, |
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| See the License for the specific language governing permissions and |
| limitations under the License. |
| --> |
| <document> |
| <properties> |
| <title>Relation</title> |
| </properties> |
| <body> |
| |
| <section name="Relation"> |
| |
| <p> |
| Creates a relationship between two documents. Examples of such relationships |
| include: stylesheet, alternate stylesheet, shortcut icon, copyright, bookmark, |
| chapter, glossary, help, home, next, prev, e.t.c. |
| </p> |
| <p> |
| Note that a Shell component is required when using the Relation element. |
| The Shell component is responsible for gathering all Relation |
| components found in a page, and rendering them inside the |
| <code><head></code> tag. |
| </p> |
| <p> |
| <strong>See also:</strong> |
| <a href="style.html">Style</a> |
| , |
| <a href="shell.html">Shell</a> |
| </p> |
| |
| <section name="Parameters"> |
| <table> |
| <tr> |
| <th>Name</th> |
| <th>Type</th> |
| <th>Required</th> |
| <th>Default</th> |
| <th>Description</th> |
| </tr> |
| |
| <tr> |
| <td>href</td> |
| <td>String or |
| <a href="../../apidocs/org/apache/tapestry/IAsset.html">IAsset</a> |
| </td> |
| <td>yes</td> |
| <td></td> |
| <td>The target URL of the related resource.</td> |
| </tr> |
| |
| <tr> |
| <td>rel</td> |
| <td>String</td> |
| <td>no</td> |
| <td>literal:stylesheet</td> |
| <td>Defines the relationship between the current document and the targeted document.</td> |
| </tr> |
| |
| <tr> |
| <td>type</td> |
| <td>String</td> |
| <td>no</td> |
| <td>literal:text/css</td> |
| <td>Specifies the MIME type of the target URL.</td> |
| </tr> |
| |
| <tr> |
| <td>rev</td> |
| <td>String</td> |
| <td>no</td> |
| <td></td> |
| <td>Defines the relationship between the targeted document and the current document, |
| i.e. the reverse relationship.</td> |
| </tr> |
| |
| <tr> |
| <td>title</td> |
| <td>String</td> |
| <td>no</td> |
| <td></td> |
| <td>The title of the relation.</td> |
| </tr> |
| |
| <tr> |
| <td>media</td> |
| <td>String</td> |
| <td>no</td> |
| <td></td> |
| <td>Specifies on which device the document will be displayed.</td> |
| </tr> |
| </table> |
| |
| <p> |
| Body: |
| <strong>removed</strong> |
| </p> |
| |
| <p> |
| Informal parameters: |
| <strong>forbidden</strong> |
| </p> |
| |
| <p> |
| Reserved parameters: |
| <em>none</em> |
| </p> |
| |
| </section> |
| |
| <section name="Examples"> |
| |
| <p> |
| This example demonstrates how a component (in this case Article) can declare |
| relationships to external documents. In this case, all declarations |
| (a stylesheet, a shortcut icon and a copyright document) are rendered inside the |
| <code><head></code> tag of the containing page. |
| </p> |
| |
| <p>Home.html</p> |
| <source xml:space="preserve"> |
| <html jwcid="@Shell" title="Relation Example"> |
| <body jwcid="@Body"> |
| <span jwcid="@Article"/> |
| </body> |
| </html> |
| </source> |
| <p>Article.html</p> |
| <source xml:space="preserve"> |
| <link jwcid="@Relation" href="main.css" media="all"/> |
| <link jwcid="@Relation" rel="shortcut icon" href="favicon.ico" type="image/gif"/> |
| <link jwcid="@Relation" rel="copyright" href="http://www.gnu.org/copyleft/fdl.html"/> |
| Article details ... |
| </source> |
| <p>Article.jwc</p> |
| <source xml:space="preserve"> |
| <component-specification allow-body="yes" allow-informal-parameters="no"> |
| </component-specification> |
| </source> |
| </section> |
| |
| </section> |
| |
| </body> |
| </document> |