struts-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lukaszlen...@apache.org
Subject [01/14] struts-site git commit: Updates exported docs
Date Tue, 05 Sep 2017 13:19:53 GMT
Repository: struts-site
Updated Branches:
  refs/heads/asf-site 29713114c -> b16cc4ef7


http://git-wip-us.apache.org/repos/asf/struts-site/blob/b16cc4ef/content/docs/webxml.html
----------------------------------------------------------------------
diff --git a/content/docs/webxml.html b/content/docs/webxml.html
index 8f40240..2666810 100644
--- a/content/docs/webxml.html
+++ b/content/docs/webxml.html
@@ -34,20 +34,6 @@ under the License.
             color:                 #666;
         }
     </style>
-    <link href='https://struts.apache.org/highlighter/style/shCoreStruts.css' rel='stylesheet' type='text/css' />
-    <link href='https://struts.apache.org/highlighter/style/shThemeStruts.css' rel='stylesheet' type='text/css' />
-    <script src='https://struts.apache.org/highlighter/js/shCore.js' type='text/javascript'></script>
-    <script src='https://struts.apache.org/highlighter/js/shBrushPlain.js' type='text/javascript'></script>
-    <script src='https://struts.apache.org/highlighter/js/shBrushXml.js' type='text/javascript'></script>
-    <script src='https://struts.apache.org/highlighter/js/shBrushJava.js' type='text/javascript'></script>
-    <script src='https://struts.apache.org/highlighter/js/shBrushJScript.js' type='text/javascript'></script>
-    <script src='https://struts.apache.org/highlighter/js/shBrushGroovy.js' type='text/javascript'></script>
-    <script src='https://struts.apache.org/highlighter/js/shBrushBash.js' type='text/javascript'></script>
-    <script src='https://struts.apache.org/highlighter/js/shBrushCss.js' type='text/javascript'></script>
-    <script type="text/javascript">
-        SyntaxHighlighter.defaults['toolbar'] = false;
-        SyntaxHighlighter.all();
-    </script>
     <script type="text/javascript" language="javascript">
         var hide = null;
         var show = null;
@@ -139,17 +125,7 @@ under the License.
 
     <div class="pagecontent">
         <div class="wiki-content">
-            <div id="ConfluenceContent"><p><style type="text/css">/*<![CDATA[*/
-div.rbtoc1488973941985 {padding: 0px;}
-div.rbtoc1488973941985 ul {list-style: disc;margin-left: 0px;}
-div.rbtoc1488973941985 li {margin-left: 0px;padding-left: 0px;}
-
-/*]]>*/</style></p><div class="toc-macro rbtoc1488973941985">
-<ul class="toc-indentation"><li><a shape="rect" href="#web.xml-SimpleExample">Simple Example</a>
-<ul class="toc-indentation"><li><a shape="rect" href="#web.xml-ChangedfilterpackageinStruts&gt;=2.5">Changed filter package in Struts &gt;= 2.5</a></li><li><a shape="rect" href="#web.xml-ChangedFilterStructureinStruts&gt;=2.1.3">Changed Filter Structure in Struts &gt;= 2.1.3</a></li><li><a shape="rect" href="#web.xml-ExcludespecificURLs">Exclude specific URLs</a></li></ul>
-</li><li><a shape="rect" href="#web.xml-TaglibExample">Taglib Example</a></li><li><a shape="rect" href="#web.xml-CustomFileManagerandFileManagerFactoryimplementations">Custom FileManager and FileManagerFactory implementations</a></li><li><a shape="rect" href="#web.xml-Customconfigurationprovider">Custom configuration provider</a></li></ul>
-</div><p>The <code>web.xml</code> web application descriptor file represents the core of the Java web application, so it is appropriate that it is also part of the core of the Struts framework. In the <code>web.xml</code> file, Struts defines its FilterDispatcher, the Servlet Filter class that initializes the Struts framework and handles all requests. This filter can contain initialization parameters that affect what, if any, additional configuration files are loaded and how the framework should behave.</p><h1 id="web.xml-SimpleExample">Simple Example</h1><p>Configuring <code>web.xml</code> for the framework is a matter of adding a filter and filter-mapping.</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeHeader panelHeader pdl" style="border-bottom-width: 1px;"><b>Filter Example (web.xml)</b></div><div class="codeContent panelContent pdl">
-<pre class="brush: java; gutter: false; theme: Default" style="font-size:12px;">&lt;web-app id="MyStrutsApp" version="2.4" 
+            <div id="ConfluenceContent"><p>The <code>web.xml</code> web application descriptor file represents the core of the Java web application, so it is appropriate that it is also part of the core of the Struts framework. In the <code>web.xml</code> file, Struts defines its FilterDispatcher, the Servlet Filter class that initializes the Struts framework and handles all requests. This filter can contain initialization parameters that affect what, if any, additional configuration files are loaded and how the framework should behave.</p><h1 id="web.xml-SimpleExample">Simple Example</h1><p>Configuring <code>web.xml</code> for the framework is a matter of adding a filter and filter-mapping.</p><parameter ac:name="title">Filter Example (web.xml)</parameter><plain-text-body>&lt;web-app id="MyStrutsApp" version="2.4" 
 	xmlns="http://java.sun.com/xml/ns/j2ee" 
 	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
 	xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"&gt;
@@ -167,9 +143,7 @@ div.rbtoc1488973941985 li {margin-left: 0px;padding-left: 0px;}
     &lt;!-- ... --&gt;
 
 &lt;/web-app&gt;
-</pre>
-</div></div><h2 id="web.xml-ChangedfilterpackageinStruts&gt;=2.5">Changed filter package in Struts &gt;= 2.5</h2><p><span>As from Struts 2.5 all filters were moved to top package, if you are using older version you must use the old package, see example:</span></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;web-app id="WebApp_9" version="2.4" 
+</plain-text-body><h2 id="web.xml-ChangedfilterpackageinStruts&gt;=2.5">Changed filter package in Struts &gt;= 2.5</h2><p><span>As from Struts 2.5 all filters were moved to top package, if you are using older version you must use the old package, see example:</span></p><parameter ac:name="language">xml</parameter><plain-text-body>&lt;web-app id="WebApp_9" version="2.4" 
 	xmlns="http://java.sun.com/xml/ns/j2ee" 
 	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
 	xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"&gt;
