You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2019/09/24 16:49:13 UTC

[tomcat] 05/05: Fix xml source file that wasn't using expected version replacement

This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch 7.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git

commit e2ce8c9f6af7d0850363927c6eefd1d502c90357
Author: Mark Thomas <ma...@apache.org>
AuthorDate: Tue Sep 24 17:07:55 2019 +0100

    Fix xml source file that wasn't using expected version replacement
    
    Source block is xml so need to xml escape so we can remove the CDATA
    allowing the version replacement to work.
---
 webapps/docs/default-servlet.xml | 116 +++++++++++++++++++--------------------
 1 file changed, 58 insertions(+), 58 deletions(-)

diff --git a/webapps/docs/default-servlet.xml b/webapps/docs/default-servlet.xml
index 38ef059..a705bac 100644
--- a/webapps/docs/default-servlet.xml
+++ b/webapps/docs/default-servlet.xml
@@ -203,23 +203,23 @@ Format:
 <p>
   The following is a sample xsl file which mimics the default tomcat behavior:
 </p>
-<source><![CDATA[<?xml version="1.0" encoding="UTF-8"?>
+<source>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
 
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-  version="3.0">
+&lt;xsl:stylesheet xmlns:xsl=&quot;http://www.w3.org/1999/XSL/Transform&quot;
+  version=&quot;3.0&quot;&gt;
 
-  <xsl:output method="html" html-version="5.0"
-    encoding="UTF-8" indent="no"
-    doctype-system="about:legacy-compat"/>
+  &lt;xsl:output method=&quot;html&quot; html-version=&quot;5.0&quot;
+    encoding=&quot;UTF-8&quot; indent=&quot;no&quot;
+    doctype-system=&quot;about:legacy-compat&quot;/&gt;
 
-  <xsl:template match="listing">
-   <html>
-    <head>
-      <title>
+  &lt;xsl:template match=&quot;listing&quot;&gt;
+   &lt;html&gt;
+    &lt;head&gt;
+      &lt;title&gt;
         Sample Directory Listing For
-        <xsl:value-of select="@directory"/>
-      </title>
-      <style>
+        &lt;xsl:value-of select=&quot;@directory&quot;/&gt;
+      &lt;/title&gt;
+      &lt;style&gt;
         h1 {color : white;background-color : #0086b2;}
         h3 {color : white;background-color : #0086b2;}
         body {font-family : sans-serif,Arial,Tahoma;
@@ -227,56 +227,56 @@ Format:
         b {color : white;background-color : #0086b2;}
         a {color : black;} HR{color : #0086b2;}
         table td { padding: 5px; }
-      </style>
-    </head>
-    <body>
-      <h1>Sample Directory Listing For
-            <xsl:value-of select="@directory"/>
-      </h1>
-      <hr style="height: 1px;" />
-      <table style="width: 100%;">
-        <tr>
-          <th style="text-align: left;">Filename</th>
-          <th style="text-align: center;">Size</th>
-          <th style="text-align: right;">Last Modified</th>
-        </tr>
-        <xsl:apply-templates select="entries"/>
-        </table>
-      <xsl:apply-templates select="readme"/>
-      <hr style="height: 1px;" />
-      <h3>Apache Tomcat/8.0</h3>
-    </body>
-   </html>
-  </xsl:template>
+      &lt;/style&gt;
+    &lt;/head&gt;
+    &lt;body&gt;
+      &lt;h1&gt;Sample Directory Listing For
+            &lt;xsl:value-of select=&quot;@directory&quot;/&gt;
+      &lt;/h1&gt;
+      &lt;hr style=&quot;height: 1px;&quot; /&gt;
+      &lt;table style=&quot;width: 100%;&quot;&gt;
+        &lt;tr&gt;
+          &lt;th style=&quot;text-align: left;&quot;&gt;Filename&lt;/th&gt;
+          &lt;th style=&quot;text-align: center;&quot;&gt;Size&lt;/th&gt;
+          &lt;th style=&quot;text-align: right;&quot;&gt;Last Modified&lt;/th&gt;
+        &lt;/tr&gt;
+        &lt;xsl:apply-templates select=&quot;entries&quot;/&gt;
+        &lt;/table&gt;
+      &lt;xsl:apply-templates select=&quot;readme&quot;/&gt;
+      &lt;hr style=&quot;height: 1px;&quot; /&gt;
+      &lt;h3&gt;Apache Tomcat/<version-major-minor/>&lt;/h3&gt;
+    &lt;/body&gt;
+   &lt;/html&gt;
+  &lt;/xsl:template&gt;
 
 
-  <xsl:template match="entries">
-    <xsl:apply-templates select="entry"/>
-  </xsl:template>
+  &lt;xsl:template match=&quot;entries&quot;&gt;
+    &lt;xsl:apply-templates select=&quot;entry&quot;/&gt;
+  &lt;/xsl:template&gt;
 
-  <xsl:template match="readme">
-    <hr style="height: 1px;" />
-    <pre><xsl:apply-templates/></pre>
-  </xsl:template>
+  &lt;xsl:template match=&quot;readme&quot;&gt;
+    &lt;hr style=&quot;height: 1px;&quot; /&gt;
+    &lt;pre&gt;&lt;xsl:apply-templates/&gt;&lt;/pre&gt;
+  &lt;/xsl:template&gt;
 
-  <xsl:template match="entry">
-    <tr>
-      <td style="text-align: left;">
-        <xsl:variable name="urlPath" select="@urlPath"/>
-        <a href="{$urlPath}">
-          <pre><xsl:apply-templates/></pre>
-        </a>
-      </td>
-      <td style="text-align: right;">
-        <pre><xsl:value-of select="@size"/></pre>
-      </td>
-      <td style="text-align: right;">
-        <pre><xsl:value-of select="@date"/></pre>
-      </td>
-    </tr>
-  </xsl:template>
+  &lt;xsl:template match=&quot;entry&quot;&gt;
+    &lt;tr&gt;
+      &lt;td style=&quot;text-align: left;&quot;&gt;
+        &lt;xsl:variable name=&quot;urlPath&quot; select=&quot;@urlPath&quot;/&gt;
+        &lt;a href=&quot;{$urlPath}&quot;&gt;
+          &lt;pre&gt;&lt;xsl:apply-templates/&gt;&lt;/pre&gt;
+        &lt;/a&gt;
+      &lt;/td&gt;
+      &lt;td style=&quot;text-align: right;&quot;&gt;
+        &lt;pre&gt;&lt;xsl:value-of select=&quot;@size&quot;/&gt;&lt;/pre&gt;
+      &lt;/td&gt;
+      &lt;td style=&quot;text-align: right;&quot;&gt;
+        &lt;pre&gt;&lt;xsl:value-of select=&quot;@date&quot;/&gt;&lt;/pre&gt;
+      &lt;/td&gt;
+    &lt;/tr&gt;
+  &lt;/xsl:template&gt;
 
-</xsl:stylesheet>]]></source>
+&lt;/xsl:stylesheet&gt;</source>
 
 </section>
 


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org