[Libreoffice-commits] dev-tools.git: help3/xhpeditor

Olivier Hallot (via logerrit) logerrit at kemper.freedesktop.org
Tue Jan 7 20:28:52 UTC 2020


 help3/xhpeditor/index.php |   17 +++++++++--------
 1 file changed, 9 insertions(+), 8 deletions(-)

New commits:
commit 8e52943d7a5440e4f7396cbb106ff5faa6772e7e
Author:     Olivier Hallot <olivier.hallot at libreoffice.org>
AuthorDate: Tue Jan 7 11:08:11 2020 -0300
Commit:     Olivier Hallot <olivier.hallot at libreoffice.org>
CommitDate: Tue Jan 7 21:28:34 2020 +0100

    Improve wording of check messages.
    
    Change-Id: I9658ea4a0a63c96f5367bfb1bba282834c0b742b
    Reviewed-on: https://gerrit.libreoffice.org/c/dev-tools/+/86351
    Reviewed-by: Olivier Hallot <olivier.hallot at libreoffice.org>
    Tested-by: Olivier Hallot <olivier.hallot at libreoffice.org>

diff --git a/help3/xhpeditor/index.php b/help3/xhpeditor/index.php
index e386b1e..085ef73 100644
--- a/help3/xhpeditor/index.php
+++ b/help3/xhpeditor/index.php
@@ -84,7 +84,8 @@ $xhp = $_POST["xhpdoc"];
             $root = 'helpdocument';
             $old = new DOMDocument;
             
-            echo '<h2>XHP Verification</h2>';
+            echo '<h2>Help File Verification</h2>';
+            echo '<h3>Check XML Formation</h3>';
             if ( !$old->loadXML($xhp) ) {
                 $errors = libxml_get_errors();
                 echo '<p class="bug">The XML is malformed!</p>';
@@ -93,7 +94,7 @@ $xhp = $_POST["xhpdoc"];
                 }
                 libxml_clear_errors();
             }else{
-                echo "<p>No XML errors found</p>";
+                echo "<p>No XML errors found!</p>";
                 $creator = new DOMImplementation;
                 $doctype = $creator->createDocumentType($root, null, 'xmlhelp.dtd');
                 $new = $creator->createDocument(null, null, $doctype);
@@ -103,18 +104,18 @@ $xhp = $_POST["xhpdoc"];
                 $newNode = $new->importNode($oldNode, true);
                 $new->appendChild($newNode);
                 libxml_clear_errors();
-                echo '<h2>Check XHP:</h2>';
+                echo '<h3>Check XML Document Type Definition:</h3>';
                 if (!$new->validate()) {
-                    echo '<p class="bug">This document does not verify the DTD and is NOT VALID!</p>';
+                    echo '<p class="bug">This document does not verify the DTD and is <b>NOT VALID!</b></p>';
                     $errors = libxml_get_errors();
                     foreach ($errors as $error) {
                         echo display_xml_error($error, explode("\n", $new->saveXML()));
                     }
                     libxml_clear_errors();
                 }else{
-                    echo '<p>This document verifies the DTD!</p>';
+                    echo '<p>No DTD errors found!</p>';
                 };
-                echo "<h2>Check duplicated Id's:</h2>";
+                echo "<h3>Check duplicated id= :</h3>";
                 $tags_id_uniq = array('paragraph','note','warning','tip','h1','h2','h3','h4','h5','h6');
                 $xmlarray = simplexml_load_string($xhp);
                 $i=0;
@@ -126,12 +127,12 @@ $xhp = $_POST["xhpdoc"];
                 }
                 $dupped_array =  array_values(array_unique(array_diff_key($idarray, array_unique($idarray))));
                 if (count($dupped_array) > 0){
-                    echo '<p class="bug">Found duplicated ids:</p>';
+                    echo '<p class="bug">Found duplicated id= attributes:</p>';
                     foreach($dupped_array as $dup) {
                         echo "<p>$dup</p>";
                     }
                 }else{
-                    echo "<p>No duplicates ids found.</p>";
+                    echo "<p>No duplicate id= found.</p>";
                 }
             }
         }elseif (isset($_POST["get_patch"])) {


More information about the Libreoffice-commits mailing list