@@ -177,22 +151,16 @@ div.rbtoc1488973941985 li {margin-left: 0px;padding-left: 0px;}
     &lt;filter&gt;
         &lt;filter-name&gt;struts2&lt;/filter-name&gt;
         &lt;filter-class&gt;org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter&lt;/filter-class&gt;
-    ...</pre>
-</div></div><h2 id="web.xml-ChangedFilterStructureinStruts&gt;=2.1.3">Changed Filter Structure in Struts &gt;= 2.1.3</h2><p><span>To split up the the dispatcher phases, FilterDispatcher is deprecated since Struts 2.1.3. If working with older versions, you need to use</span></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;">    ...
+    ...</plain-text-body><h2 id="web.xml-ChangedFilterStructureinStruts&gt;=2.1.3">Changed Filter Structure in Struts &gt;= 2.1.3</h2><p><span>To split up the the dispatcher phases, FilterDispatcher is deprecated since Struts 2.1.3. If working with older versions, you need to use</span></p><parameter ac:name="">XML</parameter><plain-text-body>    ...
     &lt;filter&gt;
         &lt;filter-name&gt;struts2&lt;/filter-name&gt;
         &lt;filter-class&gt;org.apache.struts2.dispatcher.FilterDispatcher&lt;/filter-class&gt;
     ...
-</pre>
-</div></div><p><span>See </span><a shape="rect" href="sitemesh-plugin.html">SiteMesh Plugin</a><span> for an example on when to use seperate Filters for prepare and execution phase</span></p><h2 id="web.xml-ExcludespecificURLs">Exclude specific URLs</h2><p>In the example above we've mapped the Struts 2 dispatcher to <code>/*</code>, so Struts 2 has a crack at all incoming requests. This is because Struts 2 serves static content from its jar files, including Dojo JavaScript files (if using S2.0, or the Dojo plugin in S2.1+) and FreeMarker templates for the Struts 2 tags that produce HTML.</p><p>If we change the filter mapping to something else, for example <code>/*.html</code>, we must take this in to account and extract the content that would normally be served from the Struts 2 jar files, or some other solution.</p><p>Since Struts 2.1.7, you are able to provide a comma seperated list of patterns for which when matching against the<br clear="none"> request URL the Filter will just p
 ass by. This is done via the configuration option struts.action.excludePattern, for example in your struts.xml</p><p>&#160;</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;struts&gt;
+</plain-text-body><p><span>See </span><a shape="rect" href="sitemesh-plugin.html">SiteMesh Plugin</a><span> for an example on when to use seperate Filters for prepare and execution phase</span></p><h2 id="web.xml-ExcludespecificURLs">Exclude specific URLs</h2><p>In the example above we've mapped the Struts 2 dispatcher to <code>/*</code>, so Struts 2 has a crack at all incoming requests. This is because Struts 2 serves static content from its jar files, including Dojo JavaScript files (if using S2.0, or the Dojo plugin in S2.1+) and FreeMarker templates for the Struts 2 tags that produce HTML.</p><p>If we change the filter mapping to something else, for example <code>/*.html</code>, we must take this in to account and extract the content that would normally be served from the Struts 2 jar files, or some other solution.</p><p>Since Struts 2.1.7, you are able to provide a comma seperated list of patterns for which when matching against the<br clear="none"> request URL the Filter will 
 just pass by. This is done via the configuration option struts.action.excludePattern, for example in your struts.xml</p><p>&#160;</p><parameter ac:name="">XML</parameter><plain-text-body>&lt;struts&gt;
     &lt;constant name="struts.action.excludePattern" value=".*unfiltered.*,.*\\.nofilter"/&gt;
     ...
 
-&lt;/struts&gt;</pre>
-</div></div><h1 id="web.xml-TaglibExample">Taglib Example</h1><p>Typically, configuring a taglib is neither required nor recommended. The taglib is included in <code>struts-core.jar</code>, and the container will discover it automatically.</p><p><img class="emoticon emoticon-tick" src="https://cwiki.apache.org/confluence/s/en_GB/5982/f2b47fb3d636c8bc9fd0b11c0ec6d0ae18646be7.1/_/images/icons/emoticons/check.png" data-emoticon-name="tick" alt="(tick)"> If, for some reason, a taglib configuration is needed within web.xml, extract the TLD file from the <code>struts-core.jar</code> <code>META-INF</code> folder, and add a <code>taglib</code> element to the <code>web.xml</code>.</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;!-- ... --&gt;
+&lt;/struts&gt;</plain-text-body><h1 id="web.xml-TaglibExample">Taglib Example</h1><p>Typically, configuring a taglib is neither required nor recommended. The taglib is included in <code>struts-core.jar</code>, and the container will discover it automatically.</p><p><img class="emoticon emoticon-tick" src="https://cwiki.apache.org/confluence/s/en_GB/5997/6f42626d00e36f53fe51440403446ca61552e2a2.1/_/images/icons/emoticons/check.png" data-emoticon-name="tick" alt="(tick)"> If, for some reason, a taglib configuration is needed within web.xml, extract the TLD file from the <code>struts-core.jar</code> <code>META-INF</code> folder, and add a <code>taglib</code> element to the <code>web.xml</code>.</p><parameter ac:name="">XML</parameter><plain-text-body>    &lt;!-- ... --&gt;
     &lt;/welcome-file-list&gt;
 
     &lt;taglib&gt;
@@ -200,9 +168,7 @@ div.rbtoc1488973941985 li {margin-left: 0px;padding-left: 0px;}
        &lt;taglib-location&gt;/WEB-INF/struts-tags.tld&lt;/taglib-location&gt;
     &lt;/taglib&gt;
 &lt;/web-app&gt;
