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

mseidel pushed a commit to branch AOO42X
in repository https://gitbox.apache.org/repos/asf/openoffice.git


The following commit(s) were added to refs/heads/AOO42X by this push:
     new c8ad9ae3b0 pre-commit(mixed-line-ending): autofix more xsl files (#309)
c8ad9ae3b0 is described below

commit c8ad9ae3b013ebd2efaf76bb7ed88cbfc5b425e5
Author: John Bampton <[email protected]>
AuthorDate: Sat Mar 1 09:54:09 2025 +1000

    pre-commit(mixed-line-ending): autofix more xsl files (#309)
    
    (cherry picked from commit 533a8cdee3ecbf77ff61d642fbad324fbe931df6)
---
 ext_libraries/ratscan/scan/rat-output-to-html.xsl  | 420 +++++++++---------
 .../org/openoffice/test/common/XMLReporter.xsl     | 468 ++++++++++-----------
 2 files changed, 444 insertions(+), 444 deletions(-)

diff --git a/ext_libraries/ratscan/scan/rat-output-to-html.xsl 
b/ext_libraries/ratscan/scan/rat-output-to-html.xsl
index 27acb1ca84..9bd8e0afd5 100644
--- a/ext_libraries/ratscan/scan/rat-output-to-html.xsl
+++ b/ext_libraries/ratscan/scan/rat-output-to-html.xsl
@@ -1,211 +1,211 @@
-<xsl:transform xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; version="2.0">
-
-<!--***********************************************************
- * 
- * 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
- * "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.
- * 
- ***********************************************************-->
-
-<!-- This style sheet converts any rat-report.xml file.  -->
-
-<xsl:variable name="now" select="current-dateTime()"/>
-
-<xsl:template match="/">
-
-    <html>
-
-    <xsl:comment>Generated at <xsl:value-of select="$now"/></xsl:comment>
-    <head>
-     <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
-     <style type="text/css">
-    &lt;!--
-body {margin-top: 0px;font-size: 0.8em;background-color: #F9F7ED;}
-
-h1 {color:red;}
-h2 {color:blue;}
-h3 {color:green;}
-h4 {color:orange;}
-
-/* Table Design */
-
-table,tr,td {text-align:center;font-weight:bold;border:1px solid #000;}
-caption {color:blue;text-align:left;}
-.notes, .binaries, .archives, .standards {width:25%;}
-.notes {background:#D7EDEE;}
-.binaries {background:#D0F2F4;}
-.archives {background:#ABE7E9;}
-.standards {background:#A0F0F4;}
-.licenced, .generated {width:50%;}
-.licenced {background:#C6EBDD;}
-.generated {background:#ABE9D2;}
-.java_note {background:#D6EBC6;}
-.generated_note {background:#C9E7A9;}
-.unknown {width:100%;background:#E92020;}
-.unknown-zero {color:#00CC00;}
-.center{text-align:center;margin:0 auto;}
---&gt;
-     </style>
-    </head>
-    <body>
-           <xsl:apply-templates/>
-           <xsl:call-template name="generated"/>
-    </body>
-    </html>
-</xsl:template>
-
-<xsl:template match="rat-report">
-
-       <h1>Rat Report</h1>
-       <p>This HTML version (yes, it is!) is generated from the RAT xml 
reports using Saxon9B. All the outputs required are displayed below, similar to 
the .txt version.
-           This is obviously a work in progress; and a prettier, easier to 
read and manage version will be available soon</p>
-<div class="center">   
-<table id="rat-reports summary" cellspacing="0" summary="A snapshot summary of 
this rat report">
-<caption>
-Table 1: A snapshot summary of this rat report.
-</caption>
-  <tr>
-    <td colspan="1" class="notes">Notes: <xsl:value-of 
select="count(descendant::type[attribute::name=&quot;notice&quot;])"/></td>
-    <td colspan="1" class="binaries">Binaries: <xsl:value-of 
select="count(descendant::type[attribute::name=&quot;binary&quot;])"/></td>
-    <td colspan="1" class="archives">Archives: <xsl:value-of 
select="count(descendant::type[attribute::name=&quot;archive&quot;])"/></td>
-    <td colspan="1" class="standards">Standards: <xsl:value-of 
select="count(descendant::type[attribute::name=&quot;standard&quot;])"/></td>
-  </tr>
-  <tr>
-    <td colspan="2" class="licenced">Apache Licensed: <xsl:value-of 
select="count(descendant::header-type[attribute::name=&quot;AL   
&quot;])"/></td>
-    <td colspan="2" class="generated">Generated Documents: <xsl:value-of 
select="count(descendant::header-type[attribute::name=&quot;GEN  
&quot;])"/></td>
-  </tr>
-  <tr>
-    <td colspan="2" class="java_note">Note: JavaDocs are generated and so 
license header is optional</td>
-    <td colspan="2" class="generated_note">Note: Generated files do not 
require license headers</td>
-  </tr>
-  <tr>
-<xsl:choose>
-  <xsl:when 
test="count(descendant::header-type[attribute::name=&quot;?????&quot;]) &gt; 0">
-    <td colspan="4" class="unknown"><xsl:value-of 
select="count(descendant::header-type[attribute::name=&quot;?????&quot;])"/> 
Unknown Licenses - or files without a license.</td>
-  </xsl:when>
-  <xsl:otherwise>
-    <td colspan="4" class="unknown-zero"><xsl:value-of 
select="count(descendant::header-type[attribute::name=&quot;?????&quot;])"/> 
Unknown Licenses - or files without a license.</td>
-  </xsl:otherwise>
-</xsl:choose>
-  </tr>
-</table>
-</div>
-<hr/>
-       <h3>Unapproved Licenses:</h3>
-
-       <xsl:for-each 
select="descendant::resource[license-approval/@name=&quot;false&quot;]">
-  <xsl:text>  </xsl:text>
-  <xsl:value-of select="@name"/><br/>
-  <xsl:text>
-</xsl:text>
-</xsl:for-each>
-<hr/>
-
-<h3>Archives:</h3>
-
-<xsl:for-each select="descendant::resource[type/@name=&quot;archive&quot;]">
- + <xsl:value-of select="@name"/>
- <br/>
- </xsl:for-each>
- <hr/>
-
- <p>
-        Files with Apache License headers will be marked AL<br/>
-        Binary files (which do not require AL headers) will be marked B<br/>
-  Compressed archives will be marked A<br/>
-  Notices, licenses etc will be marked N<br/>
-  </p>
-
- <xsl:for-each select="descendant::resource">
-  <xsl:choose>
-        <xsl:when test="license-approval/@name=&quot;false&quot;">!</xsl:when>
-        <xsl:otherwise><xsl:text> </xsl:text></xsl:otherwise>
- </xsl:choose>
- <xsl:choose>
-        <xsl:when test="type/@name=&quot;notice&quot;">N   </xsl:when>
-        <xsl:when test="type/@name=&quot;archive&quot;">A   </xsl:when>
-        <xsl:when test="type/@name=&quot;binary&quot;">B   </xsl:when>
-        <xsl:when test="type/@name=&quot;standard&quot;"><xsl:value-of 
select="header-type/@name"/></xsl:when>
-        <xsl:otherwise>!!!!!</xsl:otherwise>
- </xsl:choose>
- <xsl:text>      </xsl:text>
- <xsl:value-of select="@name"/><br/>
- <xsl:text>
- </xsl:text>
- </xsl:for-each>
- <hr/>
-
- <h3>Printing headers for files without AL header...</h3>
- 
- <xsl:for-each 
select="descendant::resource[header-type/@name=&quot;?????&quot;]">
-
-        <h4><xsl:value-of select="@name"/></h4>
-  <xsl:value-of select="header-sample"/>
-  <hr/>
-</xsl:for-each>
-<br/>
-
- <!-- <xsl:apply-templates select="resource"/>
-    <xsl:apply-templates select="header-sample"/>
-    <xsl:apply-templates select="header-type"/>
-    <xsl:apply-templates select="license-family"/>
-    <xsl:apply-templates select="license-approval"/>
-    <xsl:apply-templates select="type"/> -->
-
-</xsl:template>   
-
-<xsl:template match="resource">
-       <div>
-               <h3>Resource: <xsl:value-of select="@name"/></h3>
-      <xsl:apply-templates/>
-    </div>
-</xsl:template>
-
-<xsl:template match="header-sample">
-       <xsl:if test="normalize-space(.) != ''">
-  <h4>First few lines of non-compliant file</h4>
-    <p>
-      <xsl:value-of select="."/>
-    </p>
-    </xsl:if>
-    <h4>Other Info:</h4>
-</xsl:template>
-
-<xsl:template match="header-type">
-       Header Type: <xsl:value-of select="@name"/>
-       <br/>
-</xsl:template>
-
-<xsl:template match="license-family">
-       License Family: <xsl:value-of select="@name"/>
-       <br/>
-</xsl:template>
-
-<xsl:template match="license-approval">
-       License Approval: <xsl:value-of select="@name"/>
-       <br/>
-</xsl:template>
-
-<xsl:template match="type">
-       Type: <xsl:value-of select="@name"/>
-       <br/>
-</xsl:template>
-
-<xsl:template name="generated">
-       <p>Generated at <xsl:value-of select="$now"/></p>
-</xsl:template>
+<xsl:transform xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; version="2.0">
+
+<!--***********************************************************
+ * 
+ * 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
+ * "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.
+ * 
+ ***********************************************************-->
+
+<!-- This style sheet converts any rat-report.xml file.  -->
+
+<xsl:variable name="now" select="current-dateTime()"/>
+
+<xsl:template match="/">
+
+    <html>
+
+    <xsl:comment>Generated at <xsl:value-of select="$now"/></xsl:comment>
+    <head>
+     <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
+     <style type="text/css">
+    &lt;!--
+body {margin-top: 0px;font-size: 0.8em;background-color: #F9F7ED;}
+
+h1 {color:red;}
+h2 {color:blue;}
+h3 {color:green;}
+h4 {color:orange;}
+
+/* Table Design */
+
+table,tr,td {text-align:center;font-weight:bold;border:1px solid #000;}
+caption {color:blue;text-align:left;}
+.notes, .binaries, .archives, .standards {width:25%;}
+.notes {background:#D7EDEE;}
+.binaries {background:#D0F2F4;}
+.archives {background:#ABE7E9;}
+.standards {background:#A0F0F4;}
+.licenced, .generated {width:50%;}
+.licenced {background:#C6EBDD;}
+.generated {background:#ABE9D2;}
+.java_note {background:#D6EBC6;}
+.generated_note {background:#C9E7A9;}
+.unknown {width:100%;background:#E92020;}
+.unknown-zero {color:#00CC00;}
+.center{text-align:center;margin:0 auto;}
+--&gt;
+     </style>
+    </head>
+    <body>
+           <xsl:apply-templates/>
+           <xsl:call-template name="generated"/>
+    </body>
+    </html>
+</xsl:template>
+
+<xsl:template match="rat-report">
+
+       <h1>Rat Report</h1>
+       <p>This HTML version (yes, it is!) is generated from the RAT xml 
reports using Saxon9B. All the outputs required are displayed below, similar to 
the .txt version.
+           This is obviously a work in progress; and a prettier, easier to 
read and manage version will be available soon</p>
+<div class="center">   
+<table id="rat-reports summary" cellspacing="0" summary="A snapshot summary of 
this rat report">
+<caption>
+Table 1: A snapshot summary of this rat report.
+</caption>
+  <tr>
+    <td colspan="1" class="notes">Notes: <xsl:value-of 
select="count(descendant::type[attribute::name=&quot;notice&quot;])"/></td>
+    <td colspan="1" class="binaries">Binaries: <xsl:value-of 
select="count(descendant::type[attribute::name=&quot;binary&quot;])"/></td>
+    <td colspan="1" class="archives">Archives: <xsl:value-of 
select="count(descendant::type[attribute::name=&quot;archive&quot;])"/></td>
+    <td colspan="1" class="standards">Standards: <xsl:value-of 
select="count(descendant::type[attribute::name=&quot;standard&quot;])"/></td>
+  </tr>
+  <tr>
+    <td colspan="2" class="licenced">Apache Licensed: <xsl:value-of 
select="count(descendant::header-type[attribute::name=&quot;AL   
&quot;])"/></td>
+    <td colspan="2" class="generated">Generated Documents: <xsl:value-of 
select="count(descendant::header-type[attribute::name=&quot;GEN  
&quot;])"/></td>
+  </tr>
+  <tr>
+    <td colspan="2" class="java_note">Note: JavaDocs are generated and so 
license header is optional</td>
+    <td colspan="2" class="generated_note">Note: Generated files do not 
require license headers</td>
+  </tr>
+  <tr>
+<xsl:choose>
+  <xsl:when 
test="count(descendant::header-type[attribute::name=&quot;?????&quot;]) &gt; 0">
+    <td colspan="4" class="unknown"><xsl:value-of 
select="count(descendant::header-type[attribute::name=&quot;?????&quot;])"/> 
Unknown Licenses - or files without a license.</td>
+  </xsl:when>
+  <xsl:otherwise>
+    <td colspan="4" class="unknown-zero"><xsl:value-of 
select="count(descendant::header-type[attribute::name=&quot;?????&quot;])"/> 
Unknown Licenses - or files without a license.</td>
+  </xsl:otherwise>
+</xsl:choose>
+  </tr>
+</table>
+</div>
+<hr/>
+       <h3>Unapproved Licenses:</h3>
+
+       <xsl:for-each 
select="descendant::resource[license-approval/@name=&quot;false&quot;]">
+  <xsl:text>  </xsl:text>
+  <xsl:value-of select="@name"/><br/>
+  <xsl:text>
+</xsl:text>
+</xsl:for-each>
+<hr/>
+
+<h3>Archives:</h3>
+
+<xsl:for-each select="descendant::resource[type/@name=&quot;archive&quot;]">
+ + <xsl:value-of select="@name"/>
+ <br/>
+ </xsl:for-each>
+ <hr/>
+
+ <p>
+        Files with Apache License headers will be marked AL<br/>
+        Binary files (which do not require AL headers) will be marked B<br/>
+  Compressed archives will be marked A<br/>
+  Notices, licenses etc will be marked N<br/>
+  </p>
+
+ <xsl:for-each select="descendant::resource">
+  <xsl:choose>
+        <xsl:when test="license-approval/@name=&quot;false&quot;">!</xsl:when>
+        <xsl:otherwise><xsl:text> </xsl:text></xsl:otherwise>
+ </xsl:choose>
+ <xsl:choose>
+        <xsl:when test="type/@name=&quot;notice&quot;">N   </xsl:when>
+        <xsl:when test="type/@name=&quot;archive&quot;">A   </xsl:when>
+        <xsl:when test="type/@name=&quot;binary&quot;">B   </xsl:when>
+        <xsl:when test="type/@name=&quot;standard&quot;"><xsl:value-of 
select="header-type/@name"/></xsl:when>
+        <xsl:otherwise>!!!!!</xsl:otherwise>
+ </xsl:choose>
+ <xsl:text>      </xsl:text>
+ <xsl:value-of select="@name"/><br/>
+ <xsl:text>
+ </xsl:text>
+ </xsl:for-each>
+ <hr/>
+
+ <h3>Printing headers for files without AL header...</h3>
+ 
+ <xsl:for-each 
select="descendant::resource[header-type/@name=&quot;?????&quot;]">
+
+        <h4><xsl:value-of select="@name"/></h4>
+  <xsl:value-of select="header-sample"/>
+  <hr/>
+</xsl:for-each>
+<br/>
+
+ <!-- <xsl:apply-templates select="resource"/>
+    <xsl:apply-templates select="header-sample"/>
+    <xsl:apply-templates select="header-type"/>
+    <xsl:apply-templates select="license-family"/>
+    <xsl:apply-templates select="license-approval"/>
+    <xsl:apply-templates select="type"/> -->
+
+</xsl:template>   
+
+<xsl:template match="resource">
+       <div>
+               <h3>Resource: <xsl:value-of select="@name"/></h3>
+      <xsl:apply-templates/>
+    </div>
+</xsl:template>
+
+<xsl:template match="header-sample">
+       <xsl:if test="normalize-space(.) != ''">
+  <h4>First few lines of non-compliant file</h4>
+    <p>
+      <xsl:value-of select="."/>
+    </p>
+    </xsl:if>
+    <h4>Other Info:</h4>
+</xsl:template>
+
+<xsl:template match="header-type">
+       Header Type: <xsl:value-of select="@name"/>
+       <br/>
+</xsl:template>
+
+<xsl:template match="license-family">
+       License Family: <xsl:value-of select="@name"/>
+       <br/>
+</xsl:template>
+
+<xsl:template match="license-approval">
+       License Approval: <xsl:value-of select="@name"/>
+       <br/>
+</xsl:template>
+
+<xsl:template match="type">
+       Type: <xsl:value-of select="@name"/>
+       <br/>
+</xsl:template>
+
+<xsl:template name="generated">
+       <p>Generated at <xsl:value-of select="$now"/></p>
+</xsl:template>
 </xsl:transform>
diff --git a/test/testcommon/source/org/openoffice/test/common/XMLReporter.xsl 
b/test/testcommon/source/org/openoffice/test/common/XMLReporter.xsl
index 5b3067c332..a87533a935 100644
--- a/test/testcommon/source/org/openoffice/test/common/XMLReporter.xsl
+++ b/test/testcommon/source/org/openoffice/test/common/XMLReporter.xsl
@@ -1,234 +1,234 @@
-<?xml version="1.0"?>
-<!--***********************************************************
- * 
- * 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
- * "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.
- * 
- ***********************************************************-->
- 
- 
-<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform";>
-<xsl:output method="html" encoding="utf-8" doctype-public="-//W3C//DTD XHTML 
1.0 Strict//EN" 
doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"; />
-<xsl:template match="/">
-<html xmlns="http://www.w3.org/1999/xhtml";>
-<head>
-<style>
-body,td,div { -webkit-text-size-adjust:none; font-size: 11px; font-family: 
verdana, arial, sans-serif; padding: 0; margin: 0}
-a.unchecked {text-decoration: none;padding: 0px 4px;color: 
#000000;font-weight: bold;border-bottom: 2px solid #AAAAAA;}
-a.checked {text-decoration: none;border-bottom: 2px solid #E6820E;padding: 0px 
4px;color: #000000;font-weight: bold;}
-.container {width: 100%;float: left;margin-right: -300px;}
-.content {margin-right: 300px;}
-.sidebar {width: 300px;float: right;}
-.header {font-weight: bold; margin: 4px; border-radius: 
3px;-moz-border-radius: 4px;-webkit-border-radius: 4px;background: 
#61B7CF;padding: 4px;}
-table {border-collapse:collapse; border: 1px solid #eeeeee;}
-td {border: 1px solid #eeeeee;padding:4px}
-th {border: 1px solid #eeeeee;background:#f5f5f5; padding:4px;text-align:left}
-tr.Success {color:#118811;}
-tr.Failure {color:#F27D15;}
-tr.Ignored {color:#F4C700;}
-tr.Error {color:#FC130F;}
-th.Success {background:#118811;}
-th.Failure {background: #FF8888;}
-th.Ignored {background:#F4C700;}
-th.Error {background:#FF0000;}
-       </style>
-       <title>JUnit Report</title>
-</head>
-<body onload="onload()">
-
-<div class="container">
-       <div class="content">
-               <div class="header">Information</div>
-               <div style="padding: 6px">
-               <table class="infoTable"  width="100%">
-               <tr><th>Test Date</th><td><span 
id="info.test.date">Unknown</span></td></tr>
-               <tr><th>Build ID</th><td><span 
id="info.app.buildid">Unknown</span> (<span 
id="info.app.AllLanguages"></span>)</td></tr>
-               <tr><th>Revision</th><td 
id="info.app.Revision">Unknown</td></tr>
-               <tr><th>OS</th><td><span id="info.os.name">Unknown</span>-<span 
id="info.os.version">Unknown</span>-<span 
id="info.os.arch">Unknown</span></td></tr>
-               <tr><th>Host Name</th><td><span 
id="info.hostname">Unknown</span> (<span id="info.ip"></span>)</td></tr>
-               <tr><th>Java</th><td id="java.runtime.version">Unknown</td></tr>
-               </table>
-               </div>
-       </div>
-</div>
-
-<div class="sidebar">
-       <div class="header">Summary</div>
-       <div style="padding: 6px">
-       <table class="summaryTable" width="100%">
-               <tr><th>All</th><td><a href="#" onclick="showAllRecord()" 
id="AllNo" class="checked" >0</a></td></tr>
-               <tr><th class="Success">Success</th><td><a href="#" 
onclick="toggleRecord('Success')" class="checked" id="SuccessNo">0</a></td></tr>
-               <tr><th class="Failure">Failure</th><td><a href="#" 
onclick="toggleRecord('Failure')" class="checked" id="FailureNo">0</a></td></tr>
-               <tr><th class="Error">Error</th><td><a href="#" 
onclick="toggleRecord('Error')" class="checked" id="ErrorNo">0</a></td></tr>
-               <tr><th class="Ignored">Ignored</th><td><a href="#" 
onclick="toggleRecord('Ignored')" class="checked" id="IgnoredNo">0</a></td></tr>
-       </table>
-       </div>
-</div>
-<div style="clear:both;" class="header">
-       <div style="float:left" >Record</div>
-       <div style="float:right;">
-       </div>
-       <div style="clear:both;"></div>
-</div>
-<div style="padding: 6px" id="recordTableContainer">
-</div>
-
-
-<script>
-<xsl:text disable-output-escaping='yes'>
-<![CDATA[
-function ajax(url, callback) {
-       var xmlhttp = window.XMLHttpRequest ? new XMLHttpRequest() : new 
ActiveXObject("Microsoft.XMLHTTP");
-       xmlhttp.onreadystatechange = callback;
-       xmlhttp.open("GET", url, true);
-       xmlhttp.send();
-}
-
-function text(s) {
-       return s.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, 
"&gt;");
-}
-
-function $(id) {
-       return document.getElementById(id);
-}
-
-function $$(e, tag) {
-       var els = e.getElementsByTagName(tag);
-       return els[0] || null;
-}
-
-function $$s(e, tag) {
-       return e.getElementsByTagName(tag);
-}
-
-function refresh() {
-       var data = $('data');
-       var testsuiteEl = $$(data, 'testsuite');
-       var allNo = testsuiteEl.getAttribute("tests");
-       $('AllNo').innerHTML = allNo;
-       var failureNo = testsuiteEl.getAttribute("failures");
-       $('FailureNo').innerHTML = failureNo;
-       var errorNo = testsuiteEl.getAttribute("errors");
-       $('ErrorNo').innerHTML = errorNo;
-       var ignoredNo = testsuiteEl.getAttribute("ignored");
-       $('IgnoredNo').innerHTML = ignoredNo;
-       $('SuccessNo').innerHTML = parseInt(allNo) - parseInt(failureNo) - 
parseInt(errorNo) - parseInt(ignoredNo);
-       
-       var propEls = $$s(testsuiteEl, "property");
-       var props = {};
-       for (var i = 0; i < propEls.length; i++) {
-               var e = propEls[i];
-               props[e.getAttribute("name")] = e.getAttribute("value");
-       }
-       
-       $('info.test.date').innerHTML = props['info.test.date'] || 'Unknown';
-       $('info.app.buildid').innerHTML = props['info.app.buildid'] || 
'Unknown';
-       $('info.app.AllLanguages').innerHTML = props['info.app.AllLanguages'] 
|| '';
-       $('info.os.name').innerHTML = props['info.os.name'] || 'Unknown';
-       $('info.os.version').innerHTML = props['info.os.version'] || 'Unknown';
-       $('info.os.arch').innerHTML = props['info.os.arch'] || 'Unknown';
-       if (props['info.app.Revision']) 
-               $('info.app.Revision').innerHTML = '<a 
href="http://svn.apache.org/viewvc?view=revision&revision=' + 
props['info.app.Revision'] + '">'  + props['info.app.Revision'] + '</a>';
-       $('info.hostname').innerHTML = props['info.hostname'] || 'Unknown';
-       $('info.ip').innerHTML = props['info.ip'] || '0.0.0.0';
-       $('java.runtime.version').innerHTML = props['java.runtime.version'] || 
'Unknown';
-       
-       var testcaseEls = $$s(data, 'testcase');
-       var html = '<table 
class="recordTable"><thead><tr><th>Class</th><th>Method</th><th>Status</th><th 
width="80%">Message</th><th>Time</th><th>Screenshot</th></tr></thead><tbody 
id="recordTable">';
-
-       for (var i = 0; i < testcaseEls.length; i++){
-               var e = testcaseEls[i], c = null;
-               var status = 'Success', message = '', screenshot= '';
-               if (c = $$(e, 'failure')) {
-                       status = 'Failure';
-                       message = '<div>' + text(c.getAttribute("message")) + 
'</div>';
-                       message += '<pre>' + text(c.innerHTML) + '</pre>';
-                       screenshot = '<a href="screenshot/' + 
e.getAttribute("name") + '.png">Screenshot</a>';
-               } else if (c = $$(e, 'error')) {
-                       status = 'Error';
-                       message = '<div>' + text(c.getAttribute("message")) + 
'</div>';
-                       message += '<pre>' + text(c.innerHTML) + '</pre>';
-                       screenshot = '<a href="screenshot/' + 
e.getAttribute("name") + '.png">Screenshot</a>';
-               } else if (c = $$(e, 'ignored')) {
-                       status = 'Ignored';
-                       message = text(c.getAttribute("message"));
-                       var bugPattern = /(.*)#(\d+)(.*)/;
-                       if( bugPattern.test(message) ) {
-                               message = '<a 
href="https://issues.apache.org/ooo/show_bug.cgi?id=' + RegExp.$2 + '">' + 
RegExp.$1 + RegExp.$2 + '</a>' + RegExp.$3;
-                       }
-               }
-               
-               html += '<tr class="' + status + '"><td>' 
-                       + e.getAttribute("classname") + '</td><td>' 
-                       + e.getAttribute("methodname") + '</td><td>' 
-                       + status + '</td><td>' 
-                       + message + '</td><td>' 
-                       + e.getAttribute("time") + '</td><td>' 
-                       + screenshot + '</td></tr>';
-                       
-       }
-       
-       $('recordTableContainer').innerHTML = html + '</tbody></table>';
-}
-
-function showAllRecord() {
-       var trEls = $$s($('recordTable'), 'tr');
-       for (var i = 0; i < trEls.length; i++){
-               var e = trEls[i];
-               e.style.display = '';
-       }
-       $("ErrorNo").className = 'checked';
-       $("FailureNo").className = 'checked';
-       $("IgnoredNo").className = 'checked';
-       $("SuccessNo").className = 'checked';
-}
-
-function toggleRecord(status) {
-       var display = '';
-       var el = $(status + "No");
-       if (el.className == 'unchecked') {
-               el.className = 'checked';
-       } else {
-               el.className = 'unchecked';
-               display = 'none';
-       }
-       
-       var trEls = $$s($('recordTable'), 'tr');
-       for (var i = 0; i < trEls.length; i++){
-               var e = trEls[i];
-               if (e.className == status) {
-                       e.style.display = display;
-               }
-       }
-}
-
-function onload() {
-       refresh();
-}
-
-
-]]>
-</xsl:text>
-</script>
-<div id="data" style="display:none">
-       <xsl:copy-of select="*" />
-</div>
-</body>
-</html>
-</xsl:template>
-</xsl:stylesheet>    
-   
+<?xml version="1.0"?>
+<!--***********************************************************
+ * 
+ * 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
+ * "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.
+ * 
+ ***********************************************************-->
+ 
+ 
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform";>
+<xsl:output method="html" encoding="utf-8" doctype-public="-//W3C//DTD XHTML 
1.0 Strict//EN" 
doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"; />
+<xsl:template match="/">
+<html xmlns="http://www.w3.org/1999/xhtml";>
+<head>
+<style>
+body,td,div { -webkit-text-size-adjust:none; font-size: 11px; font-family: 
verdana, arial, sans-serif; padding: 0; margin: 0}
+a.unchecked {text-decoration: none;padding: 0px 4px;color: 
#000000;font-weight: bold;border-bottom: 2px solid #AAAAAA;}
+a.checked {text-decoration: none;border-bottom: 2px solid #E6820E;padding: 0px 
4px;color: #000000;font-weight: bold;}
+.container {width: 100%;float: left;margin-right: -300px;}
+.content {margin-right: 300px;}
+.sidebar {width: 300px;float: right;}
+.header {font-weight: bold; margin: 4px; border-radius: 
3px;-moz-border-radius: 4px;-webkit-border-radius: 4px;background: 
#61B7CF;padding: 4px;}
+table {border-collapse:collapse; border: 1px solid #eeeeee;}
+td {border: 1px solid #eeeeee;padding:4px}
+th {border: 1px solid #eeeeee;background:#f5f5f5; padding:4px;text-align:left}
+tr.Success {color:#118811;}
+tr.Failure {color:#F27D15;}
+tr.Ignored {color:#F4C700;}
+tr.Error {color:#FC130F;}
+th.Success {background:#118811;}
+th.Failure {background: #FF8888;}
+th.Ignored {background:#F4C700;}
+th.Error {background:#FF0000;}
+       </style>
+       <title>JUnit Report</title>
+</head>
+<body onload="onload()">
+
+<div class="container">
+       <div class="content">
+               <div class="header">Information</div>
+               <div style="padding: 6px">
+               <table class="infoTable"  width="100%">
+               <tr><th>Test Date</th><td><span 
id="info.test.date">Unknown</span></td></tr>
+               <tr><th>Build ID</th><td><span 
id="info.app.buildid">Unknown</span> (<span 
id="info.app.AllLanguages"></span>)</td></tr>
+               <tr><th>Revision</th><td 
id="info.app.Revision">Unknown</td></tr>
+               <tr><th>OS</th><td><span id="info.os.name">Unknown</span>-<span 
id="info.os.version">Unknown</span>-<span 
id="info.os.arch">Unknown</span></td></tr>
+               <tr><th>Host Name</th><td><span 
id="info.hostname">Unknown</span> (<span id="info.ip"></span>)</td></tr>
+               <tr><th>Java</th><td id="java.runtime.version">Unknown</td></tr>
+               </table>
+               </div>
+       </div>
+</div>
+
+<div class="sidebar">
+       <div class="header">Summary</div>
+       <div style="padding: 6px">
+       <table class="summaryTable" width="100%">
+               <tr><th>All</th><td><a href="#" onclick="showAllRecord()" 
id="AllNo" class="checked" >0</a></td></tr>
+               <tr><th class="Success">Success</th><td><a href="#" 
onclick="toggleRecord('Success')" class="checked" id="SuccessNo">0</a></td></tr>
+               <tr><th class="Failure">Failure</th><td><a href="#" 
onclick="toggleRecord('Failure')" class="checked" id="FailureNo">0</a></td></tr>
+               <tr><th class="Error">Error</th><td><a href="#" 
onclick="toggleRecord('Error')" class="checked" id="ErrorNo">0</a></td></tr>
+               <tr><th class="Ignored">Ignored</th><td><a href="#" 
onclick="toggleRecord('Ignored')" class="checked" id="IgnoredNo">0</a></td></tr>
+       </table>
+       </div>
+</div>
+<div style="clear:both;" class="header">
+       <div style="float:left" >Record</div>
+       <div style="float:right;">
+       </div>
+       <div style="clear:both;"></div>
+</div>
+<div style="padding: 6px" id="recordTableContainer">
+</div>
+
+
+<script>
+<xsl:text disable-output-escaping='yes'>
+<![CDATA[
+function ajax(url, callback) {
+       var xmlhttp = window.XMLHttpRequest ? new XMLHttpRequest() : new 
ActiveXObject("Microsoft.XMLHTTP");
+       xmlhttp.onreadystatechange = callback;
+       xmlhttp.open("GET", url, true);
+       xmlhttp.send();
+}
+
+function text(s) {
+       return s.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, 
"&gt;");
+}
+
+function $(id) {
+       return document.getElementById(id);
+}
+
+function $$(e, tag) {
+       var els = e.getElementsByTagName(tag);
+       return els[0] || null;
+}
+
+function $$s(e, tag) {
+       return e.getElementsByTagName(tag);
+}
+
+function refresh() {
+       var data = $('data');
+       var testsuiteEl = $$(data, 'testsuite');
+       var allNo = testsuiteEl.getAttribute("tests");
+       $('AllNo').innerHTML = allNo;
+       var failureNo = testsuiteEl.getAttribute("failures");
+       $('FailureNo').innerHTML = failureNo;
+       var errorNo = testsuiteEl.getAttribute("errors");
+       $('ErrorNo').innerHTML = errorNo;
+       var ignoredNo = testsuiteEl.getAttribute("ignored");
+       $('IgnoredNo').innerHTML = ignoredNo;
+       $('SuccessNo').innerHTML = parseInt(allNo) - parseInt(failureNo) - 
parseInt(errorNo) - parseInt(ignoredNo);
+       
+       var propEls = $$s(testsuiteEl, "property");
+       var props = {};
+       for (var i = 0; i < propEls.length; i++) {
+               var e = propEls[i];
+               props[e.getAttribute("name")] = e.getAttribute("value");
+       }
+       
+       $('info.test.date').innerHTML = props['info.test.date'] || 'Unknown';
+       $('info.app.buildid').innerHTML = props['info.app.buildid'] || 
'Unknown';
+       $('info.app.AllLanguages').innerHTML = props['info.app.AllLanguages'] 
|| '';
+       $('info.os.name').innerHTML = props['info.os.name'] || 'Unknown';
+       $('info.os.version').innerHTML = props['info.os.version'] || 'Unknown';
+       $('info.os.arch').innerHTML = props['info.os.arch'] || 'Unknown';
+       if (props['info.app.Revision']) 
+               $('info.app.Revision').innerHTML = '<a 
href="http://svn.apache.org/viewvc?view=revision&revision=' + 
props['info.app.Revision'] + '">'  + props['info.app.Revision'] + '</a>';
+       $('info.hostname').innerHTML = props['info.hostname'] || 'Unknown';
+       $('info.ip').innerHTML = props['info.ip'] || '0.0.0.0';
+       $('java.runtime.version').innerHTML = props['java.runtime.version'] || 
'Unknown';
+       
+       var testcaseEls = $$s(data, 'testcase');
+       var html = '<table 
class="recordTable"><thead><tr><th>Class</th><th>Method</th><th>Status</th><th 
width="80%">Message</th><th>Time</th><th>Screenshot</th></tr></thead><tbody 
id="recordTable">';
+
+       for (var i = 0; i < testcaseEls.length; i++){
+               var e = testcaseEls[i], c = null;
+               var status = 'Success', message = '', screenshot= '';
+               if (c = $$(e, 'failure')) {
+                       status = 'Failure';
+                       message = '<div>' + text(c.getAttribute("message")) + 
'</div>';
+                       message += '<pre>' + text(c.innerHTML) + '</pre>';
+                       screenshot = '<a href="screenshot/' + 
e.getAttribute("name") + '.png">Screenshot</a>';
+               } else if (c = $$(e, 'error')) {
+                       status = 'Error';
+                       message = '<div>' + text(c.getAttribute("message")) + 
'</div>';
+                       message += '<pre>' + text(c.innerHTML) + '</pre>';
+                       screenshot = '<a href="screenshot/' + 
e.getAttribute("name") + '.png">Screenshot</a>';
+               } else if (c = $$(e, 'ignored')) {
+                       status = 'Ignored';
+                       message = text(c.getAttribute("message"));
+                       var bugPattern = /(.*)#(\d+)(.*)/;
+                       if( bugPattern.test(message) ) {
+                               message = '<a 
href="https://issues.apache.org/ooo/show_bug.cgi?id=' + RegExp.$2 + '">' + 
RegExp.$1 + RegExp.$2 + '</a>' + RegExp.$3;
+                       }
+               }
+               
+               html += '<tr class="' + status + '"><td>' 
+                       + e.getAttribute("classname") + '</td><td>' 
+                       + e.getAttribute("methodname") + '</td><td>' 
+                       + status + '</td><td>' 
+                       + message + '</td><td>' 
+                       + e.getAttribute("time") + '</td><td>' 
+                       + screenshot + '</td></tr>';
+                       
+       }
+       
+       $('recordTableContainer').innerHTML = html + '</tbody></table>';
+}
+
+function showAllRecord() {
+       var trEls = $$s($('recordTable'), 'tr');
+       for (var i = 0; i < trEls.length; i++){
+               var e = trEls[i];
+               e.style.display = '';
+       }
+       $("ErrorNo").className = 'checked';
+       $("FailureNo").className = 'checked';
+       $("IgnoredNo").className = 'checked';
+       $("SuccessNo").className = 'checked';
+}
+
+function toggleRecord(status) {
+       var display = '';
+       var el = $(status + "No");
+       if (el.className == 'unchecked') {
+               el.className = 'checked';
+       } else {
+               el.className = 'unchecked';
+               display = 'none';
+       }
+       
+       var trEls = $$s($('recordTable'), 'tr');
+       for (var i = 0; i < trEls.length; i++){
+               var e = trEls[i];
+               if (e.className == status) {
+                       e.style.display = display;
+               }
+       }
+}
+
+function onload() {
+       refresh();
+}
+
+
+]]>
+</xsl:text>
+</script>
+<div id="data" style="display:none">
+       <xsl:copy-of select="*" />
+</div>
+</body>
+</html>
+</xsl:template>
+</xsl:stylesheet>    
+   


Reply via email to