vrana Wed Jul 21 03:41:32 2004 EDT
Modified files: /phpdoc/howto working.xml Log: Removed 'Use CDATA here, see the bottom of this page' http://cvs.php.net/diff.php/phpdoc/howto/working.xml?r1=1.40&r2=1.41&ty=u Index: phpdoc/howto/working.xml diff -u phpdoc/howto/working.xml:1.40 phpdoc/howto/working.xml:1.41 --- phpdoc/howto/working.xml:1.40 Sat Jun 26 11:55:27 2004 +++ phpdoc/howto/working.xml Wed Jul 21 03:41:32 2004 @@ -517,42 +517,41 @@ <example> <title>Function reference entry</title> <programlisting> -<![CDATA[ - <refentry id="function."> - <refnamediv> - <refname></refname> - <refpurpose></refpurpose> - </refnamediv> - <refsect1> - <title>Description</title> - <methodsynopsis> - <type>RETURNTYPE</type> <methodname>FUNCTIONNAME</methodname> - <methodparam><type>ARGTYPE1</type> <parameter>ARGNAME1</parameter></methodparam> - <methodparam><type>ARGTYPE2</type> <parameter>ARGNAME2</parameter></methodparam> - <!-- optional parameter --> - <methodparam choice='opt'> - <type>ARGTYPE3</type> <parameter>ARGNAME3</parameter> - </methodparam> - <!-- optional parameter with default value, choice='opt' is default in this case --> - <methodparam> - <type>ARGTYPE3</type> - <parameter>ARGNAME3</parameter> - <initializer>default-value</initializter> - </methodparam> - <!-- use <void /> if you have no parameters at all --> - </methodsynopsis> - <simpara> + <refentry id="function."> + <refnamediv> + <refname></refname> + <refpurpose></refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <methodsynopsis> + <type>RETURNTYPE</type> <methodname>FUNCTIONNAME</methodname> + <methodparam><type>ARGTYPE1</type> <parameter>ARGNAME1</parameter></methodparam> + <methodparam><type>ARGTYPE2</type> <parameter>ARGNAME2</parameter></methodparam> + <!-- optional parameter --> + <methodparam choice='opt'> + <type>ARGTYPE3</type> <parameter>ARGNAME3</parameter> + </methodparam> + <!-- optional parameter with default value, choice='opt' is default in this case --> + <methodparam> + <type>ARGTYPE3</type> + <parameter>ARGNAME3</parameter> + <initializer>default-value</initializter> + </methodparam> + <!-- use <void /> if you have no parameters at all --> + </methodsynopsis> + <simpara> A simple paragraph that can not contain anything that requires fancy layout. - </simpara> - <para> + </simpara> + <para> A normal paragraph that can contain lots of stuff. For example - <example> - <title>Code examples</title> - <programlisting role="php"> -// Use CDATA here, see the bottom of this page + <example> + <title>Code examples</title> + <programlisting role="php"> +<![CDATA[ -/* Use a role="php" only for PHP codes. See <screen> +/* Use a role="php" only for PHP codes. See <screen> * and other DocBook elements to express other * types of listings. Use other role attributes for * other type of programlistings, like: sql, httpd, ini, @@ -580,66 +579,59 @@ echo "No foo, no bar"; } -// Include end of CDATA, if you started with CDATA, see below - </programlisting> - </example> +]]> + </programlisting> + </example> The text in a paragraph may continue after the example as well. Here is how to make lists: - <itemizedlist> - <listitem> - <simpara> + <itemizedlist> + <listitem> + <simpara> List items must contain a container element such as simpara or para (there are plenty of others too, see the DocBook reference for the listitem element). - </simpara> - </listitem> + </simpara> + </listitem> - <listitem> - <simpara> + <listitem> + <simpara> List items must contain simple paragraphs or paragraphs. - </simpara> - </listitem> - </itemizedlist> + </simpara> + </listitem> + </itemizedlist> - <itemizedlist> - <listitem> - <para> + <itemizedlist> + <listitem> + <para> If you plan on making sub-lists, you must use para - <orderedlist> - <listitem><simpara> first list item</simpara></listitem> - <listitem><simpara> second list item</simpara></listitem> - </orderedlist> + <orderedlist> + <listitem><simpara> first list item</simpara></listitem> + <listitem><simpara> second list item</simpara></listitem> + </orderedlist> You can also continue an ordered list you just left off - <orderedlist> - <listitem><simpara> third list item</simpara></listitem> - <listitem><simpara> fourth list item</simpara></listitem> - </orderedlist> - </para> - </listitem> - </itemizedlist> + <orderedlist> + <listitem><simpara> third list item</simpara></listitem> + <listitem><simpara> fourth list item</simpara></listitem> + </orderedlist> + </para> + </listitem> + </itemizedlist> - </para> - <simpara> + </para> + <simpara> The documentation for a function should be wrapped up with a "See also" list like this: - </simpara> - <simpara> - See also <function>stripslashes</function> and - <function>quotemeta</function>. - </simpara> - </refsect1> - </refentry> -]]> + </simpara> + <simpara> + See also <function>stripslashes</function> and + <function>quotemeta</function>. + </simpara> + </refsect1> + </refentry> </programlisting> </example> - </para> - <para> - For technical reasons, the CDATA start tag: <literal><![CDATA[</literal> - and the CDATA end tag: <literal>]]></literal> is not included - in the listing above, just the place of them are marked. Use these - tags to be able to write clearer example codes. </para> <para> For parts we have no skeleton here, please look at existing files in the