-</pre>
-</div></div><h1 id="web.xml-CustomFileManagerandFileManagerFactoryimplementations">Custom FileManager and FileManagerFactory implementations</h1><p>If there is a need to support an App Server's specific file system (eg. VFS in JBoss), you can implement your own version of FileManager. But it must be registered at "the beginning" to support bootstrap of the whole framework.</p><p>To register your own FileManger you can do it with &lt;init-param/&gt; as below:</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;filter&gt;
+</plain-text-body><h1 id="web.xml-CustomFileManagerandFileManagerFactoryimplementations">Custom FileManager and FileManagerFactory implementations</h1><p>If there is a need to support an App Server's specific file system (eg. VFS in JBoss), you can implement your own version of FileManager. But it must be registered at "the beginning" to support bootstrap of the whole framework.</p><p>To register your own FileManger you can do it with &lt;init-param/&gt; as below:</p><parameter ac:name="">xml</parameter><plain-text-body>&lt;filter&gt;
      &lt;filter-name&gt;struts2&lt;/filter-name&gt;
      &lt;filter-class&gt;org.apache.struts2.dispatcher.filter.StrutsPrepareAndExecuteFilter&lt;/filter-class&gt;
      &lt;init-param&gt;
@@ -210,9 +176,7 @@ div.rbtoc1488973941985 li {margin-left: 0px;padding-left: 0px;}
          &lt;param-value&gt;com.company.MyFileManager&lt;/param-value&gt;
      &lt;/init-param&gt;
 &lt;/filter&gt;
-</pre>
-</div></div><p>You can as well register your own FileManagerFactory with &lt;init-param/&gt;, see example:</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;filter&gt;
+</plain-text-body><p>You can as well register your own FileManagerFactory with &lt;init-param/&gt;, see example:</p><parameter ac:name="">xml</parameter><plain-text-body>&lt;filter&gt;
      &lt;filter-name&gt;struts2&lt;/filter-name&gt;
      &lt;filter-class&gt;org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter&lt;/filter-class&gt;
      &lt;init-param&gt;
@@ -220,17 +184,14 @@ div.rbtoc1488973941985 li {margin-left: 0px;padding-left: 0px;}
          &lt;param-value&gt;com.company.MyFileManagerFactory&lt;/param-value&gt;
      &lt;/init-param&gt;
 &lt;/filter&gt;
-</pre>
-</div></div><p>Take a look on default implementations - DefaultFileManager.java and DefaultFileManagerFactory.java to understand how and why.</p><h1 id="web.xml-Customconfigurationprovider">Custom configuration provider</h1><p>It is possible to use your custom&#160;<code>ConfigurationProvider</code> to programmatically configure your application. To do this use&#160;<code>configProviders</code>&#160;(it can be a comma-separated list of class names)&#160;<code>&lt;init-param/&gt;</code>&#160;as below:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<pre class="brush: java; gutter: false; theme: Default" style="font-size:12px;">&lt;filter&gt;
+</plain-text-body><p>Take a look on default implementations - DefaultFileManager.java and DefaultFileManagerFactory.java to understand how and why.</p><h1 id="web.xml-Customconfigurationprovider">Custom configuration provider</h1><p>It is possible to use your custom&#160;<code>ConfigurationProvider</code> to programmatically configure your application. To do this use&#160;<code>configProviders</code>&#160;(it can be a comma-separated list of class names)&#160;<code>&lt;init-param/&gt;</code>&#160;as below:</p><plain-text-body>&lt;filter&gt;
      &lt;filter-name&gt;struts2&lt;/filter-name&gt;
      &lt;filter-class&gt;org.apache.struts2.dispatcher.filter.StrutsPrepareAndExecuteFilter&lt;/filter-class&gt;
      &lt;init-param&gt;
          &lt;param-name&gt;configProviders&lt;/param-name&gt;
          &lt;param-value&gt;com.company.MyConfigurationProvider&lt;/param-value&gt;
      &lt;/init-param&gt;
-&lt;/filter&gt;</pre>
-</div></div><p>See&#160;<a shape="rect" href="configuration-provider-configuration.html">Configuration Provider &amp; Configuration</a>&#160;for more details.</p><p>&#160;</p></div>
+&lt;/filter&gt;</plain-text-body><p>See&#160;<a shape="rect" href="configuration-provider-configuration.html">Configuration Provider &amp; Configuration</a>&#160;for more details.</p><p>&#160;</p></div>
         </div>
 
         

http://git-wip-us.apache.org/repos/asf/struts-site/blob/b16cc4ef/content/docs/xhtml-form-template.html
----------------------------------------------------------------------
diff --git a/content/docs/xhtml-form-template.html b/content/docs/xhtml-form-template.html
index 7eb9ae0..1a00efa 100644
--- a/content/docs/xhtml-form-template.html
+++ b/content/docs/xhtml-form-template.html
@@ -142,7 +142,7 @@ under the License.
             <div id="ConfluenceContent"><p>The xhtml form template sets up the wrapping table around all the other <a shape="rect" href="xhtml-theme.html">xhtml theme</a> form elements. In addition to creating this wrapping table, the opening and closing templates also, if the <em>validate</em> parameter is set to true, enable <a shape="rect" href="pure-javascript-client-side-validation.html">Pure JavaScript Client Side Validation</a>. See the <strong>form.ftl</strong> contents:</p>
 
 <div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="brush: xml; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[
