Excess whitespace in XML files

From: Date: Mon, 09 Sep 2002 16:10:01 +0000
Subject: Excess whitespace in XML files
Groups: php.doc 
Request: Send a blank email to phpdoc+get-969348536@lists.php.net to get a copy of this message
Hi, while quick look into PDF which I generated, I recognized space character at the start of each paragraph and also extra blank line before and after each program listing. This is not visible in HTML as HTML is very liberal to whitespace and ignores them. Problem is that in XML whitespace is significant. Thus following XML source: <para> Often you need classes with similar variables and functions to another existing class. In fact, it is good practice to ... on a single base class, that is, multiple inheritance is not supported. Classes are extended using the keyword 'extends'. </para> <programlisting role="php"> <![CDATA[ class Named_Cart extends Cart { ... } ]]> </programlisting> should be written as following: <para>Often you need classes with similar variables and functions to another existing class. In fact, it is good practice to ... on a single base class, that is, multiple inheritance is not supported. Classes are extended using the keyword 'extends'.</para> <programlisting role="php"><![CDATA[class Named_Cart extends Cart { ... }]]></programlisting> I don't think that quick reformatting of all source files is necessary, but it might be worth to update guidelines for documentation writing and correct formating when some file is modified. Jirka -- ----------------------------------------------------------------- Jirka Kosek e-mail: jirka@kosek.cz http://www.kosek.cz

« previous php.doc (#969348536) next »