cvs: phpdoc /ja/language types.xml
| From: | Masaki Fujimoto | Date: | Sat, 05 Jan 2002 15:16:28 +0000 |
| Subject: | cvs: phpdoc /ja/language types.xml | ||
| Groups: | php.doc | ||
| Request: | Send a blank email to phpdoc+get-969340767@lists.php.net to get a copy of this message | ||
fujimoto Sat Jan 5 10:16:28 2002 EDT
Modified files:
/phpdoc/ja/language types.xml
Log:
Eliminate tags in CDATA sections (as en did).
Index: phpdoc/ja/language/types.xml diff -u phpdoc/ja/language/types.xml:1.16 phpdoc/ja/language/types.xml:1.17 --- phpdoc/ja/language/types.xml:1.16 Fri Dec 14 11:22:11 2001 +++ phpdoc/ja/language/types.xml Sat Jan 5 10:16:28 2002 @@ -1,4 +1,5 @@ <?xml version="1.0" encoding="utf-8"?> +<!-- $Revision: 1.17 $ --> <chapter id="language.types"> <title>å</title> @@ -163,10 +164,10 @@ <link linkend="control-structures">å¶å¾¡æ§é </link>ã«ãã®çµæã渡 ãã¾ãã <informalexample> - <!-- intentionally omitting CDATA --> <programlisting role="php"> -if ($action == "show_version") // == ã¯ã<type>boolean</type>åãè¿ã - // <link linkend="language.operators">æ¼ç®å</link> +<![CDATA[ +// == ã¯ãbooleanåãè¿ãæ¼ç®å +if ($action == "show_version") { echo "ãã¼ã¸ã§ã³ã¯1.23ã§ãã"; } @@ -174,14 +175,15 @@ // ããã¯åé· if ($show_separators == true) { - echo "<hr>\n"; + echo "<hr>\n"; } // ä¸ã®ä¾ã¯æ¬¡ã®ããã«ç°¡åã«æ¸ããã¨ãã§ãã¾ãã if ($show_separators) { - echo "<hr>\n"; + echo "<hr>\n"; } +]]> </programlisting> </informalexample> </para> @@ -808,22 +810,25 @@ </simpara> <informalexample> - <!-- intentionally omitting CDATA --> <programlisting role="php"> -$fruits = array( 'strawberry' => 'red' , 'banana' => 'yellow' ); -echo "A banana is $fruits[banana]."; // ã·ã³ã°ã«ã¯ãªã¼ãã®å¤ã§ã¯åä½ãç°ãªããã¨ã«æ³¨æãã¦ãã ããã - // <link linkend="language.types.array.foo-bar"><literal>$foo[bar]</literal></link>ãåç §ãã¦ãã ããã -echo "This square is $square->width meters broad."; -echo "This square is $square->width00 centimeters broad."; // åä½ãã¾ããã - // 解決çã«ã¤ãã¦ã¯ã<link linkend="language.types.string.parsing.complex">è¤éãªæ§æ</link>ãåç §ä¸ããã +<![CDATA[ +$fruits = array( 'strawberry' => 'red' , 'banana' => 'yellow' ); + +// ã·ã³ã°ã«ã¯ãªã¼ãã®å¤ã§ã¯åä½ãç°ãªããã¨ã«æ³¨æãã¦ãã ããã +echo "A banana is $fruits[banana]."; + +echo "This square is $square->width meters broad."; +// åä½ãã¾ããã解決çã«ã¤ãã¦ã¯ãè¤éãªæ§æãåç §ä¸ããã +echo "This square is $square->width00 centimeters broad."; + +]]> <!-- XXX this won't work: echo "This square is $square->{width}00 centimeters broad."; // XXX: php developers: it would be consequent to make this work. // XXX: like the $obj->{expr} syntax outside a string works, // XXX: analogously to the ${expr} syntax for variable var's. --> - </programlisting> </informalexample> <simpara> @@ -845,24 +850,28 @@ 以ä¸ã®ããã¤ãã®ä¾ãè¦ãã¨çè§£ãããããªãã§ãããã </simpara> <informalexample> - <!-- intentionally omitting CDATA --> <programlisting role="php"> +<![CDATA[ $great = 'fantastic'; echo "This is { $great}"; // åä½ãã¾ãããåºåã¯ãThis is { fantastic} echo "This is {$great}"; // åä½ãã¾ããåºåã¯ãThis is fantastic -echo "This square is {$square->width}00 centimeters broad."; +echo "This square is {$square->width}00 centimeters broad."; echo "This works: {$arr[4][3]}"; -echo "This is wrong: {$arr[foo][3]}"; // <link linkend="language.types.array.foo-bar">$foo[bar]</link> - // ãæååã®å¤ã§ã¯ä½¿ç¨ã§ããªãã®ã¨åãçç±ã§åä½ããã + +// $foo[bar]ãæååã®å¤ã§ã¯ä½¿ç¨ã§ããªãã®ã¨ +// åãçç±ã§åä½ããã +echo "This is wrong: {$arr[foo][3]}"; + echo "You should do it this way: {$arr['foo'][3]}"; -echo "You can even write {$obj->values[3]->name}"; +echo "You can even write {$obj->values[3]->name}"; echo "This is the value of the var named $name: {${$name}}"; -<!-- <xxx> maybe it's better to leave this out?? +]]> +<!-- maybe it's better to leave this out?? // this works, but i disencourage its use, since this is NOT // involving functions, rather than mere variables, arrays and objects. $beer = 'Heineken'; echo "I'd like to have another {${ strrev('reeb') }}, hips"; - </xxx> --> + --> </programlisting> </informalexample> </sect4> @@ -884,10 +893,10 @@ <example> <title>è¤æ°ã®stringã®ä¾</title> <programlisting role="php"> -<![CDATA[ <!-- TODO: either move these examples to a example section, as with arrays, or distribute them under the applicable sections. --> +<![CDATA[ <?php /* æååã«ä»£å ¥ã */ $str = "This is a string"; @@ -1300,8 +1309,8 @@ // ããããè¡ãé å $map = array( 'version' => 4 , 'OS' => 'Linux' - , 'lang' => 'english' - , 'short_tags' => true + , 'lang' => 'english' + , 'short_tags' => true ); // æ°å¤ãã¼ã®ã¿ãæãã @@ -1323,6 +1332,9 @@ , 0 => 12 // å¤10ã¯12ã§ä¸æ¸ãããã¾ã ); +// empty array +$empty = array(); +]]> <!-- TODO example of - mixed keys - overwriting keys @@ -1330,10 +1342,6 @@ - using vars/functions as key/values - mixed skipping --> - -// empty array -$empty = array(); -]]> </programlisting> </example> @@ -1370,14 +1378,15 @@ <example id="language.types.array.examples.changeloop"> <title>ã³ã¬ã¯ã·ã§ã³</title> <programlisting role="php"> -<link linkend="control-structures.foreach">foreach</link> ( $colors as $key => $color ) { +<![CDATA[ +foreach ( $colors as $key => $color ) { // åä½ããªã: - //$color = <link linkend="function.strtoupper">strtoupper</link>($color); + //$color = strtoupper($color); // åä½ãã: - $colors[$key] = <link linkend="function.strtoupper">strtoupper</link>($color); + $colors[$key] = strtoupper($color); } -<link linkend="function.print-r">print_r</link>($colors); +print_r($colors); /* åºå: Array @@ -1388,6 +1397,7 @@ [3] => YELLOW ) */ +]]> </programlisting> </example> </para> @@ -1396,8 +1406,9 @@ <example> <title>1ããå§ã¾ãæ·»å</title> <programlisting role="php"> +<![CDATA[ $firstquarter = array(1 => 'January', 'February', 'March'); -<link linkend="function.print-r">print_r</link>($firstquarter); +print_r($firstquarter); /* åºå: Array @@ -1406,20 +1417,23 @@ [2] => 'February' [3] => 'March' ) -*/ +*/ +]]> </programlisting> </example> </para> <example> <title>é åã«ä»£å ¥ãã</title> <programlisting role="php"> -// <link linkend="ref.dir">ãã£ã¬ã¯ããª</link>ããå ¨ã¦ã®ã¢ã¤ãã ãé åã«ä»£å ¥ãã -$handle = <link linkend="function.opendir">opendir</link>('.'); -while ($file = <link linkend="function.readdir">readdir</link>($handle)) +<![CDATA[ +// ãã£ã¬ã¯ããªããå ¨ã¦ã®ã¢ã¤ãã ãé åã«ä»£å ¥ãã +$handle = opendir('.'); +while ($file = readdir($handle)) { $files[] = $file; } -<link linkend="function.closedir">closedir</link>($handle); +closedir($handle); +]]> </programlisting> </example> <para> @@ -1430,8 +1444,10 @@ <example> <title>é åã®ã½ã¼ã</title> <programlisting role="php"> -<link linkend="function.sort">sort</link>($files); -<link linkend="function.print-r">print_r</link>($files); +<![CDATA[ +sort($files); +print_r($files); +]]> </programlisting> </example> <para> @@ -1441,23 +1457,24 @@ <example> <title>å帰ããã³å¤æ¬¡å é å</title> <programlisting role="php"> -$fruits = array ( "fruits" => array ( "a" => "orange" - , "b" => "banana" - , "c" => "apple" +<![CDATA[ +$fruits = array ( "fruits" => array ( "a" => "orange" + , "b" => "banana" + , "c" => "apple" ) - , "numbers" => array ( 1 + , "numbers" => array ( 1 , 2 , 3 , 4 , 5 , 6 ) - , "holes" => array ( "first" - , 5 => "second" + , "holes" => array ( "first" + , 5 => "second" , "third" ) ); - +]]> <!-- quite duplicate... $a = array( "apple" => array( @@ -1677,7 +1694,8 @@ <informalexample> <programlisting role="php"> -<?php +<![CDATA[ +<?php class foo { function do_foo() @@ -1689,6 +1707,7 @@ $bar = new foo; $bar -> do_foo (); ?> +]]> </programlisting> </informalexample> </para>
Index: phpdoc/ja/language/types.xml diff -u phpdoc/ja/language/types.xml:1.16 phpdoc/ja/language/types.xml:1.17 --- phpdoc/ja/language/types.xml:1.16 Fri Dec 14 11:22:11 2001 +++ phpdoc/ja/language/types.xml Sat Jan 5 10:16:28 2002 @@ -1,4 +1,5 @@ <?xml version="1.0" encoding="utf-8"?> +<!-- $Revision: 1.17 $ --> <chapter id="language.types"> <title>å</title> @@ -163,10 +164,10 @@ <link linkend="control-structures">å¶å¾¡æ§é </link>ã«ãã®çµæã渡 ãã¾ãã <informalexample> - <!-- intentionally omitting CDATA --> <programlisting role="php"> -if ($action == "show_version") // == ã¯ã<type>boolean</type>åãè¿ã - // <link linkend="language.operators">æ¼ç®å</link> +<![CDATA[ +// == ã¯ãbooleanåãè¿ãæ¼ç®å +if ($action == "show_version") { echo "ãã¼ã¸ã§ã³ã¯1.23ã§ãã"; } @@ -174,14 +175,15 @@ // ããã¯åé· if ($show_separators == true) { - echo "<hr>\n"; + echo "<hr>\n"; } // ä¸ã®ä¾ã¯æ¬¡ã®ããã«ç°¡åã«æ¸ããã¨ãã§ãã¾ãã if ($show_separators) { - echo "<hr>\n"; + echo "<hr>\n"; } +]]> </programlisting> </informalexample> </para> @@ -808,22 +810,25 @@ </simpara> <informalexample> - <!-- intentionally omitting CDATA --> <programlisting role="php"> -$fruits = array( 'strawberry' => 'red' , 'banana' => 'yellow' ); -echo "A banana is $fruits[banana]."; // ã·ã³ã°ã«ã¯ãªã¼ãã®å¤ã§ã¯åä½ãç°ãªããã¨ã«æ³¨æãã¦ãã ããã - // <link linkend="language.types.array.foo-bar"><literal>$foo[bar]</literal></link>ãåç §ãã¦ãã ããã -echo "This square is $square->width meters broad."; -echo "This square is $square->width00 centimeters broad."; // åä½ãã¾ããã - // 解決çã«ã¤ãã¦ã¯ã<link linkend="language.types.string.parsing.complex">è¤éãªæ§æ</link>ãåç §ä¸ããã +<![CDATA[ +$fruits = array( 'strawberry' => 'red' , 'banana' => 'yellow' ); + +// ã·ã³ã°ã«ã¯ãªã¼ãã®å¤ã§ã¯åä½ãç°ãªããã¨ã«æ³¨æãã¦ãã ããã +echo "A banana is $fruits[banana]."; + +echo "This square is $square->width meters broad."; +// åä½ãã¾ããã解決çã«ã¤ãã¦ã¯ãè¤éãªæ§æãåç §ä¸ããã +echo "This square is $square->width00 centimeters broad."; + +]]> <!-- XXX this won't work: echo "This square is $square->{width}00 centimeters broad."; // XXX: php developers: it would be consequent to make this work. // XXX: like the $obj->{expr} syntax outside a string works, // XXX: analogously to the ${expr} syntax for variable var's. --> - </programlisting> </informalexample> <simpara> @@ -845,24 +850,28 @@ 以ä¸ã®ããã¤ãã®ä¾ãè¦ãã¨çè§£ãããããªãã§ãããã </simpara> <informalexample> - <!-- intentionally omitting CDATA --> <programlisting role="php"> +<![CDATA[ $great = 'fantastic'; echo "This is { $great}"; // åä½ãã¾ãããåºåã¯ãThis is { fantastic} echo "This is {$great}"; // åä½ãã¾ããåºåã¯ãThis is fantastic -echo "This square is {$square->width}00 centimeters broad."; +echo "This square is {$square->width}00 centimeters broad."; echo "This works: {$arr[4][3]}"; -echo "This is wrong: {$arr[foo][3]}"; // <link linkend="language.types.array.foo-bar">$foo[bar]</link> - // ãæååã®å¤ã§ã¯ä½¿ç¨ã§ããªãã®ã¨åãçç±ã§åä½ããã + +// $foo[bar]ãæååã®å¤ã§ã¯ä½¿ç¨ã§ããªãã®ã¨ +// åãçç±ã§åä½ããã +echo "This is wrong: {$arr[foo][3]}"; + echo "You should do it this way: {$arr['foo'][3]}"; -echo "You can even write {$obj->values[3]->name}"; +echo "You can even write {$obj->values[3]->name}"; echo "This is the value of the var named $name: {${$name}}"; -<!-- <xxx> maybe it's better to leave this out?? +]]> +<!-- maybe it's better to leave this out?? // this works, but i disencourage its use, since this is NOT // involving functions, rather than mere variables, arrays and objects. $beer = 'Heineken'; echo "I'd like to have another {${ strrev('reeb') }}, hips"; - </xxx> --> + --> </programlisting> </informalexample> </sect4> @@ -884,10 +893,10 @@ <example> <title>è¤æ°ã®stringã®ä¾</title> <programlisting role="php"> -<![CDATA[ <!-- TODO: either move these examples to a example section, as with arrays, or distribute them under the applicable sections. --> +<![CDATA[ <?php /* æååã«ä»£å ¥ã */ $str = "This is a string"; @@ -1300,8 +1309,8 @@ // ããããè¡ãé å $map = array( 'version' => 4 , 'OS' => 'Linux' - , 'lang' => 'english' - , 'short_tags' => true + , 'lang' => 'english' + , 'short_tags' => true ); // æ°å¤ãã¼ã®ã¿ãæãã @@ -1323,6 +1332,9 @@ , 0 => 12 // å¤10ã¯12ã§ä¸æ¸ãããã¾ã ); +// empty array +$empty = array(); +]]> <!-- TODO example of - mixed keys - overwriting keys @@ -1330,10 +1342,6 @@ - using vars/functions as key/values - mixed skipping --> - -// empty array -$empty = array(); -]]> </programlisting> </example> @@ -1370,14 +1378,15 @@ <example id="language.types.array.examples.changeloop"> <title>ã³ã¬ã¯ã·ã§ã³</title> <programlisting role="php"> -<link linkend="control-structures.foreach">foreach</link> ( $colors as $key => $color ) { +<![CDATA[ +foreach ( $colors as $key => $color ) { // åä½ããªã: - //$color = <link linkend="function.strtoupper">strtoupper</link>($color); + //$color = strtoupper($color); // åä½ãã: - $colors[$key] = <link linkend="function.strtoupper">strtoupper</link>($color); + $colors[$key] = strtoupper($color); } -<link linkend="function.print-r">print_r</link>($colors); +print_r($colors); /* åºå: Array @@ -1388,6 +1397,7 @@ [3] => YELLOW ) */ +]]> </programlisting> </example> </para> @@ -1396,8 +1406,9 @@ <example> <title>1ããå§ã¾ãæ·»å</title> <programlisting role="php"> +<![CDATA[ $firstquarter = array(1 => 'January', 'February', 'March'); -<link linkend="function.print-r">print_r</link>($firstquarter); +print_r($firstquarter); /* åºå: Array @@ -1406,20 +1417,23 @@ [2] => 'February' [3] => 'March' ) -*/ +*/ +]]> </programlisting> </example> </para> <example> <title>é åã«ä»£å ¥ãã</title> <programlisting role="php"> -// <link linkend="ref.dir">ãã£ã¬ã¯ããª</link>ããå ¨ã¦ã®ã¢ã¤ãã ãé åã«ä»£å ¥ãã -$handle = <link linkend="function.opendir">opendir</link>('.'); -while ($file = <link linkend="function.readdir">readdir</link>($handle)) +<![CDATA[ +// ãã£ã¬ã¯ããªããå ¨ã¦ã®ã¢ã¤ãã ãé åã«ä»£å ¥ãã +$handle = opendir('.'); +while ($file = readdir($handle)) { $files[] = $file; } -<link linkend="function.closedir">closedir</link>($handle); +closedir($handle); +]]> </programlisting> </example> <para> @@ -1430,8 +1444,10 @@ <example> <title>é åã®ã½ã¼ã</title> <programlisting role="php"> -<link linkend="function.sort">sort</link>($files); -<link linkend="function.print-r">print_r</link>($files); +<![CDATA[ +sort($files); +print_r($files); +]]> </programlisting> </example> <para> @@ -1441,23 +1457,24 @@ <example> <title>å帰ããã³å¤æ¬¡å é å</title> <programlisting role="php"> -$fruits = array ( "fruits" => array ( "a" => "orange" - , "b" => "banana" - , "c" => "apple" +<![CDATA[ +$fruits = array ( "fruits" => array ( "a" => "orange" + , "b" => "banana" + , "c" => "apple" ) - , "numbers" => array ( 1 + , "numbers" => array ( 1 , 2 , 3 , 4 , 5 , 6 ) - , "holes" => array ( "first" - , 5 => "second" + , "holes" => array ( "first" + , 5 => "second" , "third" ) ); - +]]> <!-- quite duplicate... $a = array( "apple" => array( @@ -1677,7 +1694,8 @@ <informalexample> <programlisting role="php"> -<?php +<![CDATA[ +<?php class foo { function do_foo() @@ -1689,6 +1707,7 @@ $bar = new foo; $bar -> do_foo (); ?> +]]> </programlisting> </informalexample> </para>