Date: 07/31/02
- Next message: Taniel Franklin: "[PHP-DOC] New member"
- Previous message: Gabor Hojtsy: "Re: [PHP-DOC] cvs: phpdoc /en/reference/domxml/functions DomXsltStylesheet-process.xml domxml-xslt-stylesheet-doc.xml domxml-xslt-stylesheet-file.xml domxml-xslt-stylesheet.xml"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
goba Wed Jul 31 10:14:28 2002 EDT
Modified files:
/phpdoc/scripts missing-entities.php.in
Log:
So error corrections after some testing:
- change directory to working directory
- windows uses \ instead of / in path :((
- sort does not return an array (unlike other array functions, huh)
- maybe other simple modifications
Index: phpdoc/scripts/missing-entities.php.in
diff -u phpdoc/scripts/missing-entities.php.in:1.1 phpdoc/scripts/missing-entities.php.in:1.2
--- phpdoc/scripts/missing-entities.php.in:1.1 Wed Jul 31 08:14:14 2002
+++ phpdoc/scripts/missing-entities.php.in Wed Jul 31 10:14:27 2002
@@ -17,14 +17,25 @@
# | Gabor Hojtsy <goba <email protected>> |
# +----------------------------------------------------------------------+
#
-# $Id: missing-entities.php.in,v 1.1 2002/07/31 12:14:14 goba Exp $
+# $Id: missing-entities.php.in,v 1.2 2002/07/31 14:14:27 goba Exp $
*/
+// If we are in a scripts dir, go one dir up
+// (because the NSGMLS path is relative to that directory!)
+$wrkdir = getcwd();
+if (strpos($wrkdir, "scripts") !== FALSE) {
+ chdir("..");
+}
+
+// Support for Windows systems
+$NSGMLS = str_replace("/", "\\", " <email protected>@");
+
// Execute a test of the manual
exec(
- " <email protected>@ <email protected>@ -i lang- <email protected>@ -D . " .
+ " <email protected>@ $NSGMLS -i lang- <email protected>@ -D . " .
"-s <email protected>@/dtds/dbxml-4.1.2/phpdocxml.dcl manual.xml 2>&1",
- $results
+ $results,
+ $retcode
);
// Try to open files for rewriting
@@ -55,9 +66,7 @@
// missing ID found
else if (strpos($line, "non-existent") !== FALSE) {
- $line = preg_replace('!^.* ID !g', ' <para id=', $line);
- $line = preg_replace('!$!g', '></para>', $line);
- $missing_ids[] = $line;
+ $missing_ids[] = preg_replace("!^.* ID !", " <para id=", $line) . "></para>\n";
}
}
@@ -66,8 +75,8 @@
$missing_entities = array_unique($missing_entities);
// Sort elements (just to make handwork easier, if needed)
-$missing_ids = sort($missing_ids);
-$missing_entities = sort($missing_entities);
+sort($missing_ids);
+sort($missing_entities);
// Write out missing entities to file
foreach ($missing_entities as $ent) {
-- PHP Documentation Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
- Next message: Taniel Franklin: "[PHP-DOC] New member"
- Previous message: Gabor Hojtsy: "Re: [PHP-DOC] cvs: phpdoc /en/reference/domxml/functions DomXsltStylesheet-process.xml domxml-xslt-stylesheet-doc.xml domxml-xslt-stylesheet-file.xml domxml-xslt-stylesheet.xml"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

