Modified: websites/production/tapestry/content/component-templates.html ============================================================================== --- websites/production/tapestry/content/component-templates.html (original) +++ websites/production/tapestry/content/component-templates.html Thu Oct 27 17:20:26 2016 @@ -45,18 +45,13 @@ <div class="wrapper bs"> - <div id="navigation"><div class="nav"> -<ul class="alternate"><li><a href="index.html">Home</a></li><li><a href="getting-started.html">Getting Started</a></li><li><a href="documentation.html">Documentation</a></li><li><a href="download.html">Download</a></li><li><a href="about.html">About</a></li><li><a href="community.html">Community</a></li><li><a class="external-link" href="http://www.apache.org/">Apache</a></li><li><a class="external-link" href="http://www.apache.org/foundation/sponsorship.html">Sponsorship</a></li><li><a class="external-link" href="http://www.apache.org/foundation/thanks.html">Thanks</a></li></ul> -</div></div> + <div id="navigation"><div class="nav"><ul class="alternate"><li><a href="index.html">Home</a></li><li><a href="getting-started.html">Getting Started</a></li><li><a href="documentation.html">Documentation</a></li><li><a href="download.html">Download</a></li><li><a href="about.html">About</a></li><li><a href="community.html">Community</a></li><li><a class="external-link" href="http://www.apache.org/">Apache</a></li><li><a class="external-link" href="http://www.apache.org/foundation/sponsorship.html">Sponsorship</a></li><li><a class="external-link" href="http://www.apache.org/foundation/thanks.html">Thanks</a></li></ul></div></div> <div id="top"> - <div id="smallbanner"><div class="searchbox" style="float:right;margin: .3em 1em .1em 1em"><span style="color: #999; font-size: 90%">Tapestry docs, issues, wikis & blogs:</span> -<form enctype="application/x-www-form-urlencoded" method="get" action="http://tapestry.apache.org/search.html"> - <input type="text" name="q"> - <input type="submit" value="Search"> -</form> - -</div><div class="emblem" style="float:left"><p><a href="index.html"><span class="confluence-embedded-file-wrapper"><img class="confluence-embedded-image confluence-external-resource" src="http://tapestry.apache.org/images/tapestry_small.png" data-image-src="http://tapestry.apache.org/images/tapestry_small.png"></span></a></p></div><div class="title" style="float:left; margin: 0 0 0 3em"><h1 id="SmallBanner-PageTitle">Component Templates</h1></div></div> + <div id="smallbanner"><div class="searchbox" style="float:right;margin: .3em 1em .1em 1em"><span style="color: #999; font-size: 90%">Tapestry docs, issues, wikis & blogs:</span><form enctype="application/x-www-form-urlencoded" method="get" action="http://tapestry.apache.org/search.html"> + <input type="text" name="q"> + <input type="submit" value="Search"> +</form></div><div class="emblem" style="float:left"><p><a href="index.html"><span class="confluence-embedded-file-wrapper"><img class="confluence-embedded-image confluence-external-resource" src="http://tapestry.apache.org/images/tapestry_small.png" data-image-src="http://tapestry.apache.org/images/tapestry_small.png"></span></a></p></div><div class="title" style="float:left; margin: 0 0 0 3em"><h1 id="SmallBanner-PageTitle">Component Templates</h1></div></div> <div class="clearer"></div> </div> @@ -68,100 +63,61 @@ </div> <div id="content"> - <div id="ConfluenceContent"><div class="aui-label" style="float:right" title="Related Articles"> - - - - - - - - -<h3>Related Articles</h3> - -<ul class="content-by-label"><li> - <div> - <span class="icon aui-icon aui-icon-small aui-iconfont-page-default" title="Page">Page:</span> </div> - - <div class="details"> - <a href="content-type-and-markup.html">Content Type and Markup</a> - - - </div> - </li><li> - <div> - <span class="icon aui-icon aui-icon-small aui-iconfont-page-default" title="Page">Page:</span> </div> - - <div class="details"> - <a href="templating-and-markup-faq.html">Templating and Markup FAQ</a> - - - </div> - </li><li> - <div> - <span class="icon aui-icon aui-icon-small aui-iconfont-page-default" title="Page">Page:</span> </div> - - <div class="details"> - <a href="component-classes.html">Component Classes</a> - - - </div> - </li><li> - <div> - <span class="icon aui-icon aui-icon-small aui-iconfont-page-default" title="Page">Page:</span> </div> - - <div class="details"> - <a href="component-reference.html">Component Reference</a> - - - </div> - </li><li> - <div> - <span class="icon aui-icon aui-icon-small aui-iconfont-page-default" title="Page">Page:</span> </div> - - <div class="details"> - <a href="component-libraries.html">Component Libraries</a> - - - </div> - </li><li> - <div> - <span class="icon aui-icon aui-icon-small aui-iconfont-page-default" title="Page">Page:</span> </div> - - <div class="details"> - <a href="request-processing.html">Request Processing</a> - - - </div> - </li><li> - <div> - <span class="icon aui-icon aui-icon-small aui-iconfont-page-default" title="Page">Page:</span> </div> - - <div class="details"> - <a href="configuration.html">Configuration</a> - - - </div> - </li><li> - <div> - <span class="icon aui-icon aui-icon-small aui-iconfont-page-default" title="Page">Page:</span> </div> - - <div class="details"> - <a href="component-parameters.html">Component Parameters</a> - - - </div> - </li><li> - <div> - <span class="icon aui-icon aui-icon-small aui-iconfont-page-default" title="Page">Page:</span> </div> - - <div class="details"> - <a href="assets.html">Assets</a> - - - </div> - </li></ul> -</div><p>Under Tapestry, a <strong>component template</strong> is a file that contains the markup for a component.</p><p>Component templates are <em>well formed XML documents</em>. That means that every open tag must have a matching close tag, every attribute must be quoted, and so forth.</p><p><em>Note: At runtime, Tapestry parses the documents and only checks for wellformedness. Even when the document has a DTD or schema, there are no validity checks.</em></p><p>For the most part, these templates are standard HTML/XHTML; Tapestry extensions to ordinary markup are provided in the form of a Tapestry namespace:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeHeader panelHeader pdl" style="border-bottom-width: 1px;"><b>A template for a page</b></div><div class="codeContent panelContent pdl"> + <div id="ConfluenceContent"><div class="aui-label" style="float:right" title="Related Articles"><h3>Related Articles</h3><ul class="content-by-label"><li> + <div> + <span class="icon aui-icon aui-icon-small aui-iconfont-page-default" title="Page">Page:</span> + </div> + <div class="details"> + <a href="content-type-and-markup.html">Content Type and Markup</a> + </div> </li><li> + <div> + <span class="icon aui-icon aui-icon-small aui-iconfont-page-default" title="Page">Page:</span> + </div> + <div class="details"> + <a href="templating-and-markup-faq.html">Templating and Markup FAQ</a> + </div> </li><li> + <div> + <span class="icon aui-icon aui-icon-small aui-iconfont-page-default" title="Page">Page:</span> + </div> + <div class="details"> + <a href="component-classes.html">Component Classes</a> + </div> </li><li> + <div> + <span class="icon aui-icon aui-icon-small aui-iconfont-page-default" title="Page">Page:</span> + </div> + <div class="details"> + <a href="component-reference.html">Component Reference</a> + </div> </li><li> + <div> + <span class="icon aui-icon aui-icon-small aui-iconfont-page-default" title="Page">Page:</span> + </div> + <div class="details"> + <a href="component-libraries.html">Component Libraries</a> + </div> </li><li> + <div> + <span class="icon aui-icon aui-icon-small aui-iconfont-page-default" title="Page">Page:</span> + </div> + <div class="details"> + <a href="request-processing.html">Request Processing</a> + </div> </li><li> + <div> + <span class="icon aui-icon aui-icon-small aui-iconfont-page-default" title="Page">Page:</span> + </div> + <div class="details"> + <a href="configuration.html">Configuration</a> + </div> </li><li> + <div> + <span class="icon aui-icon aui-icon-small aui-iconfont-page-default" title="Page">Page:</span> + </div> + <div class="details"> + <a href="component-parameters.html">Component Parameters</a> + </div> </li><li> + <div> + <span class="icon aui-icon aui-icon-small aui-iconfont-page-default" title="Page">Page:</span> + </div> + <div class="details"> + <a href="assets.html">Assets</a> + </div> </li></ul></div><p>Under Tapestry, a <strong>component template</strong> is a file that contains the markup for a component.</p><p>Component templates are <em>well formed XML documents</em>. That means that every open tag must have a matching close tag, every attribute must be quoted, and so forth.</p><p><em>Note: At runtime, Tapestry parses the documents and only checks for wellformedness. Even when the document has a DTD or schema, there are no validity checks.</em></p><p>For the most part, these templates are standard HTML/XHTML; Tapestry extensions to ordinary markup are provided in the form of a Tapestry namespace:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeHeader panelHeader pdl" style="border-bottom-width: 1px;"><b>A template for a page</b></div><div class="codeContent panelContent pdl"> <pre class="brush: xml; gutter: false; theme: Default" style="font-size:12px;"><html t:type="layout" xmlns:t="http://tapestry.apache.org/schema/tapestry_5_3.xsd"> <h1>Bonjour from HelloWorld component.</h1> </html> @@ -194,13 +150,7 @@ final void renderDocType(final MarkupWri <div class="confluence-information-macro confluence-information-macro-information"><p class="title">Added in 5.3</p><span class="aui-icon aui-icon-small aui-iconfont-info confluence-information-macro-icon"></span><div class="confluence-information-macro-body"> </div></div> -<div style="border-right: 20px solid #D8E4F1;border-left: 20px solid #D8E4F1;"> -<p>Tapestry 5.3 introduces two significant improvements to template Doctypes.</p> - -<p>A template without a <!DOCTYPE> is parsed as if it had the HTML Doctype (<code><!DOCTYPE html></code>). In fact, Tapestry creates an in-memory copy of the template that includes the doctype.</p> - -<p>A template with the HTML Doctype (<code><!DOCTYPE html></code>) is parsed <em>as if</em> it had the XHTML transitional Doctype. In fact, Tapestry creates an in-memory copy of the template that replaces the <!DOCTYPE> line. This applies as well to a template without any Doctype, in which case the XHTML transitional Doctype is inserted at the top. In either case, this means you can use arbitrary HTML entities, such as <code>&copy;</code> or <code>&nbsp;</code> without seeing the XML parsing errors that would occur in earlier releases.</p> -</div><h2 id="ComponentTemplates-TheTapestryNamespace">The Tapestry Namespace</h2><p>Component templates should include the Tapestry namespace, defining it in the root element of the template.</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl"> +<div style="border-right: 20px solid #D8E4F1;border-left: 20px solid #D8E4F1;"><p>Tapestry 5.3 introduces two significant improvements to template Doctypes.</p><p>A template without a <!DOCTYPE> is parsed as if it had the HTML Doctype (<code><!DOCTYPE html></code>). In fact, Tapestry creates an in-memory copy of the template that includes the doctype.</p><p>A template with the HTML Doctype (<code><!DOCTYPE html></code>) is parsed <em>as if</em> it had the XHTML transitional Doctype. In fact, Tapestry creates an in-memory copy of the template that replaces the <!DOCTYPE> line. This applies as well to a template without any Doctype, in which case the XHTML transitional Doctype is inserted at the top. In either case, this means you can use arbitrary HTML entities, such as <code>&copy;</code> or <code>&nbsp;</code> without seeing the XML parsing errors that would occur in earlier releases.</p></div><h2 id="ComponentTemplates-TheTapestryNamespace">The Tape stry Namespace</h2><p>Component templates should include the Tapestry namespace, defining it in the root element of the template.</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl"> <pre class="brush: xml; gutter: false; theme: Default" style="font-size:12px;"><html xmlns:t="http://tapestry.apache.org/schema/tapestry_5_3.xsd"> <head> <title>Hello World Page</title>