+<script class="brush: xml; gutter: false; theme: Confluence" type="syntaxhighlighter"><![CDATA[
 &lt;#--
 /*
  * $Id$
@@ -182,7 +182,7 @@ under the License.
 <p>The closing template, <strong>form-close.ftl</strong>:</p>
 
 <div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="brush: xml; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[
+<script class="brush: xml; gutter: false; theme: Confluence" type="syntaxhighlighter"><![CDATA[
 &lt;#--
 /*
  * $Id$

http://git-wip-us.apache.org/repos/asf/struts-site/blob/b16cc4ef/content/docs/xhtml-theme.html
----------------------------------------------------------------------
diff --git a/content/docs/xhtml-theme.html b/content/docs/xhtml-theme.html
index 124ab63..90566a2 100644
--- a/content/docs/xhtml-theme.html
+++ b/content/docs/xhtml-theme.html
@@ -34,20 +34,6 @@ under the License.
             color:                 #666;
         }
     </style>
-    <link href='https://struts.apache.org/highlighter/style/shCoreStruts.css' rel='stylesheet' type='text/css' />
-    <link href='https://struts.apache.org/highlighter/style/shThemeStruts.css' rel='stylesheet' type='text/css' />
-    <script src='https://struts.apache.org/highlighter/js/shCore.js' type='text/javascript'></script>
-    <script src='https://struts.apache.org/highlighter/js/shBrushPlain.js' type='text/javascript'></script>
-    <script src='https://struts.apache.org/highlighter/js/shBrushXml.js' type='text/javascript'></script>
-    <script src='https://struts.apache.org/highlighter/js/shBrushJava.js' type='text/javascript'></script>
-    <script src='https://struts.apache.org/highlighter/js/shBrushJScript.js' type='text/javascript'></script>
-    <script src='https://struts.apache.org/highlighter/js/shBrushGroovy.js' type='text/javascript'></script>
-    <script src='https://struts.apache.org/highlighter/js/shBrushBash.js' type='text/javascript'></script>
-    <script src='https://struts.apache.org/highlighter/js/shBrushCss.js' type='text/javascript'></script>
-    <script type="text/javascript">
-        SyntaxHighlighter.defaults['toolbar'] = false;
-        SyntaxHighlighter.all();
-    </script>
     <script type="text/javascript" language="javascript">
         var hide = null;
         var show = null;
@@ -147,208 +133,22 @@ under the License.
 <h2 id="xhtmltheme-WrappingtheSimpleTheme">Wrapping the Simple Theme</h2>
 
 <p>The xhtml theme uses the "wrapping" technique described by <a shape="rect" href="extending-themes.html">Extending Themes</a>. Let's look at how the HTML tags are wrapped by a standard header and footer. For example, in the <code>text.ftl</code> template, the <code>controlheader.ftl</code> and <code>controlfooter.ftl</code> templates are wrapped around the simple template.</p>
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="brush: xml; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[
-&lt;#--
-/*
- * $Id$
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * &quot;License&quot;); 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
- * &quot;AS IS&quot; 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.
- */
---&gt;
-&lt;#include &quot;/${parameters.templateDir}/${parameters.expandTheme}/controlheader.ftl&quot; /&gt;
-&lt;#include &quot;/${parameters.templateDir}/simple/text.ftl&quot; /&gt;
-&lt;#include &quot;/${parameters.templateDir}/${parameters.expandTheme}/controlfooter.ftl&quot; /&gt;
-]]></script>
-</div></div>
+<plain-text-body>{snippet:id=all|lang=xml|url=struts2/core/src/main/resources/template/xhtml/text.ftl}</plain-text-body>
 <p><img class="emoticon emoticon-question" src="https://cwiki.apache.org/confluence/s/en_GB/5997/6f42626d00e36f53fe51440403446ca61552e2a2.1/_/images/icons/emoticons/help_16.png" data-emoticon-name="question" alt="(question)"> The <code>controlheader.ftl</code> is referenced using ${parameters.theme} so that the code can be reused by the <a shape="rect" href="ajax-theme.html">ajax theme</a>.</p>
 
 <h2 id="xhtmltheme-XHTMLThemeHeader">XHTML Theme Header</h2>
 
 <p>Now let's look at the <code>controlheader.ftl</code> and <code>controlheader-core.ftl</code>. Again, these are split up for easy re-use with the <a shape="rect" href="ajax-theme.html">ajax theme</a>) contents:</p>
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="brush: xml; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[
-&lt;#--
-/*
- * $Id$
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * &quot;License&quot;); 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
- * &quot;AS IS&quot; 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.
- */
---&gt;
-&lt;#include &quot;/${parameters.templateDir}/${parameters.expandTheme}/controlheader-core.ftl&quot; /&gt;
-    &lt;td 
-        &lt;#if parameters.align?? &gt;
-            class=&quot;align-${parameters.align?html}&quot; 
-         &lt;#else &gt;
-            class=&quot;tdInput&quot;            
-        &lt;/#if&gt;
-&gt;&lt;#t/&gt;
-]]></script>
-</div></div>
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="brush: xml; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[
-&lt;#--
-/*
- * $Id$
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * &quot;License&quot;); 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
- * &quot;AS IS&quot; 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.
- */
---&gt;
-&lt;#--
-	Only show message if errors are available.
-	This will be done if ActionSupport is used.
---&gt;
-&lt;#assign hasFieldErrors = parameters.name?? &amp;&amp; fieldErrors?? &amp;&amp; fieldErrors[parameters.name]??/&gt;
-&lt;#if (parameters.errorposition!&quot;top&quot;) == &#39;top&#39;&gt;
-&lt;#if hasFieldErrors&gt;
-&lt;#list fieldErrors[parameters.name] as error&gt;
-&lt;tr errorFor=&quot;${parameters.id}&quot;&gt;
-    &lt;td class=&quot;tdErrorMessage&quot; colspan=&quot;2&quot;&gt;&lt;#rt/&gt;
-        &lt;span class=&quot;errorMessage&quot;&gt;${error?html}&lt;/span&gt;&lt;#t/&gt;
-    &lt;/td&gt;&lt;#lt/&gt;
-&lt;/tr&gt;
-&lt;/#list&gt;
-&lt;/#if&gt;
-&lt;/#if&gt;
-&lt;#if !parameters.labelposition?? &amp;&amp; (parameters.form.labelposition)??&gt;
-&lt;#assign labelpos = parameters.form.labelposition/&gt;
-&lt;#elseif parameters.labelposition??&gt;
-&lt;#assign labelpos = parameters.labelposition/&gt;
-&lt;/#if&gt;
-&lt;#--
-	if the label position is top,
-	then give the label it&#39;s own row in the table
---&gt;
-&lt;tr&gt;
-&lt;#if (labelpos!&quot;&quot;) == &#39;top&#39;&gt;
-    &lt;td class=&quot;tdLabelTop&quot; colspan=&quot;2&quot;&gt;&lt;#rt/&gt;
-&lt;#else&gt;
-    &lt;td class=&quot;tdLabel&quot;&gt;&lt;#rt/&gt;
-&lt;/#if&gt;
-&lt;#if parameters.label??&gt;
-    &lt;label &lt;#t/&gt;
-&lt;#if parameters.id??&gt;
-        for=&quot;${parameters.id?html}&quot; &lt;#t/&gt;
-&lt;/#if&gt;
-&lt;#if hasFieldErrors&gt;
-        class=&quot;errorLabel&quot;&lt;#t/&gt;
-&lt;#else&gt;
-        class=&quot;label&quot;&lt;#t/&gt;
-&lt;/#if&gt;
-    &gt;&lt;#t/&gt;
-&lt;#if (parameters.required!false) &amp;&amp; ((parameters.requiredPosition!&quot;right&quot;) != &#39;right&#39;)&gt;
-        &lt;span class=&quot;required&quot;&gt;*&lt;/span&gt;&lt;#t/&gt;
-&lt;/#if&gt;
-${parameters.label?html}&lt;#t/&gt;
-&lt;#if (parameters.required!false) &amp;&amp; ((parameters.requiredPosition!&quot;right&quot;) == &#39;right&#39;)&gt;
- &lt;span class=&quot;required&quot;&gt;*&lt;/span&gt;&lt;#t/&gt;
-&lt;/#if&gt;
-${parameters.labelseparator!&quot;:&quot;?html}&lt;#t/&gt;
-&lt;#include &quot;/${parameters.templateDir}/${parameters.expandTheme}/tooltip.ftl&quot; /&gt;
-&lt;/label&gt;&lt;#t/&gt;
-&lt;/#if&gt;
-    &lt;/td&gt;&lt;#lt/&gt;
-&lt;#-- add the extra row --&gt;
-&lt;#if (labelpos!&quot;&quot;) == &#39;top&#39;&gt;
-&lt;/tr&gt;
-&lt;tr&gt;
-&lt;/#if&gt;
-]]></script>
-</div></div>
+<plain-text-body>{snippet:id=all|lang=xml|url=struts2/core/src/main/resources/template/xhtml/controlheader.ftl}</plain-text-body>
+<plain-text-body>{snippet:id=all|lang=xml|url=struts2/core/src/main/resources/template/xhtml/controlheader-core.ftl}</plain-text-body>
 <p>The header used by the HTML tags in the xhtml theme is complicated. However, a close look reveals that the logic produces two behaviors: either a two-column format or a two-row format. Generally the two-column approach is what we want, so that is the default option. To use the two-row approach, change the <code>labelposition</code> parameter to <code>top</code>.</p>
