[prev in list] [next in list] [prev in thread] [next in thread] 

List:       pear-doc
Subject:    [PEAR-DOC] cvs: peardoc / check-validity.php
From:       "Christian Weiske" <cweiske () php ! net>
Date:       2007-10-11 19:22:54
Message-ID: cvscweiske1192130574 () cvsserver
[Download RAW message or body]

cweiske		Thu Oct 11 19:22:54 2007 UTC

  Added files:                 
    /peardoc	check-validity.php 
  Log:
  Adding small tool to check manual.xml XML validity before commit
  
  

http://cvs.php.net/viewvc.cgi/peardoc/check-validity.php?view=markup&rev=1.1
Index: peardoc/check-validity.php
+++ peardoc/check-validity.php
<?php
/**
* Checks if the manual.xml file is valid xml.
* Loads the manual.xml file via PHP's DOM functions.
* If that succeeds, the manual is fine and changes can be commmited.
*
* @author Christian Weiske <cweiske@php.net>
*/
$strManualPath = dirname(__FILE__) . '/manual.xml';
if (!file_exists($strManualPath)) {
    echo "manual xml does not exist. Run configure.\n";
    exit(2);
}

chdir(dirname($strManualPath));
$doc                     = new DOMDocument();
$doc->resolveExternals   = true;
$doc->substituteEntities = true;
if ($doc->load($strManualPath)) {
    echo "All fine.\n";
} else {
    echo "Error loading manual xml. Probably broken.\n";
    exit(1);
}
?>

-- 
PEAR Documentation List Mailing List (http://pear.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic