You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tapestry.apache.org by bu...@apache.org on 2016/12/02 12:19:39 UTC

svn commit: r1002020 - in /websites/production/tapestry/content: cache/main.pageCache component-templates.html content-type-and-markup.html

Author: buildbot
Date: Fri Dec  2 12:19:39 2016
New Revision: 1002020

Log:
Production update by buildbot for tapestry

Modified:
    websites/production/tapestry/content/cache/main.pageCache
    websites/production/tapestry/content/component-templates.html
    websites/production/tapestry/content/content-type-and-markup.html

Modified: websites/production/tapestry/content/cache/main.pageCache
==============================================================================
Binary files - no diff available.

Modified: websites/production/tapestry/content/component-templates.html
==============================================================================
--- websites/production/tapestry/content/component-templates.html (original)
+++ websites/production/tapestry/content/component-templates.html Fri Dec  2 12:19:39 2016
@@ -150,8 +150,8 @@ 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 &lt;!DOCTYPE&gt; is parsed as if it had the HTML Doctype (<code>&lt;!DOCTYPE html&gt;</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>&lt;!DOCTYPE html&gt;</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 &lt;!DOCTYPE&gt; 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>&amp;copy;</code> or <code>&amp;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;">&lt;html xmlns:t="http://tapestry.apache.org/schema/tapestry_5_3.xsd"&gt;
+<div style="border-right: 20px solid #D8E4F1;border-left: 20px solid #D8E4F1;"><p>Tapestry 5.3 introduced two significant improvements to template Doctypes.</p><p>A template without a &lt;!DOCTYPE&gt; is parsed as if it had the HTML Doctype (<code>&lt;!DOCTYPE html&gt;</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>&lt;!DOCTYPE html&gt;</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 &lt;!DOCTYPE&gt; 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>&amp;copy;</code> or <code>&amp;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;">&lt;html xmlns:t="http://tapestry.apache.org/schema/tapestry_5_4.xsd"&gt;
     &lt;head&gt;
         &lt;title&gt;Hello World Page&lt;/title&gt;
     &lt;/head&gt;
@@ -160,7 +160,7 @@ final void renderDocType(final MarkupWri
     &lt;/body&gt;
 &lt;/html&gt;
 </pre>
-</div></div><p>This defines the namespace using the standard prefix, "t:". The examples on this page all assume the use of the standard prefix.</p><p>For backwards compatibility, you may continue to use the old namespace URIs: <a  class="external-link" href="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd">http://tapestry.apache.org/schema/tapestry_5_0_0.xsd</a> or <a  class="external-link" href="http://tapestry.apache.org/schema/tapestry_5_1_0.xsd">http://tapestry.apache.org/schema/tapestry_5_1_0.xsd</a>. However, the following elements added, as part of Tapestry 5.1, will not work with the 5_0_0.xsd:</p><ul><li>The &lt;t:remove&gt; Element</li><li>&lt;t:content&gt;</li><li>&lt;t:extension-point&gt;</li><li>&lt;t:extend&gt;</li><li>&lt;t:replace&gt;</li></ul><p>The 5_3.xsd fixes some minor bugs in the 5_1_0.xsd, but is functionally equivalent.</p><h2 id="ComponentTemplates-TapestryElements">Tapestry Elements</h2><p>Tapestry elements are elements defined using the Tapestry name
 space prefix (usually "t:").</p><p>All other elements in your templates should be in the default namespace, with no prefix (with the possible exception of any Library Namespaces (described <a  href="component-templates.html">below</a>).</p><p>There are a certain number of Tapestry elements, listed below, that act as template directives; beyond that, any element in the Tapestry namespace will be a Tapestry component.</p><h3 id="ComponentTemplates-The&lt;t:body&gt;Element">The &lt;t:body&gt; Element</h3><p>In many cases, a component is designed to have its template integrate with, or "wrap around", the containing component.</p><p>The &lt;t:body&gt; element is used to identify where, within a component's template, its body (from the container's template) is to be rendered.</p><p>Components have control over if, and even how often, their body is rendered.</p><p>The following example is a <a  href="layout-component.html">Layout component</a>, which adds basic HTML elements <em>around</em
 > the page-specific content:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+</div></div><p>This defines the namespace using the standard prefix, "t:". The examples on this page all assume the use of the standard prefix.</p><p>For backwards compatibility, you may continue to use the old namespace URIs: <a  class="external-link" href="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd">http://tapestry.apache.org/schema/tapestry_5_0_0.xsd</a> or <a  class="external-link" href="http://tapestry.apache.org/schema/tapestry_5_1_0.xsd">http://tapestry.apache.org/schema/tapestry_5_1_0.xsd</a>&#160;or &#160;<a  class="external-link" href="http://tapestry.apache.org/schema/tapestry_5_3.xsd">http://tapestry.apache.org/schema/tapestry_5_3.xsd</a></p><pre>&#160;</pre><p>&#160;However, the following elements added, as part of Tapestry 5.1, will not work with the 5_0_0.xsd:</p><ul><li>The &lt;t:remove&gt; Element</li><li>&lt;t:content&gt;</li><li>&lt;t:extension-point&gt;</li><li>&lt;t:extend&gt;</li><li>&lt;t:replace&gt;</li></ul><p>The 5_3.xsd fixes some minor bugs in t
 he 5_1_0.xsd, but is functionally equivalent; 5_3.xsd and 5_4.xsd are identical.</p><h2 id="ComponentTemplates-TapestryElements">Tapestry Elements</h2><p>Tapestry elements are elements defined using the Tapestry namespace prefix (usually "t:").</p><p>All other elements in your templates should be in the default namespace, with no prefix (with the possible exception of any Library Namespaces (described <a  href="component-templates.html">below</a>).</p><p>There are a certain number of Tapestry elements, listed below, that act as template directives; beyond that, any element in the Tapestry namespace will be a Tapestry component.</p><h3 id="ComponentTemplates-The&lt;t:body&gt;Element">The &lt;t:body&gt; Element</h3><p>In many cases, a component is designed to have its template integrate with, or "wrap around", the containing component.</p><p>The &lt;t:body&gt; element is used to identify where, within a component's template, its body (from the container's template) is to be rendered.<
 /p><p>Components have control over if, and even how often, their body is rendered.</p><p>The following example is a <a  href="layout-component.html">Layout component</a>, which adds basic HTML elements <em>around</em> the page-specific content:</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;">&lt;html xmlns:t="http://tapestry.apache.org/schema/tapestry_5_3.xsd"&gt;
     &lt;head&gt;
         &lt;title&gt;My Tapestry Application&lt;/title&gt;

Modified: websites/production/tapestry/content/content-type-and-markup.html
==============================================================================
--- websites/production/tapestry/content/content-type-and-markup.html (original)
+++ websites/production/tapestry/content/content-type-and-markup.html Fri Dec  2 12:19:39 2016
@@ -54,7 +54,7 @@
       </div>
 
       <div id="content">
-                <div id="ConfluenceContent"><p>Tapestry reads <a  href="component-templates.html">well-formed XML template files</a> and renders its output as XML, with minor caveats:</p><ul><li>The &lt;?xml?&gt; XML declaration is omitted.</li><li>Most element render with an open and close tag, even if empty.</li><li>Certain elements will be abbreviated to just the open tag, if empty:<ul><li>br</li><li>hr</li><li>img</li></ul></li><li>&lt;![CDATA[]&gt; sections are <strong>not</strong> used</li></ul><p>This is all to ensure that the markup stream, while (almost) well formed, is still properly understood by browsers expecting ordinary HTML. In fact, Tapestry may decide to render a purely XML document; it depends on the content type of the response.</p><p>When Tapestry renders a page, the output content type and charset is obtained from meta data on the page itself. Meta data is specified using the <a  class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/
 tapestry5/annotations/Meta.html">@Meta</a> annotation.</p><h3 id="ContentTypeandMarkup-ContentType">Content Type</h3><p>The response content type is obtained via meta-data key <code>tapestry.response-content-type</code>. This value defaults to "text/html", which triggers specialized XML rendering.</p><p>A page may declare its content type using the @<a  class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/annotations/ContentType.html">ContentType</a> class annotation. Content types other than "text/html" will render as well-formed XML documents, including the XML declaration, and more standard behavior for empty elements.</p><h3 id="ContentTypeandMarkup-CharacterSet">Character Set</h3><p>The character set (aka character encoding) used when writing output and when parsing requests is normally "utf-8". UTF-8 is a version of Unicode where individual characters are encoded as one or more bytes. Most western language characters (that is, typical ASC
 II characters) are encoded in a single byte. Accented characters or non-western characters (such as Japanese, Arabic, etc.) may be encoded as two or more bytes.</p><p>All pages use the same encoding, which can be set using the <code>tapestry.charset</code> <a  href="configuration.html">configuration setting</a>.</p></div>
+                <div id="ConfluenceContent"><p>Tapestry reads <a  href="component-templates.html">well-formed XML template files</a> and renders its output as XML, with minor caveats:</p><ul><li>The &lt;?xml?&gt; XML declaration is omitted.</li><li>Most elements render with an open and close tag, even if empty.</li><li>Certain elements will be abbreviated to just the open tag, if empty:<ul><li>br</li><li>hr</li><li>img</li></ul></li><li>&lt;![CDATA[]&gt; sections are <strong>not</strong> used</li></ul><p>This is all to ensure that the markup stream, while (almost) well formed, is still properly understood by browsers expecting ordinary HTML. In fact, Tapestry may decide to render a purely XML document; it depends on the content type of the response.</p><p>When Tapestry renders a page, the output content type and charset is obtained from meta data on the page itself. Meta data is specified using the <a  class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache
 /tapestry5/annotations/Meta.html">@Meta</a> annotation.</p><h3 id="ContentTypeandMarkup-ContentType">Content Type</h3><p>The response content type is obtained via meta-data key <code>tapestry.response-content-type</code>. This value defaults to "text/html", which triggers specialized XML rendering.</p><p>A page may declare its content type using the @<a  class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/annotations/ContentType.html">ContentType</a> class annotation. Content types other than "text/html" will render as well-formed XML documents, including the XML declaration, and more standard behavior for empty elements.</p><h3 id="ContentTypeandMarkup-CharacterSet">Character Set</h3><p>The character set (aka character encoding) used when writing output and when parsing requests is normally "utf-8". UTF-8 is a version of Unicode where individual characters are encoded as one or more bytes. Most western language characters (that is, typical AS
 CII characters) are encoded in a single byte. Accented characters or non-western characters (such as Japanese, Arabic, etc.) may be encoded as two or more bytes.</p><p>All pages use the same encoding, which can be set using the <code>tapestry.charset</code> <a  href="configuration.html">configuration setting</a>.</p></div>
       </div>
 
       <div class="clearer"></div>