-<div class="confluence-information-macro confluence-information-macro-tip"><p class="title">Moving fieldErrors</p><span class="aui-icon aui-icon-small aui-iconfont-approve confluence-information-macro-icon"></span><div class="confluence-information-macro-body">
-<p>The <code>fieldErrors</code>, usually caused by <a shape="rect" href="validation.html">Validation</a>, are printed out as a row above the HTML form element. Some people prefer that the errors display elsewhere, such as in a third column. If you wish to place these elsehwere, overriding the headers is easy, allowing you to continue to use the other features provided by this theme. See <a shape="rect" href="template-loading.html">Template Loading</a> for more information on how to do this.</p></div></div>
+<parameter ac:name="title">Moving fieldErrors</parameter><rich-text-body>
+<p>The <code>fieldErrors</code>, usually caused by <a shape="rect" href="validation.html">Validation</a>, are printed out as a row above the HTML form element. Some people prefer that the errors display elsewhere, such as in a third column. If you wish to place these elsehwere, overriding the headers is easy, allowing you to continue to use the other features provided by this theme. See <a shape="rect" href="template-loading.html">Template Loading</a> for more information on how to do this.</p></rich-text-body>
 
 <h2 id="xhtmltheme-XHTMLThemeFooter">XHTML Theme Footer</h2>
 
 <p>The primary objective of <code>controlfooter.ftl</code> is to close the table. But, before the table closes, the template checks for an <code>after</code> parameter.</p>
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="brush: xml; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[
-&lt;#--
-/*
- * $Id$
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * &quot;License&quot;); 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
- * &quot;AS IS&quot; 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.
- */
---&gt;
-${parameters.after!}&lt;#t/&gt;
-    &lt;/td&gt;&lt;#lt/&gt;
-&lt;/tr&gt;
-&lt;#if (parameters.errorposition!&quot;top&quot;) == &#39;bottom&#39;&gt;
-&lt;#assign hasFieldErrors = parameters.name?? &amp;&amp; fieldErrors?? &amp;&amp; fieldErrors[parameters.name]??/&gt;
-&lt;#if hasFieldErrors&gt;
-&lt;#list fieldErrors[parameters.name] as error&gt;
-&lt;tr errorFor=&quot;${parameters.id}&quot;&gt;
-    &lt;td class=&quot;tdErrorMessage&quot; colspan=&quot;2&quot;&gt;&lt;#rt/&gt;
-        &lt;span class=&quot;errorMessage&quot;&gt;${error?html}&lt;/span&gt;&lt;#t/&gt;
-    &lt;/td&gt;&lt;#lt/&gt;
-&lt;/tr&gt;
-&lt;/#list&gt;
-&lt;/#if&gt;
-&lt;/#if&gt;
-
-]]></script>
-</div></div>
+<plain-text-body>{snippet:id=all|lang=xml|url=struts2/core/src/main/resources/template/xhtml/controlfooter.ftl}</plain-text-body>
 <p>While "after" isn't an attribute supported by any of the <a shape="rect" href="struts-tags.html">Struts Tags</a>, if you are using <a shape="rect" href="freemarker-tags.html">FreeMarker Tags</a>, <a shape="rect" href="velocity-tags.html">Velocity Tags</a>, or the <a shape="rect" href="param.html">param</a> tag in any template language, you can add an <code>after</code> parameter to place any content you like after the <a shape="rect" href="simple-theme.html">simple theme</a> template renders. The <code>after</code> attribute makes it easier to fine-tune HTML forms for your specific environment.</p>
 
 <h2 id="xhtmltheme-SpecialInterest">Special Interest</h2>
