didou Mon Dec 15 11:54:33 2003 EDT
Modified files:
/phpdoc/en/reference/xml reference.xml
/phpdoc/en/reference/xml/functions xml-parse-into-struct.xml
xml-set-object.xml
/phpdoc/en/reference/xslt/functions xslt-process.xml
/phpdoc/en/reference/yaz reference.xml
/phpdoc/en/reference/yaz/functions yaz-ccl-conf.xml
yaz-ccl-parse.xml yaz-scan.xml
/phpdoc/en/reference/zlib reference.xml
/phpdoc/en/reference/zlib/functions gzopen.xml gzread.xml
gzseek.xml
Log:
Merry XHTML and CS compliant christmas all \!
Index: phpdoc/en/reference/xml/reference.xml
diff -u phpdoc/en/reference/xml/reference.xml:1.12
phpdoc/en/reference/xml/reference.xml:1.13
--- phpdoc/en/reference/xml/reference.xml:1.12 Tue Sep 30 04:33:45 2003
+++ phpdoc/en/reference/xml/reference.xml Mon Dec 15 11:54:27 2003
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.12 $ -->
+<!-- $Revision: 1.13 $ -->
<reference id="ref.xml">
<title>XML parser functions</title>
<titleabbrev>XML</titleabbrev>
@@ -285,9 +285,9 @@
function startElement($parser, $name, $attrs) {
global $depth;
for ($i = 0; $i < $depth[$parser]; $i++) {
- print " ";
+ echo " ";
}
- print "$name\n";
+ echo "$name\n";
$depth[$parser]++;
}
@@ -342,19 +342,19 @@
function startElement($parser, $name, $attrs) {
global $map_array;
if ($htmltag == $map_array[$name]) {
- print "<$htmltag>";
+ echo "<$htmltag>";
}
}
function endElement($parser, $name) {
global $map_array;
if ($htmltag == $map_array[$name]) {
- print "</$htmltag>";
+ echo "</$htmltag>";
}
}
function characterData($parser, $data) {
- print $data;
+ echo $data;
}
$xml_parser = xml_parser_create();
@@ -413,22 +413,22 @@
}
function startElement($parser, $name, $attribs) {
- print "<<font color=\"#0000cc\">$name</font>";
+ echo "<<font color=\"#0000cc\">$name</font>";
if (sizeof($attribs)) {
while (list($k, $v) = each($attribs)) {
- print " <font color=\"#009900\">$k</font>=\"<font
+ echo " <font color=\"#009900\">$k</font>=\"<font
color=\"#990000\">$v</font>\"";
}
}
- print ">";
+ echo ">";
}
function endElement($parser, $name) {
- print "</<font color=\"#0000cc\">$name</font>>";
+ echo "</<font color=\"#0000cc\">$name</font>>";
}
function characterData($parser, $data) {
- print "<b>$data</b>";
+ echo "<b>$data</b>";
}
function PIHandler($parser, $target, $data) {
@@ -506,7 +506,7 @@
die("could not open XML input");
}
-print "<pre>";
+echo "<pre>";
while ($data = fread($fp, 4096)) {
if (!xml_parse($xml_parser, $data, feof($fp))) {
die(sprintf("XML error: %s at line %d\n",
@@ -514,8 +514,8 @@
xml_get_current_line_number($xml_parser)));
}
}
-print "</pre>";
-print "parse complete\n";
+echo "</pre>";
+echo "parse complete\n";
xml_parser_free($xml_parser);
?>
@@ -551,7 +551,7 @@
<title>About this Document</title>
<para>
<!-- this is a comment -->
- <?php print 'Hi! This is PHP version '.phpversion(); ?>
+ <?php echo 'Hi! This is PHP version ' . phpversion(); ?>
</para>
</section>
</chapter>
@@ -572,7 +572,7 @@
<foo>
<element attrib="value"/>
&testEnt;
- <?php print "This is some more PHP code being executed."; ?>
+ <?php echo "This is some more PHP code being executed."; ?>
</foo>
]]>
</programlisting>
Index: phpdoc/en/reference/xml/functions/xml-parse-into-struct.xml
diff -u phpdoc/en/reference/xml/functions/xml-parse-into-struct.xml:1.6
phpdoc/en/reference/xml/functions/xml-parse-into-struct.xml:1.7
--- phpdoc/en/reference/xml/functions/xml-parse-into-struct.xml:1.6 Tue Sep 30
04:33:46 2003
+++ phpdoc/en/reference/xml/functions/xml-parse-into-struct.xml Mon Dec 15 11:54:28
2003
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.6 $ -->
+<!-- $Revision: 1.7 $ -->
<!-- splitted from ./en/functions/xml.xml, last change in rev 1.11 -->
<refentry id="function.xml-parse-into-struct">
<refnamediv>
@@ -34,7 +34,7 @@
<?php
$simple = "<para><note>simple note</note></para>";
$p = xml_parser_create();
-xml_parse_into_struct($p,$simple,$vals,$index);
+xml_parse_into_struct($p, $simple, $vals, $index);
xml_parser_free($p);
echo "Index array\n";
print_r($index);
@@ -152,11 +152,11 @@
function readDatabase($filename) {
// read the xml database of aminoacids
- $data = implode("",file($filename));
+ $data = implode("", file($filename));
$parser = xml_parser_create();
- xml_parser_set_option($parser,XML_OPTION_CASE_FOLDING,0);
- xml_parser_set_option($parser,XML_OPTION_SKIP_WHITE,1);
- xml_parse_into_struct($parser,$data,$values,$tags);
+ xml_parser_set_option($parser, XML_OPTION_CASE_FOLDING, 0);
+ xml_parser_set_option($parser, XML_OPTION_SKIP_WHITE, 1);
+ xml_parse_into_struct($parser, $data, $values, $tags);
xml_parser_free($parser);
// loop through the structures
Index: phpdoc/en/reference/xml/functions/xml-set-object.xml
diff -u phpdoc/en/reference/xml/functions/xml-set-object.xml:1.6
phpdoc/en/reference/xml/functions/xml-set-object.xml:1.7
--- phpdoc/en/reference/xml/functions/xml-set-object.xml:1.6 Thu Jan 30 08:48:34
2003
+++ phpdoc/en/reference/xml/functions/xml-set-object.xml Mon Dec 15 11:54:28
2003
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.6 $ -->
+<!-- $Revision: 1.7 $ -->
<!-- splitted from ./en/functions/xml.xml, last change in rev 1.2 -->
<refentry id="function.xml-set-object">
<refnamediv>
@@ -25,8 +25,7 @@
class xml {
var $parser;
- function xml()
- {
+ function xml() {
$this->parser = xml_parser_create();
xml_set_object($this->parser, &$this);
@@ -34,23 +33,19 @@
xml_set_character_data_handler($this->parser, "cdata");
}
- function parse($data)
- {
+ function parse($data) {
xml_parse($this->parser, $data);
}
- function tag_open($parser, $tag, $attributes)
- {
+ function tag_open($parser, $tag, $attributes) {
var_dump($parser, $tag, $attributes);
}
- function cdata($parser, $cdata)
- {
+ function cdata($parser, $cdata) {
var_dump($parser, $cdata);
}
- function tag_close($parser, $tag)
- {
+ function tag_close($parser, $tag) {
var_dump($parser, $tag);
}
Index: phpdoc/en/reference/xslt/functions/xslt-process.xml
diff -u phpdoc/en/reference/xslt/functions/xslt-process.xml:1.6
phpdoc/en/reference/xslt/functions/xslt-process.xml:1.7
--- phpdoc/en/reference/xslt/functions/xslt-process.xml:1.6 Thu Feb 13 09:36:56
2003
+++ phpdoc/en/reference/xslt/functions/xslt-process.xml Mon Dec 15 11:54:29 2003
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.6 $ -->
+<!-- $Revision: 1.7 $ -->
<!-- splitted from ./en/functions/xslt.xml, last change in rev 1.3 -->
<refentry id="function.xslt-process">
<refnamediv>
@@ -61,16 +61,15 @@
// Process the document
if (xslt_process($xh, 'sample.xml', 'sample.xsl', 'result.xml')) {
- print "SUCCESS, sample.xml was transformed by sample.xsl into result.xml";
- print ", result.xml has the following contents\n<br>\n";
- print "<pre>\n";
+ echo "SUCCESS, sample.xml was transformed by sample.xsl into result.xml";
+ echo ", result.xml has the following contents\n<br />\n";
+ echo "<pre>\n";
readfile('result.xml');
- print "</pre>\n";
-}
-else {
- print "Sorry, sample.xml could not be transformed by sample.xsl into";
- print " result.xml the reason is that " . xslt_error($xh) . " and the ";
- print "error code is " . xslt_errno($xh);
+ echo "</pre>\n";
+} else {
+ echo "Sorry, sample.xml could not be transformed by sample.xsl into";
+ echo " result.xml the reason is that " . xslt_error($xh) . " and the ";
+ echo "error code is " . xslt_errno($xh);
}
xslt_free($xh);
@@ -100,16 +99,15 @@
// Process the document, returning the result into the $result variable
$result = xslt_process($xh, 'sample.xml', 'sample.xsl');
if ($result) {
- print "SUCCESS, sample.xml was transformed by sample.xsl into the \$result";
- print " variable, the \$result variable has the following contents\n<br>\n";
- print "<pre>\n";
- print $result;
- print "</pre>\n";
-}
-else {
- print "Sorry, sample.xml could not be transformed by sample.xsl into";
- print " the \$result variable the reason is that " . xslt_error($xh) .
- print " and the error code is " . xslt_errno($xh);
+ echo "SUCCESS, sample.xml was transformed by sample.xsl into the \$result";
+ echo " variable, the \$result variable has the following contents\n<br />\n";
+ echo "<pre>\n";
+ echo $result;
+ echo "</pre>\n";
+} else {
+ echo "Sorry, sample.xml could not be transformed by sample.xsl into";
+ echo " the \$result variable the reason is that " . xslt_error($xh) .
+ echo " and the error code is " . xslt_errno($xh);
}
xslt_free($xh);
@@ -151,16 +149,15 @@
// Process the document
$result = xslt_process($xh, 'arg:/_xml', 'arg:/_xsl', NULL, $arguments);
if ($result) {
- print "SUCCESS, sample.xml was transformed by sample.xsl into the \$result";
- print " variable, the \$result variable has the following contents\n<br>\n";
- print "<pre>\n";
- print $result;
- print "</pre>\n";
-}
-else {
- print "Sorry, sample.xml could not be transformed by sample.xsl into";
- print " the \$result variable the reason is that " . xslt_error($xh) .
- print " and the error code is " . xslt_errno($xh);
+ echo "SUCCESS, sample.xml was transformed by sample.xsl into the \$result";
+ echo " variable, the \$result variable has the following contents\n<br />\n";
+ echo "<pre>\n";
+ echo $result;
+ echo "</pre>\n";
+} else {
+ echo "Sorry, sample.xml could not be transformed by sample.xsl into";
+ echo " the \$result variable the reason is that " . xslt_error($xh) .
+ echo " and the error code is " . xslt_errno($xh);
}
xslt_free($xh);
?>
Index: phpdoc/en/reference/yaz/reference.xml
diff -u phpdoc/en/reference/yaz/reference.xml:1.12
phpdoc/en/reference/yaz/reference.xml:1.13
--- phpdoc/en/reference/yaz/reference.xml:1.12 Sun Dec 14 18:31:23 2003
+++ phpdoc/en/reference/yaz/reference.xml Mon Dec 15 11:54:29 2003
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.12 $ -->
+<!-- $Revision: 1.13 $ -->
<reference id="ref.yaz">
<title>YAZ functions</title>
<titleabbrev>YAZ</titleabbrev>
@@ -64,33 +64,34 @@
<programlisting role="php">
<![CDATA[
<?php
-$num_hosts = count ($host);
+$num_hosts = count($host);
if (empty($term) || count($host) == 0) {
- echo '<form method="GET">
+ echo '<form method="get">
<input type="checkbox"
- name="host[]" value="bagel.indexdata.dk/gils">
+ name="host[]" value="bagel.indexdata.dk/gils" />
GILS test
<input type="checkbox"
- name="host[]" value="localhost:9999/Default">
+ name="host[]" value="localhost:9999/Default" />
local test
<input type="checkbox" checked="1"
- name="host[]" value="z3950.loc.gov:7090/voyager">
+ name="host[]" value="z3950.loc.gov:7090/voyager" />
Library of Congress
- <br>
+ <br />
RPN Query:
- <input type="text" size="30" name="term">
- <input type="submit" name="action" value="Search">
+ <input type="text" size="30" name="term" />
+ <input type="submit" name="action" value="Search" />
+ </form>
';
} else {
- echo 'You searched for ' . htmlspecialchars($term) . '<br>';
+ echo 'You searched for ' . htmlspecialchars($term) . '<br />';
for ($i = 0; $i < $num_hosts; $i++) {
$id[] = yaz_connect($host[$i]);
yaz_range($id[$i], 1, 10);
- yaz_search($id[$i],"rpn",$term);
+ yaz_search($id[$i], "rpn", $term);
}
yaz_wait();
for ($i = 0; $i < $num_hosts; $i++) {
- echo '<hr>' . $host[$i] . ":";
+ echo '<hr />' . $host[$i] . ':';
$error = yaz_error($id[$i]);
if (!empty($error)) {
echo "Error: $error";
@@ -100,7 +101,7 @@
}
echo '<dl>';
for ($p = 1; $p <= 10; $p++) {
- $rec = yaz_record($id[$i],$p,"string");
+ $rec = yaz_record($id[$i], $p, "string");
if (empty($rec)) continue;
echo "<dt><b>$p</b></dt><dd>";
echo nl2br($rec);
Index: phpdoc/en/reference/yaz/functions/yaz-ccl-conf.xml
diff -u phpdoc/en/reference/yaz/functions/yaz-ccl-conf.xml:1.5
phpdoc/en/reference/yaz/functions/yaz-ccl-conf.xml:1.6
--- phpdoc/en/reference/yaz/functions/yaz-ccl-conf.xml:1.5 Sat Aug 16 13:15:07
2003
+++ phpdoc/en/reference/yaz/functions/yaz-ccl-conf.xml Mon Dec 15 11:54:30 2003
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.5 $ -->
+<!-- $Revision: 1.6 $ -->
<!-- splitted from ./en/functions/yaz.xml, last change in rev 1.8 -->
<refentry id="function.yaz-ccl-conf">
<refnamediv>
@@ -41,7 +41,7 @@
$fields["ti"] = "1=4";
$fields["au"] = "1=1";
$fields["isbn"] = "1=7";
-yaz_ccl_conf($id,$fields);
+yaz_ccl_conf($id, $fields);
?>
]]>
</programlisting>
Index: phpdoc/en/reference/yaz/functions/yaz-ccl-parse.xml
diff -u phpdoc/en/reference/yaz/functions/yaz-ccl-parse.xml:1.6
phpdoc/en/reference/yaz/functions/yaz-ccl-parse.xml:1.7
--- phpdoc/en/reference/yaz/functions/yaz-ccl-parse.xml:1.6 Thu Dec 11 10:42:10
2003
+++ phpdoc/en/reference/yaz/functions/yaz-ccl-parse.xml Mon Dec 15 11:54:30 2003
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.6 $ -->
+<!-- $Revision: 1.7 $ -->
<!-- splitted from ./en/functions/yaz.xml, last change in rev 1.1 -->
<refentry id="function.yaz-ccl-parse">
<refnamediv>
@@ -40,12 +40,12 @@
<programlisting role="php">
<![CDATA[
<?php
-yaz_ccl_conf($id,$fields); // see example for yaz_ccl_conf
+yaz_ccl_conf($id, $fields); // see example for yaz_ccl_conf
if (!yaz_ccl_parse($id, $ccl, &$cclresult)) {
echo 'Error: ' . $cclresult["errorstring"];
} else {
$rpn = $cclresult["rpn"];
- yaz_search($id,"rpn",$rpn);
+ yaz_search($id, "rpn", $rpn);
}
?>
]]>
Index: phpdoc/en/reference/yaz/functions/yaz-scan.xml
diff -u phpdoc/en/reference/yaz/functions/yaz-scan.xml:1.6
phpdoc/en/reference/yaz/functions/yaz-scan.xml:1.7
--- phpdoc/en/reference/yaz/functions/yaz-scan.xml:1.6 Tue Sep 30 04:33:47 2003
+++ phpdoc/en/reference/yaz/functions/yaz-scan.xml Mon Dec 15 11:54:30 2003
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.6 $ -->
+<!-- $Revision: 1.7 $ -->
<!-- splitted from ./en/functions/yaz.xml, last change in rev 1.8 -->
<refentry id="function.yaz-scan">
<refnamediv>
@@ -46,25 +46,23 @@
<![CDATA[
<?php
function scan_titles($id, $startterm) {
- yaz_scan($id,"rpn", "@attr 1=4 " . $startterm);
+ yaz_scan($id, "rpn", "@attr 1=4 " . $startterm);
yaz_wait();
$errno = yaz_errno($id);
if ($errno == 0) {
- $ar = yaz_scan_result($id,&$options);
+ $ar = yaz_scan_result($id, &$options);
echo 'Scan ok; ';
- while(list($key,$val)=each($options)) {
+ while (list($key, $val) = each($options)) {
echo "$key = $val ";
}
- echo '<br><table><tr><td>';
- while(list($key,list($k, $term, $tcount))=each($ar)) {
+ echo '<br /><table>';
+ while (list($key, list($k, $term, $tcount)) = each($ar)) {
if (empty($k)) continue;
- echo "<tr><td>$term</td><td>";
- echo $tcount;
- echo "</td></tr>";
+ echo "<tr><td>$term</td><td>$tcount</td></tr>";
}
echo '</table>';
} else {
- echo "Scan failed. Error: " . yaz_error($id) . "<br>";
+ echo "Scan failed. Error: " . yaz_error($id) . "<br />";
}
}
?>
Index: phpdoc/en/reference/zlib/reference.xml
diff -u phpdoc/en/reference/zlib/reference.xml:1.12
phpdoc/en/reference/zlib/reference.xml:1.13
--- phpdoc/en/reference/zlib/reference.xml:1.12 Mon Nov 24 18:37:49 2003
+++ phpdoc/en/reference/zlib/reference.xml Mon Dec 15 11:54:31 2003
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.12 $ -->
+<!-- $Revision: 1.13 $ -->
<reference id="ref.zlib">
<title>Zlib Compression Functions</title>
<titleabbrev>Zlib</titleabbrev>
@@ -67,8 +67,8 @@
<![CDATA[
<?php
-$filename = tempnam ('/tmp', 'zlibtest').'.gz';
-print "<html>\n<head></head>\n<body>\n<pre>\n";
+$filename = tempnam('/tmp', 'zlibtest').'.gz';
+echo "<html>\n<head></head>\n<body>\n<pre>\n";
$s = "Only a test, test, test, test, test, test, test, test!\n";
// open file for writing with maximum compression
@@ -84,20 +84,20 @@
$zp = gzopen($filename, "r");
// read 3 char
-print gzread($zp, 3);
+echo gzread($zp, 3);
// output until end of the file and close it.
gzpassthru($zp);
gzclose($zp);
-print "\n";
+echo "\n";
// open file and print content (the 2nd time).
if (readgzfile($filename) != strlen($s)) {
echo "Error with zlib functions!";
}
unlink($filename);
-print "</pre>\n</h1></body>\n</html>\n";
+echo "</pre>\n</h1></body>\n</html>\n";
?>
]]>
Index: phpdoc/en/reference/zlib/functions/gzopen.xml
diff -u phpdoc/en/reference/zlib/functions/gzopen.xml:1.4
phpdoc/en/reference/zlib/functions/gzopen.xml:1.5
--- phpdoc/en/reference/zlib/functions/gzopen.xml:1.4 Wed Jul 16 13:25:02 2003
+++ phpdoc/en/reference/zlib/functions/gzopen.xml Mon Dec 15 11:54:32 2003
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.4 $ -->
+<!-- $Revision: 1.5 $ -->
<!-- splitted from ./en/functions/zlib.xml, last change in rev 1.2 -->
<refentry id="function.gzopen">
<refnamediv>
@@ -47,7 +47,7 @@
<programlisting role="php">
<![CDATA[
<?php
-$fp = gzopen ("/tmp/file.gz", "r");
+$fp = gzopen("/tmp/file.gz", "r");
?>
]]>
</programlisting>
Index: phpdoc/en/reference/zlib/functions/gzread.xml
diff -u phpdoc/en/reference/zlib/functions/gzread.xml:1.4
phpdoc/en/reference/zlib/functions/gzread.xml:1.5
--- phpdoc/en/reference/zlib/functions/gzread.xml:1.4 Wed Jul 16 13:25:02 2003
+++ phpdoc/en/reference/zlib/functions/gzread.xml Mon Dec 15 11:54:32 2003
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.4 $ -->
+<!-- $Revision: 1.5 $ -->
<!-- splitted from ./en/functions/zlib.xml, last change in rev 1.2 -->
<refentry id="function.gzread">
<refnamediv>
@@ -28,9 +28,9 @@
<?php
// get contents of a gz-file into a string
$filename = "/usr/local/something.txt.gz";
-$zd = gzopen ($filename, "r");
-$contents = gzread ($zd, 10000);
-gzclose ($zd);
+$zd = gzopen($filename, "r");
+$contents = gzread($zd, 10000);
+gzclose($zd);
?>
]]>
</programlisting>
Index: phpdoc/en/reference/zlib/functions/gzseek.xml
diff -u phpdoc/en/reference/zlib/functions/gzseek.xml:1.3
phpdoc/en/reference/zlib/functions/gzseek.xml:1.4
--- phpdoc/en/reference/zlib/functions/gzseek.xml:1.3 Sun Aug 25 12:52:39 2002
+++ phpdoc/en/reference/zlib/functions/gzseek.xml Mon Dec 15 11:54:32 2003
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.3 $ -->
+<!-- $Revision: 1.4 $ -->
<!-- splitted from ./en/functions/zlib.xml, last change in rev 1.2 -->
<refentry id="function.gzseek">
<refnamediv>
@@ -16,7 +16,7 @@
<para>
Sets the file position indicator for the file referenced by zp to
offset bytes into the file stream. Equivalent to calling (in C)
- <literal>gzseek( zp, offset, SEEK_SET )</literal>.
+ <literal>gzseek(zp, offset, SEEK_SET)</literal>.
</para>
<para>
If the file is opened for reading, this function is emulated but