@@ -358,164 +158,16 @@ ${parameters.after!}&lt;#t/&gt;
 <h3 id="xhtmltheme-headtemplate">head template</h3>
 
 <p>The xhtml <a shape="rect" href="head.html">head</a> template extends the <a shape="rect" href="simple-head-template.html">simple head template</a> and provides an additional CSS that helps render the <a shape="rect" href="xhtml-theme.html">xhtml theme</a> form elements.</p>
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="brush: xml; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[
-&lt;#--
-/*
- * $Id$
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * &quot;License&quot;); 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
- * &quot;AS IS&quot; 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.
- */
---&gt;
-&lt;link rel=&quot;stylesheet&quot; href=&quot;&lt;@s.url value=&#39;/struts/xhtml/styles.css&#39; includeParams=&#39;none&#39; encode=&#39;false&#39; /&gt;&quot; type=&quot;text/css&quot;/&gt;
-&lt;#include &quot;/${parameters.templateDir}/simple/head.ftl&quot; /&gt;
-]]></script>
-</div></div>
+<plain-text-body>{snippet:id=all|lang=xml|url=struts2/core/src/main/resources/template/xhtml/head.ftl}</plain-text-body>
 <p>The head template imports a style sheet.</p>
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="brush: xml; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[
-/*
- * $Id$
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * &quot;License&quot;); 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
- * &quot;AS IS&quot; 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.
- */
-
-.wwFormTable {}
-.label {font-style:italic; }
-.errorLabel {font-style:italic; color:red; }
-.errorMessage {font-weight:bold; color:red; }
-.checkboxLabel {}
-.checkboxErrorLabel {color:red; }
-.required {color:red;}
-.tdLabel {text-align:right; vertical-align:top; }
-
-.tdTransferSelect {text-align:center; vertical-align:middle;}
-.tdLabelTop {text-align:left; vertical-align:top;}
-.tdCheckboxLabel {text-align:right; vertical-align:top;}
-.tdCheckboxInput {text-align:left; vertical-align:top;}
-.tdCheckboxErrorMessage {text-align:left; vertical-align:top;}
-.tdErrorMessage {text-align:center; vertical-align:top;}
-.formButton {text-align:right;}
-.tdInput {text-align:left;}
-
-
-.align-center{text-align:center;}
-.align-right{text-align:right;}
-.align-left{text-align:left;}
-.align-justify{text-align:justify;}
-]]></script>
-</div></div>
+<plain-text-body>{snippet:id=all|lang=xml|url=struts2/core/src/main/resources/template/xhtml/styles.css}</plain-text-body>
 
 <h3 id="xhtmltheme-formtemplate">form template</h3>
 
 <p>The xhtml form template sets up the wrapping table around all the other <a shape="rect" href="xhtml-theme.html">xhtml theme</a> form elements. In addition to creating this wrapping table, the opening and closing templates also, if the <code>validate</code> parameter is set to true, enable <a shape="rect" href="pure-javascript-client-side-validation.html">Pure JavaScript Client Side Validation</a>.</p>
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="brush: xml; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[
-&lt;#--
-/*
- * $Id$
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * &quot;License&quot;); 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
- * &quot;AS IS&quot; 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.
- */
---&gt;
-&lt;#include &quot;/${parameters.templateDir}/${parameters.expandTheme}/form-validate.ftl&quot; /&gt;
-&lt;#include &quot;/${parameters.templateDir}/${parameters.expandTheme}/form-common.ftl&quot; /&gt;
-&lt;#if (parameters.validate!false)&gt;
-  onreset=&quot;${parameters.onreset!&#39;clearErrorMessages(this);clearErrorLabels(this);&#39;}&quot;
-&lt;#else&gt;
-  &lt;#if parameters.onreset??&gt;
-  onreset=&quot;${parameters.onreset?html}&quot;
-  &lt;/#if&gt;
-&lt;/#if&gt;
-&gt;
-&lt;#include &quot;/${parameters.templateDir}/${parameters.expandTheme}/control.ftl&quot; /&gt;
-]]></script>
-</div></div>
+<plain-text-body>{snippet:id=all|lang=xml|url=struts2/core/src/main/resources/template/xhtml/form.ftl}</plain-text-body>
 <p>The closing template, <code>form-close.ftl*</code>:</p>
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="brush: xml; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[
-&lt;#--
-/*
- * $Id$
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * &quot;License&quot;); 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
- * &quot;AS IS&quot; 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.
- */
---&gt;
-&lt;#include &quot;/${parameters.templateDir}/${parameters.expandTheme}/control-close.ftl&quot; /&gt;
-&lt;#include &quot;/${parameters.templateDir}/simple/form-close.ftl&quot; /&gt;
-&lt;#include &quot;/${parameters.templateDir}/${parameters.expandTheme}/form-close-validate.ftl&quot; /&gt;
-&lt;#if parameters.focusElement??&gt;
-&lt;script type=&quot;text/javascript&quot;&gt;
-    StrutsUtils.addOnLoad(function() {
-        var element = document.getElementById(&quot;${parameters.focusElement?html}&quot;);
-        if(element) {
-            element.focus();
-        }
-    });
-&lt;/script&gt;
-&lt;/#if&gt;
-]]></script>
-</div></div></div>
+<plain-text-body>{snippet:id=all|lang=xml|url=struts2/core/src/main/resources/template/xhtml/form-close.ftl}</plain-text-body></div>
         </div>
 
                     <div class="tabletitle">

http://git-wip-us.apache.org/repos/asf/struts-site/blob/b16cc4ef/content/docs/xsl-result.html
----------------------------------------------------------------------
diff --git a/content/docs/xsl-result.html b/content/docs/xsl-result.html
index 5a5dced..28af0fa 100644
--- a/content/docs/xsl-result.html
+++ b/content/docs/xsl-result.html
@@ -34,20 +34,6 @@ under the License.
             color:                 #666;
         }
     </style>
-    <link href='https://struts.apache.org/highlighter/style/shCoreStruts.css' rel='stylesheet' type='text/css' />
-    <link href='https://struts.apache.org/highlighter/style/shThemeStruts.css' rel='stylesheet' type='text/css' />
-    <script src='https://struts.apache.org/highlighter/js/shCore.js' type='text/javascript'></script>
-    <script src='https://struts.apache.org/highlighter/js/shBrushPlain.js' type='text/javascript'></script>
-    <script src='https://struts.apache.org/highlighter/js/shBrushXml.js' type='text/javascript'></script>
-    <script src='https://struts.apache.org/highlighter/js/shBrushJava.js' type='text/javascript'></script>
-    <script src='https://struts.apache.org/highlighter/js/shBrushJScript.js' type='text/javascript'></script>
-    <script src='https://struts.apache.org/highlighter/js/shBrushGroovy.js' type='text/javascript'></script>
-    <script src='https://struts.apache.org/highlighter/js/shBrushBash.js' type='text/javascript'></script>
-    <script src='https://struts.apache.org/highlighter/js/shBrushCss.js' type='text/javascript'></script>
-    <script type="text/javascript">
-        SyntaxHighlighter.defaults['toolbar'] = false;
-        SyntaxHighlighter.all();
-    </script>
     <script type="text/javascript" language="javascript">
         var hide = null;
         var show = null;
@@ -139,50 +125,29 @@ under the License.
 
     <div class="pagecontent">
         <div class="wiki-content">
-            <div id="ConfluenceContent"><p><style type="text/css">/*<![CDATA[*/
-div.rbtoc1488973594627 {padding: 0px;}
-div.rbtoc1488973594627 ul {list-style: disc;margin-left: 0px;}
-div.rbtoc1488973594627 li {margin-left: 0px;padding-left: 0px;}
-
-/*]]>*/</style></p><div class="toc-macro rbtoc1488973594627">
-<ul class="toc-indentation"><li><a shape="rect" href="#XSLResult-Description">Description</a></li><li><a shape="rect" href="#XSLResult-Parameters">Parameters</a></li><li><a shape="rect" href="#XSLResult-Examples">Examples</a></li></ul>
-</div><h1 id="XSLResult-Description">Description</h1><p>XSLTResult uses XSLT to transform an action object to XML. The recent version has been specifically modified to deal with Xalan flaws. When using Xalan you may notice that even though you have a very minimal stylesheet like this one</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;xsl:template match="/result"&gt;
+            <div id="ConfluenceContent"><h1 id="XSLResult-Description">Description</h1><p>XSLTResult uses XSLT to transform an action object to XML. The recent version has been specifically modified to deal with Xalan flaws. When using Xalan you may notice that even though you have a very minimal stylesheet like this one</p><parameter ac:name="">xml</parameter><plain-text-body>&lt;xsl:template match="/result"&gt;
 &lt;result/&gt;
-&lt;/xsl:template&gt;</pre>
-</div></div><p>Xalan would still iterate through every property of your action and all its descendants.</p><p>If you had double-linked objects, Xalan would work forever analysing an infinite object tree. Even if your stylesheet was not constructed to process them all. It's because the current Xalan eagerly and extensively converts<br clear="none">everything to its internal DTM model before further processing.</p><p>That's why there's a loop eliminator added that works by indexing every object-property combination during processing. If it notices that some object's property was already walked through, it doesn't go any deeper. Say you have two objects, x and y, with the following properties set (pseudocode):</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<pre class="brush: java; gutter: false; theme: Default" style="font-size:12px;">x.y = y;
+&lt;/xsl:template&gt;</plain-text-body><p>Xalan would still iterate through every property of your action and all its descendants.</p><p>If you had double-linked objects, Xalan would work forever analysing an infinite object tree. Even if your stylesheet was not constructed to process them all. It's because the current Xalan eagerly and extensively converts<br clear="none">everything to its internal DTM model before further processing.</p><p>That's why there's a loop eliminator added that works by indexing every object-property combination during processing. If it notices that some object's property was already walked through, it doesn't go any deeper. Say you have two objects, x and y, with the following properties set (pseudocode):</p><plain-text-body>x.y = y;
 and
 y.x = x;
-action.x=x;</pre>
-</div></div><p>Due to that modification, the resulting XML document based on x would be:</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;result&gt;
+action.x=x;</plain-text-body><p>Due to that modification, the resulting XML document based on x would be:</p><parameter ac:name="">xml</parameter><plain-text-body>&lt;result&gt;
 &lt;x&gt;
 &lt;y/&gt;
 &lt;/x&gt;
-&lt;/result&gt;</pre>
-</div></div><p>Without it there would be endless <code>x/y/x/y/x/y/...</code>&#160;elements.</p><p>The <code>XSLTResult</code>&#160;code tries also to deal with the fact that DTM model is built in a manner that children are processed before siblings. The result is that if there is object x that is both set in action's x property, and very deeply under action's a property then it would only appear under a, not under x. That's not what we expect, and that's why <code>XSLTResult</code>&#160;allows objects to repeat in various places to some extent.</p><p>Sometimes the object mesh is still very dense and you may notice that even though you have a relatively simple stylesheet, execution takes a tremendous amount of time. To help you to deal with that obstacle of Xalan, you may attach regexp filters to elements paths (xpath).</p><div class="confluence-information-macro confluence-information-macro-note"><span class="aui-icon aui-icon-small aui-iconfont-warning confluence-information-macro
 -icon"></span><div class="confluence-information-macro-body"><p>In your .xsl file the root match must be named <strong>result</strong>. This example will output the username by using <strong>getUsername</strong> on your action class:</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;xsl:template match="result"&gt;
+&lt;/result&gt;</plain-text-body><p>Without it there would be endless <code>x/y/x/y/x/y/...</code>&#160;elements.</p><p>The <code>XSLTResult</code>&#160;code tries also to deal with the fact that DTM model is built in a manner that children are processed before siblings. The result is that if there is object x that is both set in action's x property, and very deeply under action's a property then it would only appear under a, not under x. That's not what we expect, and that's why <code>XSLTResult</code>&#160;allows objects to repeat in various places to some extent.</p><p>Sometimes the object mesh is still very dense and you may notice that even though you have a relatively simple stylesheet, execution takes a tremendous amount of time. To help you to deal with that obstacle of Xalan, you may attach regexp filters to elements paths (xpath).</p><rich-text-body><p>In your .xsl file the root match must be named <strong>result</strong>. This example will output the username by using <st
 rong>getUsername</strong> on your action class:</p><parameter ac:name="">xml</parameter><plain-text-body>&lt;xsl:template match="result"&gt;
 &lt;html&gt;
 &lt;body&gt;
   Hello &lt;xsl:value-of select="username"/&gt; how are you?
 &lt;/body&gt;
 &lt;/html&gt;
-&lt;/xsl:template&gt;</pre>
-</div></div></div></div><p>In the following example the XSLT result would only walk through action's properties without their childs. It would also skip every property that has <code>hugeCollection</code>&#160;in their name. Element's path is first compared to <code>excludingPattern</code>&#160;- if it matches it's no longer processed. Then it is compared to <code>matchingPattern</code>&#160;and processed only if there's a match.</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;result name="success" type="xslt"&gt;
+&lt;/xsl:template&gt;</plain-text-body></rich-text-body><p>In the following example the XSLT result would only walk through action's properties without their childs. It would also skip every property that has <code>hugeCollection</code>&#160;in their name. Element's path is first compared to <code>excludingPattern</code>&#160;- if it matches it's no longer processed. Then it is compared to <code>matchingPattern</code>&#160;and processed only if there's a match.</p><parameter ac:name="">xml</parameter><plain-text-body>&lt;result name="success" type="xslt"&gt;
   &lt;param name="stylesheetLocation"&gt;foo.xslt&lt;/param&gt;
   &lt;param name="matchingPattern"&gt;^/result/[^/*]$&lt;/param&gt;
   &lt;param name="excludingPattern"&gt;.*(hugeCollection).*&lt;/param&gt;
-&lt;/result&gt;</pre>
-</div></div><p>In the following example the XSLT result would use the action's user property instead of the action as it's base document and walk through it's properties. The <code>exposedValue</code>&#160;uses an OGNL expression to derive it's value.</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;result name="success" type="xslt"&gt;
+&lt;/result&gt;</plain-text-body><p>In the following example the XSLT result would use the action's user property instead of the action as it's base document and walk through it's properties. The <code>exposedValue</code>&#160;uses an OGNL expression to derive it's value.</p><parameter ac:name="">xml</parameter><plain-text-body>&lt;result name="success" type="xslt"&gt;
   &lt;param name="stylesheetLocation"&gt;foo.xslt&lt;/param&gt;
   &lt;param name="exposedValue"&gt;${user}&lt;/param&gt;
-&lt;/result&gt;</pre>
-</div></div><h1 id="XSLResult-Parameters">Parameters</h1><p>This result type takes the following parameters:</p><ul style="list-style-type: square;"><li><strong>stylesheetLocation</strong> (default) - the location to go to after execution.</li><li><strong>location</strong> (deprecated) - the same as <strong>stylesheetLocation</strong> but it was dropped since Struts 2.5.</li><li><strong>encoding&#160;</strong>- character encoding used in XML, default UTF-8.</li><li><strong>parse</strong>&#160;- <code>true</code>&#160;by default. If set to false, the location param will not be parsed for Ognl expressions.</li><li><strong>matchingPattern&#160;</strong>- <code>Pattern</code>&#160;that matches only desired elements, by default it matches everything.</li><li><strong>excludingPattern</strong>&#160;- <code>Pattern</code>&#160;that eliminates unwanted elements, by default it matches none.</li></ul><p><code>struts.properties</code>&#160;related configuration:</p><ul style="list-style-type: s
 quare;"><li><strong>struts.xslt.nocache</strong>&#160;- Defaults to false. If set to true, disables stylesheet caching. Good for development, bad for production.</li></ul><h1 id="XSLResult-Examples"><span style="font-size: 24.0px;">Examples</span></h1><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;result name="success" type="xslt"&gt;foo.xslt&lt;/result&gt;</pre>
-</div></div><p>&#160;</p><p>&#160;</p></div>
+&lt;/result&gt;</plain-text-body><h1 id="XSLResult-Parameters">Parameters</h1><p>This result type takes the following parameters:</p><ul style="list-style-type: square;"><li><strong>stylesheetLocation</strong> (default) - the location to go to after execution.</li><li><strong>location</strong> (deprecated) - the same as <strong>stylesheetLocation</strong> but it was dropped since Struts 2.5.</li><li><strong>encoding&#160;</strong>- character encoding used in XML, default UTF-8.</li><li><strong>parse</strong>&#160;- <code>true</code>&#160;by default. If set to false, the location param will not be parsed for Ognl expressions.</li><li><strong>matchingPattern&#160;</strong>- <code>Pattern</code>&#160;that matches only desired elements, by default it matches everything.</li><li><strong>excludingPattern</strong>&#160;- <code>Pattern</code>&#160;that eliminates unwanted elements, by default it matches none.</li></ul><p><code>struts.properties</code>&#160;related configuration:</p><ul styl
 e="list-style-type: square;"><li><strong>struts.xslt.nocache</strong>&#160;- Defaults to false. If set to true, disables stylesheet caching. Good for development, bad for production.</li></ul><h1 id="XSLResult-Examples"><span style="font-size: 24.0px;">Examples</span></h1><parameter ac:name="">xml</parameter><plain-text-body>&lt;result name="success" type="xslt"&gt;foo.xslt&lt;/result&gt;</plain-text-body><p>&#160;</p><p>&#160;</p></div>
         </div>
 
         


Mime
View raw message