Ver código fonte

[MANUAL] English:

- fixed all programlistings (they are not allowed within <para>)

git-svn-id: http://framework.zend.com/svn/framework/standard/trunk@21829 44c647ce-9c0f-0410-b52a-842ac1e357ba
thomas 15 anos atrás
pai
commit
e3cbbb01a8
53 arquivos alterados com 456 adições e 368 exclusões
  1. 1 0
      documentation/manual/en/module_specs/Zend_Auth_Adapter_DbTable.xml
  2. 2 0
      documentation/manual/en/module_specs/Zend_Date-Additional.xml
  3. 2 0
      documentation/manual/en/module_specs/Zend_Db_Statement.xml
  4. 1 1
      documentation/manual/en/module_specs/Zend_Db_Table.xml
  5. 6 6
      documentation/manual/en/module_specs/Zend_Filter.xml
  6. 9 7
      documentation/manual/en/module_specs/Zend_Filter_Input.xml
  7. 1 1
      documentation/manual/en/module_specs/Zend_Form-Forms.xml
  8. 1 1
      documentation/manual/en/module_specs/Zend_Form-QuickStart.xml
  9. 6 2
      documentation/manual/en/module_specs/Zend_Gdata_Gbase.xml
  10. 1 0
      documentation/manual/en/module_specs/Zend_Http_Client-Advanced.xml
  11. 18 10
      documentation/manual/en/module_specs/Zend_Ldap-API-Ldap-Dn.xml
  12. 2 1
      documentation/manual/en/module_specs/Zend_Ldap-Node.xml
  13. 5 3
      documentation/manual/en/module_specs/Zend_Log-Filters.xml
  14. 13 11
      documentation/manual/en/module_specs/Zend_Log-Formatters.xml
  15. 26 10
      documentation/manual/en/module_specs/Zend_Log-Overview.xml
  16. 17 11
      documentation/manual/en/module_specs/Zend_Log-Writers.xml
  17. 14 12
      documentation/manual/en/module_specs/Zend_Memory-MemoryManager.xml
  18. 12 12
      documentation/manual/en/module_specs/Zend_Memory-MemoryObjects.xml
  19. 2 2
      documentation/manual/en/module_specs/Zend_Memory-Overview.xml
  20. 4 4
      documentation/manual/en/module_specs/Zend_Navigation-Pages-Factory.xml
  21. 10 30
      documentation/manual/en/module_specs/Zend_Paginator-Advanced.xml
  22. 6 7
      documentation/manual/en/module_specs/Zend_Pdf-Drawing.xml
  23. 2 2
      documentation/manual/en/module_specs/Zend_Pdf-InteractiveFeatures.xml
  24. 4 4
      documentation/manual/en/module_specs/Zend_Pdf-Properties.xml
  25. 4 4
      documentation/manual/en/module_specs/Zend_Search_Lucene-Advanced.xml
  26. 21 15
      documentation/manual/en/module_specs/Zend_Search_Lucene-BestPractice.xml
  27. 8 8
      documentation/manual/en/module_specs/Zend_Search_Lucene-Charset.xml
  28. 7 4
      documentation/manual/en/module_specs/Zend_Search_Lucene-Extending.xml
  29. 22 22
      documentation/manual/en/module_specs/Zend_Search_Lucene-Overview.xml
  30. 44 37
      documentation/manual/en/module_specs/Zend_Search_Lucene-Queries.xml
  31. 55 34
      documentation/manual/en/module_specs/Zend_Search_Lucene-QueryLanguage.xml
  32. 27 21
      documentation/manual/en/module_specs/Zend_Search_Lucene-Searching.xml
  33. 4 3
      documentation/manual/en/module_specs/Zend_Service_StrikeIron-AdvancedUses.xml
  34. 6 6
      documentation/manual/en/module_specs/Zend_Service_StrikeIron-BundledServices.xml
  35. 12 7
      documentation/manual/en/module_specs/Zend_Service_StrikeIron-Overview.xml
  36. 2 0
      documentation/manual/en/module_specs/Zend_Service_Twitter.xml
  37. 3 2
      documentation/manual/en/module_specs/Zend_Session-AdvancedUsage.xml
  38. 3 1
      documentation/manual/en/module_specs/Zend_Session-BasicUsage.xml
  39. 8 12
      documentation/manual/en/module_specs/Zend_Soap_AutoDiscovery.xml
  40. 4 4
      documentation/manual/en/module_specs/Zend_Soap_Client.xml
  41. 19 19
      documentation/manual/en/module_specs/Zend_Soap_Server.xml
  42. 2 2
      documentation/manual/en/module_specs/Zend_Soap_Wsdl.xml
  43. 3 2
      documentation/manual/en/module_specs/Zend_Tool-Extending.xml
  44. 0 1
      documentation/manual/en/module_specs/Zend_Tool-Usage-CLI.xml
  45. 3 2
      documentation/manual/en/module_specs/Zend_Tool_Framework-CliTool.xml
  46. 1 1
      documentation/manual/en/module_specs/Zend_Tool_Framework-WritingProviders.xml
  47. 13 4
      documentation/manual/en/module_specs/Zend_Translate-Using.xml
  48. 2 2
      documentation/manual/en/module_specs/Zend_Validate-PostCode.xml
  49. 5 3
      documentation/manual/en/module_specs/Zend_Validate-ValidatorChains.xml
  50. 11 13
      documentation/manual/en/module_specs/Zend_Validate.xml
  51. 1 0
      documentation/manual/en/module_specs/Zend_View-Helpers-HeadScript.xml
  52. 1 1
      documentation/manual/en/module_specs/Zend_View-Introduction.xml
  53. 0 1
      documentation/manual/en/tutorials/form-decorators-composite.xml

+ 1 - 0
documentation/manual/en/module_specs/Zend_Auth_Adapter_DbTable.xml

@@ -301,6 +301,7 @@ for ($i = 0; $i < 50; $i++) {
         <para>
             And now let's build the adapter:
         </para>
+
         <programlisting language="php"><![CDATA[
 $adapter = new Zend_Auth_Adapter_DbTable(
     $db,

+ 2 - 0
documentation/manual/en/module_specs/Zend_Date-Additional.xml

@@ -109,6 +109,7 @@ if (Zend_Date::isDate($date,'dd MMMM yyyy', 'en')) {
 
         <example id="zend.date.additional.sunrise-sunset.example-1">
             <title>Getting all Available Cities</title>
+
             <programlisting language="php"><![CDATA[
 // Output the complete list of available cities
 print_r (Zend_Date_Cities::getCityList());
@@ -180,6 +181,7 @@ print_r (Zend_Date_Cities::getCityList());
 
         <example id="zend.date.additional.sunrise-sunset.example-2">
             <title>Getting the Location for a City</title>
+
             <programlisting language="php"><![CDATA[
 // Get the location for a defined city
 // uses the effective horizon as no horizon is defined

+ 2 - 0
documentation/manual/en/module_specs/Zend_Db_Statement.xml

@@ -354,6 +354,7 @@ echo $obj->bug_description;
 
         <example id="zend.db.statement.binding-param.example">
             <title>Binding parameters from PHP variables</title>
+
             <programlisting language="php"><![CDATA[
 ]]></programlisting>
         </example>
@@ -377,6 +378,7 @@ echo $obj->bug_description;
 
         <example id="zend.db.statement.binding-column.example">
             <title>Binding results to PHP variables</title>
+
             <programlisting language="php"><![CDATA[
 ]]></programlisting>
         </example>

+ 1 - 1
documentation/manual/en/module_specs/Zend_Db_Table.xml

@@ -34,7 +34,7 @@
         <example id="zend.db.table.defining.concrete-instantiation.example1">
             <title>Declaring a table class with just the string name</title>
 
-                <programlisting language="php"><![CDATA[
+            <programlisting language="php"><![CDATA[
 Zend_Db_Table::setDefaultAdapter($dbAdapter);
 $bugTable = new Zend_Db_Table('bug');
 ]]></programlisting>

+ 6 - 6
documentation/manual/en/module_specs/Zend_Filter.xml

@@ -58,14 +58,14 @@
             Following is a basic example of using a filter upon two input data,
             the ampersand (<emphasis>&amp;</emphasis>) and double quote
             (<emphasis>&quot;</emphasis>) characters:
+        </para>
 
-            <programlisting language="php"><![CDATA[
+        <programlisting language="php"><![CDATA[
 $htmlEntities = new Zend_Filter_HtmlEntities();
 
 echo $htmlEntities->filter('&'); // &amp;
 echo $htmlEntities->filter('"'); // &quot;
 ]]></programlisting>
-        </para>
     </sect2>
 
     <sect2 id="zend.filter.introduction.static">
@@ -82,22 +82,22 @@ echo $htmlEntities->filter('"'); // &quot;
             <methodname>staticFilter()</methodname> method automatically loads the class, creates
             an instance, and applies the <methodname>filter()</methodname> method to the data
             input.
+        </para>
 
-            <programlisting language="php"><![CDATA[
+        <programlisting language="php"><![CDATA[
 echo Zend_Filter::filterStatic('&', 'HtmlEntities');
 ]]></programlisting>
-        </para>
 
         <para>
             You can also pass an array of constructor arguments, if they
             are needed for the filter class.
+        </para>
 
-            <programlisting language="php"><![CDATA[
+        <programlisting language="php"><![CDATA[
 echo Zend_Filter::filterStatic('"',
                                'HtmlEntities',
                                array('quotestyle' => ENT_QUOTES));
 ]]></programlisting>
-        </para>
 
         <para>
             The static usage can be convenient for invoking a filter ad hoc,

+ 9 - 7
documentation/manual/en/module_specs/Zend_Filter_Input.xml

@@ -137,12 +137,13 @@ $validators = array(
             <listitem>
                 <para>
                     A single string scalar, which is mapped to a class name.
-                    <programlisting language="php"><![CDATA[
+                </para>
+
+                <programlisting language="php"><![CDATA[
 $validators = array(
     'month'   => 'Digits',
 );
 ]]></programlisting>
-                </para>
             </listitem>
 
             <listitem>
@@ -150,14 +151,15 @@ $validators = array(
                     An object instance of one of the classes that implement
                     <classname>Zend_Filter_Interface</classname> or
                     <classname>Zend_Validate_Interface</classname>.
-                    <programlisting language="php"><![CDATA[
+                </para>
+
+                <programlisting language="php"><![CDATA[
 $digits = new Zend_Validate_Digits();
 
 $validators = array(
     'month'   => $digits
 );
 ]]></programlisting>
-                </para>
             </listitem>
 
             <listitem>
@@ -168,8 +170,9 @@ $validators = array(
                     described above. In addition, you can use a third choice:
                     an array containing a string mapping to the class name
                     followed by arguments to pass to its constructor.
+                </para>
 
-                    <programlisting language="php"><![CDATA[
+                <programlisting language="php"><![CDATA[
 $validators = array(
     'month'   => array(
         'Digits',                // string
@@ -178,7 +181,6 @@ $validators = array(
     )
 );
 ]]></programlisting>
-                </para>
             </listitem>
         </itemizedlist>
 
@@ -468,7 +470,7 @@ $m = $input->getUnescaped('month'); // not escaped
                     fields.
                 </para>
 
-            <programlisting language="php"><![CDATA[
+                <programlisting language="php"><![CDATA[
 $validators = array('*' => array());
 
 $input = new Zend_Filter_Input($filters, $validators, $data, $options);

+ 1 - 1
documentation/manual/en/module_specs/Zend_Form-Forms.xml

@@ -473,7 +473,7 @@ $form->setElementDecorators(
                     elements; a common case is to <methodname>trim()</methodname> all values:
                 </para>
 
-        <programlisting language="php"><![CDATA[
+                <programlisting language="php"><![CDATA[
 $form->setElementFilters(array('StringTrim'));
 ]]></programlisting>
             </example>

+ 1 - 1
documentation/manual/en/module_specs/Zend_Form-QuickStart.xml

@@ -525,7 +525,7 @@ class UserController extends Zend_Controller_Action
             And a view script for displaying the form:
         </para>
 
-<programlisting language="php"><![CDATA[
+        <programlisting language="php"><![CDATA[
 <h2>Please login:</h2>
 <?php echo $this->form ?>
 ]]></programlisting>

+ 6 - 2
documentation/manual/en/module_specs/Zend_Gdata_Gbase.xml

@@ -226,8 +226,12 @@ session_start();
 // to the AuthSub server if necessary.
 $service = new Zend_Gdata_Gbase(getAuthSubHttpClient());
 ]]></programlisting>
-<para>Finally, an unauthenticated server can be created for use with snippets feeds:</para>
-<programlisting language="php"><![CDATA[
+
+            <para>
+                Finally, an unauthenticated server can be created for use with snippets feeds:
+            </para>
+
+            <programlisting language="php"><![CDATA[
 // Create an instance of the Base service using an unauthenticated HTTP client
 $service = new Zend_Gdata_Gbase();
 ]]></programlisting>

+ 1 - 0
documentation/manual/en/module_specs/Zend_Http_Client-Advanced.xml

@@ -181,6 +181,7 @@ $client->setHeaders(array(
             type will be application/octet-stream.
             <example id="zend.http.client.file_uploads.example-1">
                 <title>Using setFileUpload to Upload Files</title>
+
                 <programlisting language="php"><![CDATA[
 // Uploading arbitrary data as a file
 $text = 'this is some plain text';

+ 18 - 10
documentation/manual/en/module_specs/Zend_Ldap-API-Ldap-Dn.xml

@@ -260,10 +260,12 @@
                     </entry>
 
                     <entry>
-                        Explodes the DN <varname>$dn</varname> into an array containing
-                        all parts of the given DN. <varname>$keys</varname> optinally receive DN
-                        keys (e.g. CN, OU, DC, ...). <varname>$vals</varname> optionally receive
-                        DN values. The resulting array will be of type
+                        <para>
+                            Explodes the DN <varname>$dn</varname> into an array containing
+                            all parts of the given DN. <varname>$keys</varname> optinally receive DN
+                            keys (e.g. CN, OU, DC, ...). <varname>$vals</varname> optionally receive
+                            DN values. The resulting array will be of type
+                        </para>
 
                         <programlisting language="php"><![CDATA[
 array(
@@ -272,7 +274,11 @@ array("cn" => "name2"),
 array("dc" => "example"),
 array("dc" => "org")
 )
-]]></programlisting>for a DN of <code>cn=name1+uid=user,cn=name2,dc=example,dc=org</code>.
+]]></programlisting>
+
+                        <para>
+                            for a DN of <code>cn=name1+uid=user,cn=name2,dc=example,dc=org</code>.
+                        </para>
                     </entry>
                 </row>
 
@@ -311,11 +317,13 @@ array("dc" => "org")
                     </entry>
 
                     <entry>
-                        Implodes an array in the form delivered by
-                        <methodname>Zend_Ldap_Dn::explodeDn()</methodname> to a DN string.
-                        <varname>$separator</varname> defaults to <code>','</code> but some LDAP
-                        servers also understand <code>';'</code>. <varname>$dnArray</varname>
-                        must of type
+                        <para>
+                            Implodes an array in the form delivered by
+                            <methodname>Zend_Ldap_Dn::explodeDn()</methodname> to a DN string.
+                            <varname>$separator</varname> defaults to <code>','</code> but some LDAP
+                            servers also understand <code>';'</code>. <varname>$dnArray</varname>
+                            must of type
+                        </para>
 
                         <programlisting language="php"><![CDATA[
 array(

+ 2 - 1
documentation/manual/en/module_specs/Zend_Ldap-Node.xml

@@ -50,7 +50,8 @@
 
         <example>
             <title>Traverse LDAP tree recursively</title>
-<programlisting language="php"><![CDATA[
+
+            <programlisting language="php"><![CDATA[
 $options = array(/* ... */);
 $ldap = new Zend_Ldap($options);
 $ldap->bind();

+ 5 - 3
documentation/manual/en/module_specs/Zend_Log-Filters.xml

@@ -13,8 +13,9 @@
         <para>
             To filter before all writers, you can add any number of Filters to a
             Log object using the <methodname>addFilter()</methodname> method:
+        </para>
 
-            <programlisting language="php"><![CDATA[
+        <programlisting language="php"><![CDATA[
 $logger = new Zend_Log();
 
 $writer = new Zend_Log_Writer_Stream('php://output');
@@ -30,6 +31,7 @@ $logger->info('Informational message');
 $logger->emerg('Emergency message');
 ]]></programlisting>
 
+        <para>
             When you add one or more Filters to the Log object, the message must pass
             through all of the Filters before any Writers receives it.
         </para>
@@ -41,8 +43,9 @@ $logger->emerg('Emergency message');
         <para>
             To filter only on a specific Writer instance, use the
             <code>addFilter</code> method of that Writer:
+        </para>
 
-            <programlisting language="php"><![CDATA[
+        <programlisting language="php"><![CDATA[
 $logger = new Zend_Log();
 
 $writer1 = new Zend_Log_Writer_Stream('/path/to/first/logfile');
@@ -61,6 +64,5 @@ $logger->info('Informational message');
 // logged by both writers
 $logger->emerg('Emergency message');
 ]]></programlisting>
-        </para>
     </sect2>
 </sect1>

+ 13 - 11
documentation/manual/en/module_specs/Zend_Log-Formatters.xml

@@ -22,18 +22,19 @@
             <classname>Zend_Log_Formatter_Simple</classname> is the default formatter. It is
             configured automatically when you specify no formatter. The default configuration is
             equivalent to the following:
+        </para>
 
-            <programlisting language="php"><![CDATA[
+        <programlisting language="php"><![CDATA[
 $format = '%timestamp% %priorityName% (%priority%): %message%' . PHP_EOL;
 $formatter = new Zend_Log_Formatter_Simple($format);
 ]]></programlisting>
-        </para>
 
         <para>
             A formatter is set on an individual Writer object using the Writer's
             <methodname>setFormatter()</methodname> method:
+        </para>
 
-            <programlisting language="php"><![CDATA[
+        <programlisting language="php"><![CDATA[
 $writer = new Zend_Log_Writer_Stream('php://output');
 $formatter = new Zend_Log_Formatter_Simple('hello %message%' . PHP_EOL);
 $writer->setFormatter($formatter);
@@ -45,7 +46,6 @@ $logger->info('there');
 
 // outputs "hello there"
 ]]></programlisting>
-        </para>
 
         <para>
             The constructor of <classname>Zend_Log_Formatter_Simple</classname> accepts a single
@@ -64,8 +64,9 @@ $logger->info('there');
             <classname>Zend_Log_Formatter_Xml</classname> formats log data into
             <acronym>XML</acronym> strings. By default, it automatically logs all items in the event
             data array:
+        </para>
 
-            <programlisting language="php"><![CDATA[
+        <programlisting language="php"><![CDATA[
 $writer = new Zend_Log_Writer_Stream('php://output');
 $formatter = new Zend_Log_Formatter_Xml();
 $writer->setFormatter($formatter);
@@ -75,12 +76,12 @@ $logger->addWriter($writer);
 
 $logger->info('informational message');
 ]]></programlisting>
-        </para>
 
         <para>
             The code above outputs the following <acronym>XML</acronym> (space added for clarity):
+        </para>
 
-            <programlisting language="xml"><![CDATA[
+        <programlisting language="xml"><![CDATA[
 <logEntry>
   <timestamp>2007-04-06T07:24:37-07:00</timestamp>
   <message>informational message</message>
@@ -88,7 +89,6 @@ $logger->info('informational message');
   <priorityName>INFO</priorityName>
 </logEntry>
 ]]></programlisting>
-        </para>
 
         <para>
             It's possible to customize the root element as well as specify a mapping
@@ -96,8 +96,9 @@ $logger->info('informational message');
             of <classname>Zend_Log_Formatter_Xml</classname> accepts a string with the name of
             the root element as the first parameter and an associative array with
             the element mapping as the second parameter:
+        </para>
 
-            <programlisting language="php"><![CDATA[
+        <programlisting language="php"><![CDATA[
 $writer = new Zend_Log_Writer_Stream('php://output');
 $formatter = new Zend_Log_Formatter_Xml('log',
                                         array('msg' => 'message',
@@ -111,17 +112,18 @@ $logger->addWriter($writer);
 $logger->info('informational message');
 ]]></programlisting>
 
+        <para>
             The code above changes the root element from its default of
             <code>logEntry</code> to <code>log</code>. It also maps the element
             <code>msg</code> to the event data item <code>message</code>. This
             results in the following output:
+        </para>
 
-            <programlisting language="xml"><![CDATA[
+        <programlisting language="xml"><![CDATA[
 <log>
   <msg>informational message</msg>
   <level>INFO</level>
 </log>
 ]]></programlisting>
-        </para>
     </sect2>
 </sect1>

+ 26 - 10
documentation/manual/en/module_specs/Zend_Log-Overview.xml

@@ -50,14 +50,16 @@
 
         <para>
             To get started logging, instantiate a Writer and then pass it to a Log instance:
+        </para>
 
-            <programlisting language="php"><![CDATA[
+        <programlisting language="php"><![CDATA[
 $logger = new Zend_Log();
 $writer = new Zend_Log_Writer_Stream('php://output');
 
 $logger->addWriter($writer);
 ]]></programlisting>
 
+        <para>
             It is important to note that the Log must
             have at least one Writer. You can add any number of Writers using the
             Log's <methodname>addWriter()</methodname> method.
@@ -66,12 +68,14 @@ $logger->addWriter($writer);
         <para>
             Alternatively, you can pass a Writer directly to constructor of Log as
             a shortcut:
+        </para>
 
-            <programlisting language="php"><![CDATA[
+        <programlisting language="php"><![CDATA[
 $writer = new Zend_Log_Writer_Stream('php://output');
 $logger = new Zend_Log($writer);
 ]]></programlisting>
 
+        <para>
             The Log is now ready to use.
         </para>
     </sect2>
@@ -82,11 +86,13 @@ $logger = new Zend_Log($writer);
         <para>
             To log a message, call the <methodname>log()</methodname> method of a Log instance
             and pass it the message with a corresponding priority:
+        </para>
 
-            <programlisting language="php"><![CDATA[
+        <programlisting language="php"><![CDATA[
 $logger->log('Informational message', Zend_Log::INFO);
 ]]></programlisting>
 
+        <para>
             The first parameter of the <methodname>log()</methodname> method is a string
             <code>message</code> and the second parameter is an integer <code>priority</code>. The
             priority must be one of the priorities recognized by the Log instance. This is explained
@@ -96,15 +102,15 @@ $logger->log('Informational message', Zend_Log::INFO);
         <para>
             A shortcut is also available. Instead of calling the <methodname>log()</methodname>
             method, you can call a method by the same name as the priority:
+        </para>
 
-            <programlisting language="php"><![CDATA[
+        <programlisting language="php"><![CDATA[
 $logger->log('Informational message', Zend_Log::INFO);
 $logger->info('Informational message');
 
 $logger->log('Emergency message', Zend_Log::EMERG);
 $logger->emerg('Emergency message');
 ]]></programlisting>
-        </para>
     </sect2>
 
     <sect2 id="zend.log.overview.destroying-a-logger">
@@ -115,11 +121,13 @@ $logger->emerg('Emergency message');
             <constant>NULL</constant> to destroy it. This will automatically call the
             <methodname>shutdown()</methodname> instance method of each attached Writer before
             the Log object is destroyed:
+        </para>
 
-            <programlisting language="php"><![CDATA[
+        <programlisting language="php"><![CDATA[
 $logger = null;
 ]]></programlisting>
 
+        <para>
             Explicitly destroying the log in this way is optional and is performed
             automatically at <acronym>PHP</acronym> shutdown.
         </para>
@@ -130,8 +138,9 @@ $logger = null;
 
         <para>
             The <classname>Zend_Log</classname> class defines the following priorities:
+        </para>
 
-            <programlisting language="php"><![CDATA[
+        <programlisting language="php"><![CDATA[
 EMERG   = 0;  // Emergency: system is unusable
 ALERT   = 1;  // Alert: action must be taken immediately
 CRIT    = 2;  // Critical: critical conditions
@@ -142,6 +151,7 @@ INFO    = 6;  // Informational: informational messages
 DEBUG   = 7;  // Debug: debug messages
 ]]></programlisting>
 
+        <para>
             These priorities are always available, and a convenience method of the same name
             is available for each one.
         </para>
@@ -171,19 +181,23 @@ DEBUG   = 7;  // Debug: debug messages
         <para>
             User-defined priorities can be added at runtime using the Log's
             <methodname>addPriority()</methodname> method:
+        </para>
 
-            <programlisting language="php"><![CDATA[
+        <programlisting language="php"><![CDATA[
 $logger->addPriority('FOO', 8);
 ]]></programlisting>
 
+        <para>
             The snippet above creates a new priority, <constant>FOO</constant>, whose
             value is <code>8</code>. The new priority is then available for logging:
+        </para>
 
-            <programlisting language="php"><![CDATA[
+        <programlisting language="php"><![CDATA[
 $logger->log('Foo message', 8);
 $logger->foo('Foo Message');
 ]]></programlisting>
 
+        <para>
             New priorities cannot overwrite existing ones.
         </para>
     </sect2>
@@ -209,11 +223,13 @@ $logger->foo('Foo Message');
         <para>
             To add a new item to every future event, call the
             <methodname>setEventItem()</methodname> method giving a key and a value:
+        </para>
 
-            <programlisting language="php"><![CDATA[
+        <programlisting language="php"><![CDATA[
 $logger->setEventItem('pid', getmypid());
 ]]></programlisting>
 
+        <para>
             The example above sets a new item named <code>pid</code> and populates
             it with the PID of the current process. Once a new item has been
             set, it is available automatically to all writers along with all of the

+ 17 - 11
documentation/manual/en/module_specs/Zend_Log-Writers.xml

@@ -20,27 +20,29 @@
             To write log data to the <acronym>PHP</acronym> output buffer, use the URL
             <code>php://output</code>. Alternatively, you can send log data directly to a stream
             like <constant>STDERR</constant> (<code>php://stderr</code>).
+        </para>
 
-            <programlisting language="php"><![CDATA[
+        <programlisting language="php"><![CDATA[
 $writer = new Zend_Log_Writer_Stream('php://output');
 $logger = new Zend_Log($writer);
 
 $logger->info('Informational message');
 ]]></programlisting>
-        </para>
 
         <para>
             To write data to a file, use one of the
             <ulink url="http://www.php.net/manual/en/wrappers.php#wrappers.file">Filesystem
             URLs</ulink>:
+        </para>
 
-            <programlisting language="php"><![CDATA[
+        <programlisting language="php"><![CDATA[
 $writer = new Zend_Log_Writer_Stream('/path/to/logfile');
 $logger = new Zend_Log($writer);
 
 $logger->info('Informational message');
 ]]></programlisting>
 
+        <para>
             By default, the stream opens in the append mode (<code>"a"</code>).
             To open it with a different mode, the <classname>Zend_Log_Writer_Stream</classname>
             constructor accepts an optional second parameter for the mode.
@@ -49,8 +51,9 @@ $logger->info('Informational message');
         <para>
             The constructor of <classname>Zend_Log_Writer_Stream</classname> also accepts an
             existing stream resource:
+        </para>
 
-            <programlisting language="php"><![CDATA[
+        <programlisting language="php"><![CDATA[
 $stream = @fopen('/path/to/logfile', 'a', false);
 if (! $stream) {
     throw new Exception('Failed to open stream');
@@ -62,6 +65,7 @@ $logger = new Zend_Log($writer);
 $logger->info('Informational message');
 ]]></programlisting>
 
+        <para>
             You cannot specify the mode for existing stream resources. Doing so
             causes a <classname>Zend_Log_Exception</classname> to be thrown.
         </para>
@@ -76,8 +80,9 @@ $logger->info('Informational message');
             <classname>Zend_Log_Writer_Db</classname> receives a
             <classname>Zend_Db_Adapter</classname> instance, a table name, and a mapping of database
             columns to event data items:
+        </para>
 
-            <programlisting language="php"><![CDATA[
+        <programlisting language="php"><![CDATA[
 $params = array ('host'     => '127.0.0.1',
                  'username' => 'malory',
                  'password' => '******',
@@ -92,6 +97,7 @@ $logger = new Zend_Log($writer);
 $logger->info('Informational message');
 ]]></programlisting>
 
+        <para>
             The example above writes a single row of log data to the database table named
             <code>log_table_name</code> table. The database column named <code>lvl</code>
             receives the priority number and the column named <code>msg</code> receives the
@@ -110,15 +116,15 @@ $logger->info('Informational message');
         <para>
             The <classname>Zend_Log_Writer_Null</classname> is a stub that does not write log data
             to anything. It is useful for disabling logging or stubbing out logging during tests:
+        </para>
 
-            <programlisting language="php"><![CDATA[
+        <programlisting language="php"><![CDATA[
 $writer = new Zend_Log_Writer_Null;
 $logger = new Zend_Log($writer);
 
 // goes nowhere
 $logger->info('Informational message');
 ]]></programlisting>
-        </para>
     </sect2>
 
     <sect2 id="zend.log.writers.mock">
@@ -127,8 +133,9 @@ $logger->info('Informational message');
         <para>
             The <classname>Zend_Log_Writer_Mock</classname> is a very simple writer that records
             the raw data it receives in an array exposed as a public property.
+        </para>
 
-            <programlisting language="php"><![CDATA[
+        <programlisting language="php"><![CDATA[
 $mock = new Zend_Log_Writer_Mock;
 $logger = new Zend_Log($mock);
 
@@ -144,7 +151,6 @@ var_dump($mock->events[0]);
 //    [priorityName] => INFO
 // )
 ]]></programlisting>
-        </para>
 
         <para>
             To clear the events logged by the mock, simply set <code>$mock->events = array()</code>.
@@ -158,8 +164,9 @@ var_dump($mock->events[0]);
             There is no composite Writer object. However, a Log instance can write
             to any number of Writers. To do this, use the <methodname>addWriter()</methodname>
             method:
+        </para>
 
-            <programlisting language="php"><![CDATA[
+        <programlisting language="php"><![CDATA[
 $writer1 = new Zend_Log_Writer_Stream('/path/to/first/logfile');
 $writer2 = new Zend_Log_Writer_Stream('/path/to/second/logfile');
 
@@ -170,6 +177,5 @@ $logger->addWriter($writer2);
 // goes to both writers
 $logger->info('Informational message');
 ]]></programlisting>
-        </para>
     </sect2>
 </sect1>

+ 14 - 12
documentation/manual/en/module_specs/Zend_Memory-MemoryManager.xml

@@ -40,11 +40,11 @@ $memoryManager = Zend_Memory::factory('File', $backendOptions);
         <para>
             You may use the special name '<code>None</code>' as a backend name,
             in addition to standard <classname>Zend_Cache</classname> backends.
+        </para>
 
-            <programlisting language="php"><![CDATA[
+        <programlisting language="php"><![CDATA[
 $memoryManager = Zend_Memory::factory('None');
 ]]></programlisting>
-        </para>
 
         <para>
             If you use '<code>None</code>' as the backend name, then the memory
@@ -72,10 +72,11 @@ $memoryManager = Zend_Memory::factory('None');
             <para>
                 Create movable objects (objects, which may be swapped) using
                 the <methodname>Zend_Memory_Manager::create([$data])</methodname> method:
-                <programlisting language="php"><![CDATA[
+            </para>
+
+            <programlisting language="php"><![CDATA[
 $memObject = $memoryManager->create($data);
 ]]></programlisting>
-            </para>
 
             <para>
                 The <varname>$data</varname> argument is optional and used to
@@ -90,10 +91,11 @@ $memObject = $memoryManager->create($data);
             <para>
                 Create locked objects (objects, which are not swapped) using
                 the <methodname>Zend_Memory_Manager::createLocked([$data])</methodname> method:
-                <programlisting language="php"><![CDATA[
+            </para>
+
+            <programlisting language="php"><![CDATA[
 $memObject = $memoryManager->createLocked($data);
 ]]></programlisting>
-            </para>
 
             <para>
                 The <varname>$data</varname> argument is optional and used to
@@ -108,8 +110,9 @@ $memObject = $memoryManager->createLocked($data);
             <para>
                 Memory objects are automatically destroyed and removed from
                 memory when they go out of scope:
+            </para>
 
-                <programlisting language="php"><![CDATA[
+            <programlisting language="php"><![CDATA[
 function foo()
 {
     global $memoryManager, $memList;
@@ -134,7 +137,6 @@ function foo()
     // and is not destroyed
 }
 ]]></programlisting>
-            </para>
 
             <para>
                 This applies to both movable and locked objects.
@@ -163,12 +165,12 @@ function foo()
                 You can retrieve or set the memory limit setting using the
                 <methodname>getMemoryLimit()</methodname> and
                 <methodname>setMemoryLimit($newLimit)</methodname> methods:
+            </para>
 
-                <programlisting language="php"><![CDATA[
+            <programlisting language="php"><![CDATA[
 $oldLimit = $memoryManager->getMemoryLimit();  // Get memory limit in bytes
 $memoryManager->setMemoryLimit($newLimit);     // Set memory limit in bytes
 ]]></programlisting>
-            </para>
 
             <para>
                 A negative value for memory limit means 'no limit'.
@@ -195,12 +197,12 @@ $memoryManager->setMemoryLimit($newLimit);     // Set memory limit in bytes
                 You can retrieve or set the minimum size using the
                 <methodname>getMinSize()</methodname> and
                 <methodname>setMinSize($newSize)</methodname> methods:
+            </para>
 
-                <programlisting language="php"><![CDATA[
+            <programlisting language="php"><![CDATA[
 $oldMinSize = $memoryManager->getMinSize();  // Get MinSize in bytes
 $memoryManager->setMinSize($newSize);        // Set MinSize limit in bytes
 ]]></programlisting>
-            </para>
 
             <para>
                 The default minimum size value is 16KB (16384 bytes).

+ 12 - 12
documentation/manual/en/module_specs/Zend_Memory-MemoryObjects.xml

@@ -9,11 +9,11 @@
         <para>
             Create movable memory objects using the <methodname>create([$data])</methodname>
             method of the memory manager:
+        </para>
 
-            <programlisting language="php"><![CDATA[
+        <programlisting language="php"><![CDATA[
 $memObject = $memoryManager->create($data);
 ]]></programlisting>
-        </para>
 
         <para>
             "Movable" means that such objects may be swapped and unloaded from
@@ -27,11 +27,11 @@ $memObject = $memoryManager->create($data);
         <para>
             Create locked memory objects using the <methodname>createLocked([$data])</methodname>
             method of the memory manager:
+        </para>
 
-            <programlisting language="php"><![CDATA[
+        <programlisting language="php"><![CDATA[
 $memObject = $memoryManager->createLocked($data);
 ]]></programlisting>
-        </para>
 
         <para>
             "Locked" means that such objects are never swapped and unloaded
@@ -67,8 +67,9 @@ $memObject = $memoryManager->createLocked($data);
         <para>
             Use the memory container (movable or locked) '<code>value</code>'
             property to operate with memory object data:
+        </para>
 
-            <programlisting language="php"><![CDATA[
+        <programlisting language="php"><![CDATA[
 $memObject = $memoryManager->create($data);
 
 echo $memObject->value;
@@ -81,7 +82,6 @@ echo ord($memObject->value[$index1]);
 
 $memObject->value = substr($memObject->value, $start, $length);
 ]]></programlisting>
-        </para>
 
         <para>
             An alternative way to access memory object data is to use the <link
@@ -129,8 +129,9 @@ public function &getRef();
                 which is changed directly by user application.
                 So, it's a good idea to use the <methodname>getRef()</methodname> method
                 for value data processing:
+            </para>
 
-                <programlisting language="php"><![CDATA[
+            <programlisting language="php"><![CDATA[
 $memObject = $memoryManager->create($data);
 
 $value = &$memObject->getRef();
@@ -140,7 +141,6 @@ for ($count = 0; $count < strlen($value); $count++) {
     ...
 }
 ]]></programlisting>
-            </para>
         </sect3>
 
         <sect3 id="zend.memory.memory-objects.api.touch">
@@ -153,8 +153,9 @@ public function touch();
             <para>
                 The <methodname>touch()</methodname> method should be used in common with
                 <methodname>getRef()</methodname>. It signals that object value has been changed:
+            </para>
 
-                <programlisting language="php"><![CDATA[
+            <programlisting language="php"><![CDATA[
 $memObject = $memoryManager->create($data);
 ...
 
@@ -170,7 +171,6 @@ for ($count = 0; $count < strlen($value); $count++) {
 
 $memObject->touch();
 ]]></programlisting>
-            </para>
         </sect3>
 
         <sect3 id="zend.memory.memory-objects.api.lock">
@@ -193,8 +193,9 @@ public function lock();
                 Locking objects in memory also guarantees that reference
                 returned by the <methodname>getRef()</methodname> method is valid until you
                 unlock the object:
+            </para>
 
-                <programlisting language="php"><![CDATA[
+            <programlisting language="php"><![CDATA[
 $memObject1 = $memoryManager->create($data1);
 $memObject2 = $memoryManager->create($data2);
 ...
@@ -213,7 +214,6 @@ $memObject1->touch();
 $memObject1->unlock();
 $memObject2->unlock();
 ]]></programlisting>
-            </para>
         </sect3>
 
         <sect3 id="zend.memory.memory-objects.api.unlock">

+ 2 - 2
documentation/manual/en/module_specs/Zend_Memory-Overview.xml

@@ -111,8 +111,9 @@ $loadedFiles[$index3]->value[$charIndex] = '_';
             <para>
                 You can operate with this <code>value</code> attribute as
                 an object property:
+            </para>
 
-                <programlisting language="php"><![CDATA[
+            <programlisting language="php"><![CDATA[
 $memObject = $memoryManager->create($data);
 
 echo $memObject->value;
@@ -125,7 +126,6 @@ echo ord($memObject->value[$index1]);
 
 $memObject->value = substr($memObject->value, $start, $length);
 ]]></programlisting>
-            </para>
 
             <note>
                 <para>

+ 4 - 4
documentation/manual/en/module_specs/Zend_Navigation-Pages-Factory.xml

@@ -83,10 +83,10 @@ $page = Zend_Navigation_Page::factory(array(
     <example id="zend.navigation.pages.factory.example.custom">
         <title>Creating a custom page type using the page factory</title>
 
-         <para>
-             To create a custom page type using the factory, use the option
-             <code>type</code> to specify a class name to instantiate.
-         </para>
+        <para>
+            To create a custom page type using the factory, use the option
+            <code>type</code> to specify a class name to instantiate.
+        </para>
 
         <programlisting language="php"><![CDATA[
 class My_Navigation_Page extends Zend_Navigation_Page

+ 10 - 30
documentation/manual/en/module_specs/Zend_Paginator-Advanced.xml

@@ -53,11 +53,9 @@
             appropriate slice of data. For an array, that would be:
         </para>
 
-        <para>
-            <programlisting language="php"><![CDATA[
+        <programlisting language="php"><![CDATA[
 return array_slice($this->_array, $offset, $itemCountPerPage);
 ]]></programlisting>
-        </para>
 
         <para>
             Take a look at the packaged adapters (all of which implement the
@@ -75,11 +73,9 @@ return array_slice($this->_array, $offset, $itemCountPerPage);
             a single method, <methodname>getPages()</methodname>. Specifically,
         </para>
 
-        <para>
-            <programlisting language="php"><![CDATA[
+        <programlisting language="php"><![CDATA[
 public function getPages(Zend_Paginator $paginator, $pageRange = null);
 ]]></programlisting>
-        </para>
 
         <para>
             This method should calculate a lower and upper bound for page
@@ -94,11 +90,9 @@ public function getPages(Zend_Paginator $paginator, $pageRange = null);
             similar to the following line of code:
         </para>
 
-        <para>
-            <programlisting language="php"><![CDATA[
+        <programlisting language="php"><![CDATA[
 return $paginator->getPagesInRange($lowerBound, $upperBound);
 ]]></programlisting>
-        </para>
 
         <para>
             There's nothing special about this call; it's merely a convenience
@@ -112,13 +106,11 @@ return $paginator->getPagesInRange($lowerBound, $upperBound);
             that, do the following:
         </para>
 
-        <para>
-            <programlisting language="php"><![CDATA[
+        <programlisting language="php"><![CDATA[
 $prefix = 'My_Paginator_ScrollingStyle';
 $path   = 'My/Paginator/ScrollingStyle/';
 Zend_Paginator::addScrollingStylePrefixPath($prefix, $path);
 ]]></programlisting>
-        </para>
     </sect2>
 
     <sect2 id="zend.paginator.advanced.caching">
@@ -132,15 +124,13 @@ Zend_Paginator::addScrollingStylePrefixPath($prefix, $path);
             instance.
         </para>
 
-        <para>
-            <programlisting language="php"><![CDATA[
+        <programlisting language="php"><![CDATA[
 $paginator = Zend_Paginator::factory($someData);
 $fO = array('lifetime' => 3600, 'automatic_serialization' => true);
 $bO = array('cache_dir'=>'/tmp');
 $cache = Zend_cache::factory('Core', 'File', $fO, $bO);
 Zend_Paginator::setCache($cache);
 ]]></programlisting>
-        </para>
 
         <para>
             As far as <classname>Zend_Paginator</classname> has got a
@@ -149,8 +139,7 @@ Zend_Paginator::setCache($cache);
             then use <methodname>setCacheEnable()</methodname> for that.
         </para>
 
-        <para>
-            <programlisting language="php"><![CDATA[
+        <programlisting language="php"><![CDATA[
 $paginator = Zend_Paginator::factory($someData);
 // $cache is a Zend_Cache_Core instance
 Zend_Paginator::setCache($cache);
@@ -158,7 +147,6 @@ Zend_Paginator::setCache($cache);
 $paginator->setCacheEnable(false);
 // cache is now disabled
 ]]></programlisting>
-        </para>
 
         <para>
             When a cache is set, data are automatically stored in it and pulled out from
@@ -168,8 +156,7 @@ $paginator->setCacheEnable(false);
             pass a parameter representing the page number to empty in the cache:
         </para>
 
-        <para>
-            <programlisting language="php"><![CDATA[
+        <programlisting language="php"><![CDATA[
 $paginator = Zend_Paginator::factory($someData);
 Zend_Paginator::setCache($cache);
 $items = $paginator->getCurrentItems();
@@ -183,15 +170,13 @@ $paginator->clearPageItemCache(3);
 // clear all the cache data
 $paginator->clearPageItemCache();
 ]]></programlisting>
-        </para>
 
         <para>
             Changing the item count per page will empty the whole cache
             as it would have become invalid:
         </para>
 
-        <para>
-            <programlisting language="php"><![CDATA[
+        <programlisting language="php"><![CDATA[
 $paginator = Zend_Paginator::factory($someData);
 Zend_Paginator::setCache($cache);
 // fetch some items
@@ -200,15 +185,13 @@ $items = $paginator->getCurrentItems();
 // all the cache data will be flushed:
 $paginator->setItemCountPerPage(2);
 ]]></programlisting>
-        </para>
 
         <para>
             It is also possible to see the data in cache and ask for them directly.
             <methodname>getPageItemCache()</methodname> can be used for that:
         </para>
 
-        <para>
-            <programlisting language="php"><![CDATA[
+        <programlisting language="php"><![CDATA[
 $paginator = Zend_Paginator::factory($someData);
 $paginator->setItemCountPerPage(3);
 Zend_Paginator::setCache($cache);
@@ -220,7 +203,6 @@ $otherItems = $paginator->getItemsPerPage(4);
 // see the cached items as a two-dimension array:
 var_dump($paginator->getPageItemCache());
 ]]></programlisting>
-        </para>
     </sect2>
 
     <sect2 id="zend.paginator.advanced.aggregator">
@@ -237,8 +219,7 @@ var_dump($paginator->getPageItemCache());
             <acronym>PHP</acronym> SPL extension.
         </para>
 
-        <para>
-            <programlisting language="php"><![CDATA[
+        <programlisting language="php"><![CDATA[
 interface Zend_Paginator_AdapterAggregate
 {
     /**
@@ -249,7 +230,6 @@ interface Zend_Paginator_AdapterAggregate
     public function getPaginatorAdapter();
 }
 ]]></programlisting>
-        </para>
 
         <para>
             The interface is fairly small and only expects you to return an instance of

+ 6 - 7
documentation/manual/en/module_specs/Zend_Pdf-Drawing.xml

@@ -15,12 +15,10 @@
             Page size can be retrieved from a page object:
         </para>
 
-        <para>
-            <programlisting language="php"><![CDATA[
+        <programlisting language="php"><![CDATA[
 $width  = $pdfPage->getWidth();
 $height = $pdfPage->getHeight();
 ]]></programlisting>
-        </para>
     </sect2>
 
     <sect2 id="zend.pdf.drawing.color">
@@ -575,6 +573,7 @@ $fontName = $font->getFontName(Zend_Pdf_Font::NAME_POSTSCRIPT,
 $pdf->save($docPath);
 ...
 ]]></programlisting>
+
             <programlisting language="php"><![CDATA[
 ...
 $pdf = Zend_Pdf::load($docPath);
@@ -609,8 +608,9 @@ $pdf->save($docPath, true /* incremental update mode */);
                         Possibly embedded font program is actually not extracted. So extracted font
                         can't provide correct font metrics and original font has to be used for text
                         width calculations:
+                    </para>
 
-                        <programlisting language="php"><![CDATA[
+                    <programlisting language="php"><![CDATA[
 ...
 $font = $pdf->extractFont($fontName);
 $originalFont = Zend_Pdf_Font::fontWithPath($fontPath);
@@ -628,7 +628,6 @@ for ($charIndex = 0; $charIndex < strlen($text); $charIndex++) {
 }
 ...
 ]]></programlisting>
-                    </para>
                 </listitem>
             </itemizedlist>
         </para>
@@ -1193,8 +1192,9 @@ public function getFontSize();
 
         <para>
             Transparency may be set using <methodname>Zend_Pdf_Page::setAlpha()</methodname> method:
+        </para>
 
-            <programlisting language="php"><![CDATA[
+        <programlisting language="php"><![CDATA[
 /**
  * Set the transparency
  *
@@ -1212,6 +1212,5 @@ public function getFontSize();
  */
 public function setAlpha($alpha, $mode = 'Normal');
 ]]></programlisting>
-        </para>
     </sect2>
 </sect1>

+ 2 - 2
documentation/manual/en/module_specs/Zend_Pdf-InteractiveFeatures.xml

@@ -1064,8 +1064,9 @@ $pdf->save($path, true);
         <para>
             <classname>Zend_Pdf_Outline</classname> class implements RecursiveArray interface,
             so child outlines may be recursively iterated using RecursiveIteratorIterator:
+        </para>
 
-            <programlisting language="php"><![CDATA[
+        <programlisting language="php"><![CDATA[
 $pdf = Zend_Pdf::load($path);
 
 foreach ($pdf->outlines as $documentRootOutlineEntry) {
@@ -1094,7 +1095,6 @@ foreach ($pdf->outlines as $documentRootOutlineEntry) {
 
 $pdf->save($path, true);
 ]]></programlisting>
-        </para>
 
         <note>
             <para>

+ 4 - 4
documentation/manual/en/module_specs/Zend_Pdf-Properties.xml

@@ -13,8 +13,9 @@
         Historically this information is stored using special Info structure. This structure
         is available for read and writing as an associative array using <code>properties</code>
         public property of <classname>Zend_Pdf</classname> objects:
+    </para>
 
-        <programlisting language="php"><![CDATA[
+    <programlisting language="php"><![CDATA[
 $pdf = Zend_Pdf::load($pdfPath);
 
 echo $pdf->properties['Title'] . "\n";
@@ -23,7 +24,6 @@ echo $pdf->properties['Author'] . "\n";
 $pdf->properties['Title'] = 'New Title.';
 $pdf->save($pdfPath);
 ]]></programlisting>
-    </para>
 
     <para>
         The following keys are defined by <acronym>PDF</acronym> v1.4 (Acrobat 5) standard:
@@ -206,8 +206,9 @@ $pdf->save($pdfPath);
         This <acronym>XML</acronym> document can be retrieved and attached to the PDF with
         <methodname>Zend_Pdf::getMetadata()</methodname> and
         <methodname>Zend_Pdf::setMetadata($metadata)</methodname> methods:
+    </para>
 
-        <programlisting language="php"><![CDATA[
+    <programlisting language="php"><![CDATA[
 $pdf = Zend_Pdf::load($pdfPath);
 $metadata = $pdf->getMetadata();
 $metadataDOM = new DOMDocument();
@@ -227,7 +228,6 @@ $titleNode->nodeValue = 'New title';
 $pdf->setMetadata($metadataDOM->saveXML());
 $pdf->save($pdfPath);
 ]]></programlisting>
-    </para>
 
     <para>
         Common document properties are duplicated in the Info structure and Metadata document (if

+ 4 - 4
documentation/manual/en/module_specs/Zend_Search_Lucene-Advanced.xml

@@ -113,8 +113,9 @@
         <para>
             Static object properties (see below) are destroyed <emphasis>after</emphasis> the last
             line of the executed script.
+        </para>
 
-            <programlisting language="php"><![CDATA[
+        <programlisting language="php"><![CDATA[
 class Searcher {
     private static $_index;
 
@@ -125,7 +126,6 @@ class Searcher {
 
 Searcher::initIndex();
 ]]></programlisting>
-        </para>
 
         <para>
             All the same, the destructor for static properties is correctly invoked at this point in
@@ -153,8 +153,9 @@ Searcher::initIndex();
             guarantees that if there are no document added or deleted after the call to
             <methodname>commit()</methodname>, then the <classname>Zend_Search_Lucene</classname>
             destructor has nothing to do and will not throw exception:
+        </para>
 
-            <programlisting language="php"><![CDATA[
+        <programlisting language="php"><![CDATA[
 class Searcher {
     private static $_index;
 
@@ -178,6 +179,5 @@ Searcher::initIndex();
 Searcher::commit();
 ...
 ]]></programlisting>
-        </para>
     </sect2>
 </sect1>

+ 21 - 15
documentation/manual/en/module_specs/Zend_Search_Lucene-BestPractice.xml

@@ -22,8 +22,9 @@
                 linkend="zend.search.lucene.searching.results-scoring">score</link>. If the indexed
             document has the same stored fields, you have to use the
             <methodname>getDocument()</methodname> method to access them:
+        </para>
 
-            <programlisting language="php"><![CDATA[
+        <programlisting language="php"><![CDATA[
 $hits = $index->find($query);
 
 foreach ($hits as $hit) {
@@ -49,7 +50,6 @@ foreach ($hits as $hit) {
     $title = $hit->getDocument()->title;
 }
 ]]></programlisting>
-        </para>
     </sect2>
 
     <sect2 id="zend.search.lucene.best-practice.indexing-performance">
@@ -77,13 +77,13 @@ foreach ($hits as $hit) {
         <para>
             Full index optimization may be performed with the <methodname>optimize()</methodname>
             method:
+        </para>
 
-            <programlisting language="php"><![CDATA[
+        <programlisting language="php"><![CDATA[
 $index = Zend_Search_Lucene::open($indexPath);
 
 $index->optimize();
 ]]></programlisting>
-        </para>
 
         <para>
             Index optimization works with data streams and doesn't take a lot of memory but does
@@ -315,25 +315,27 @@ $index->optimize();
 
         <para>
             The first is to force going out of scope:
+        </para>
 
-            <programlisting language="php"><![CDATA[
+        <programlisting language="php"><![CDATA[
 $index = Zend_Search_Lucene::open($indexPath);
 
 ...
 
 unset($index);
 ]]></programlisting>
-        </para>
 
         <para>
             And the second is to perform a commit operation before the end of script execution:
+        </para>
 
-            <programlisting language="php"><![CDATA[
+        <programlisting language="php"><![CDATA[
 $index = Zend_Search_Lucene::open($indexPath);
 
 $index->commit();
 ]]></programlisting>
 
+        <para>
             This possibility is also described in the "<link
                 linkend="zend.search.lucene.advanced.static">Advanced. Using index as static
                 property</link>" section.
@@ -355,8 +357,9 @@ $index->commit();
 
         <para>
             This is more efficient than using the <methodname>find()</methodname> method:
+        </para>
 
-            <programlisting language="php"><![CDATA[
+        <programlisting language="php"><![CDATA[
 // Retrieving documents with find() method using a query string
 $query = $idFieldName . ':' . $docId;
 $hits  = $index->find($query);
@@ -389,7 +392,6 @@ foreach ($docIds as $id) {
     ...
 }
 ]]></programlisting>
-        </para>
     </sect2>
 
     <sect2 id="zend.search.lucene.best-practice.memory-usage">
@@ -474,8 +476,9 @@ foreach ($docIds as $id) {
 
         <para>
             Encoding may be explicitly specified as an optional parameter of field creation methods:
+        </para>
 
-            <programlisting language="php"><![CDATA[
+        <programlisting language="php"><![CDATA[
 $doc = new Zend_Search_Lucene_Document();
 $doc->addField(Zend_Search_Lucene_Field::Text('title',
                                               $title,
@@ -485,14 +488,16 @@ $doc->addField(Zend_Search_Lucene_Field::UnStored('contents',
                                                   'utf-8'));
 ]]></programlisting>
 
+        <para>
             This is the best way to avoid ambiguity in the encoding used.
         </para>
 
         <para>
             If optional encoding parameter is omitted, then the current locale is used. The current
             locale may contain character encoding data in addition to the language specification:
+        </para>
 
-            <programlisting language="php"><![CDATA[
+        <programlisting language="php"><![CDATA[
 setlocale(LC_ALL, 'fr_FR');
 ...
 
@@ -502,7 +507,6 @@ setlocale(LC_ALL, 'de_DE.iso-8859-1');
 setlocale(LC_ALL, 'ru_RU.UTF-8');
 ...
 ]]></programlisting>
-        </para>
 
         <para>
             The same approach is used to set query string encoding.
@@ -515,25 +519,27 @@ setlocale(LC_ALL, 'ru_RU.UTF-8');
         <para>
             Encoding may be passed as an optional parameter, if the query is parsed explicitly
             before search:
+        </para>
 
-            <programlisting language="php"><![CDATA[
+        <programlisting language="php"><![CDATA[
 $query =
     Zend_Search_Lucene_Search_QueryParser::parse($queryStr, 'iso-8859-5');
 $hits = $index->find($query);
 ...
 ]]></programlisting>
-        </para>
 
         <para>
             The default encoding may also be specified with
             <methodname>setDefaultEncoding()</methodname> method:
+        </para>
 
-            <programlisting language="php"><![CDATA[
+        <programlisting language="php"><![CDATA[
 Zend_Search_Lucene_Search_QueryParser::setDefaultEncoding('iso-8859-1');
 $hits = $index->find($queryStr);
 ...
 ]]></programlisting>
 
+        <para>
             The empty string implies 'current locale'.
         </para>
 

+ 8 - 8
documentation/manual/en/module_specs/Zend_Search_Lucene-Charset.xml

@@ -79,13 +79,13 @@
         </para>
 
         <para>
-             Any of this analyzers can be enabled with the code like this:
+            Any of this analyzers can be enabled with the code like this:
+        </para>
 
-            <programlisting language="php"><![CDATA[
+        <programlisting language="php"><![CDATA[
 Zend_Search_Lucene_Analysis_Analyzer::setDefault(
     new Zend_Search_Lucene_Analysis_Analyzer_Common_Utf8());
 ]]></programlisting>
-        </para>
 
         <warning>
             <title/>
@@ -110,16 +110,16 @@ Zend_Search_Lucene_Analysis_Analyzer::setDefault(
         </para>
 
         <para>
-             Use the following code to check, if PCRE UTF-8 support is enabled:
+            Use the following code to check, if PCRE UTF-8 support is enabled:
+        </para>
 
-            <programlisting language="php"><![CDATA[
+        <programlisting language="php"><![CDATA[
 if (@preg_match('/\pL/u', 'a') == 1) {
     echo "PCRE unicode support is turned on.\n";
 } else {
     echo "PCRE unicode support is turned off.\n";
 }
 ]]></programlisting>
-        </para>
 
         <para>
             Case insensitive versions of UTF-8 compatible analyzers also need <ulink
@@ -131,8 +131,9 @@ if (@preg_match('/\pL/u', 'a') == 1) {
             If you don't want mbstring extension to be turned on, but need case insensitive search,
             you may use the following approach: normalize source data before indexing and query
             string before searching by converting them to lowercase:
+        </para>
 
-            <programlisting language="php"><![CDATA[
+        <programlisting language="php"><![CDATA[
 // Indexing
 setlocale(LC_CTYPE, 'de_DE.iso-8859-1');
 
@@ -169,6 +170,5 @@ Zend_Search_Lucene_Analysis_Analyzer::setDefault(
 
 $hits = $index->find(strtolower($query));
 ]]></programlisting>
-        </para>
     </sect2>
 </sect1>

+ 7 - 4
documentation/manual/en/module_specs/Zend_Search_Lucene-Extending.xml

@@ -185,8 +185,9 @@ Zend_Search_Lucene_Analysis_Analyzer::setDefault(
         <para>
             The <code>ShortWords</code> and <code>StopWords</code> filters may be used with
             pre-defined or custom analyzers like this:
+        </para>
 
-            <programlisting language="php"><![CDATA[
+        <programlisting language="php"><![CDATA[
 $stopWords = array('a', 'an', 'at', 'the', 'and', 'or', 'is', 'am');
 $stopWordsFilter =
     new Zend_Search_Lucene_Analysis_TokenFilter_StopWords($stopWords);
@@ -197,7 +198,8 @@ $analyzer->addFilter($stopWordsFilter);
 
 Zend_Search_Lucene_Analysis_Analyzer::setDefault($analyzer);
 ]]></programlisting>
-            <programlisting language="php"><![CDATA[
+
+        <programlisting language="php"><![CDATA[
 $shortWordsFilter = new Zend_Search_Lucene_Analysis_TokenFilter_ShortWords();
 
 $analyzer =
@@ -206,13 +208,13 @@ $analyzer->addFilter($shortWordsFilter);
 
 Zend_Search_Lucene_Analysis_Analyzer::setDefault($analyzer);
 ]]></programlisting>
-        </para>
 
         <para>
             The <classname>Zend_Search_Lucene_Analysis_TokenFilter_StopWords</classname> constructor
             takes an array of stop-words as an input. But stop-words may be also loaded from a file:
+        </para>
 
-            <programlisting language="php"><![CDATA[
+        <programlisting language="php"><![CDATA[
 $stopWordsFilter = new Zend_Search_Lucene_Analysis_TokenFilter_StopWords();
 $stopWordsFilter->loadFromFile($my_stopwords_file);
 
@@ -223,6 +225,7 @@ $analyzer->addFilter($stopWordsFilter);
 Zend_Search_Lucene_Analysis_Analyzer::setDefault($analyzer);
 ]]></programlisting>
 
+        <para>
             This file should be a common text file with one word in each line. The '#' character
             marks a line as a comment.
         </para>

+ 22 - 22
documentation/manual/en/module_specs/Zend_Search_Lucene-Overview.xml

@@ -123,8 +123,9 @@ $doc->addField(Zend_Search_Lucene_Field::UnStored('contents',
         <para>
             Encoding may differ for different documents as well as for different fields within one
             document:
+        </para>
 
-            <programlisting language="php"><![CDATA[
+        <programlisting language="php"><![CDATA[
 $doc = new Zend_Search_Lucene_Document();
 $doc->addField(Zend_Search_Lucene_Field::Text('title',
                                               $title,
@@ -133,18 +134,17 @@ $doc->addField(Zend_Search_Lucene_Field::UnStored('contents',
                                                   $contents,
                                                   'utf-8'));
 ]]></programlisting>
-        </para>
 
         <para>
             If encoding parameter is omitted, then the current locale is used at processing time.
             For example:
+        </para>
 
-            <programlisting language="php"><![CDATA[
+        <programlisting language="php"><![CDATA[
 setlocale(LC_ALL, 'de_DE.iso-8859-1');
 ...
 $doc->addField(Zend_Search_Lucene_Field::UnStored('contents', $contents));
 ]]></programlisting>
-        </para>
 
         <para>
             Fields are always stored and returned from the index in UTF-8 encoding. Any required
@@ -289,15 +289,15 @@ $doc->addField(Zend_Search_Lucene_Field::UnStored('contents', $contents));
             <classname>Zend_Search_Lucene</classname> offers a <acronym>HTML</acronym> parsing
             feature. Documents can be created directly from a <acronym>HTML</acronym> file or
             string:
+        </para>
 
-            <programlisting language="php"><![CDATA[
+        <programlisting language="php"><![CDATA[
 $doc = Zend_Search_Lucene_Document_Html::loadHTMLFile($filename);
 $index->addDocument($doc);
 ...
 $doc = Zend_Search_Lucene_Document_Html::loadHTML($htmlString);
 $index->addDocument($doc);
 ]]></programlisting>
-        </para>
 
         <para>
             <classname>Zend_Search_Lucene_Document_Html</classname> class uses the
@@ -347,8 +347,9 @@ $index->addDocument($doc);
 
         <para>
             Parsed documents may be augmented by the programmer with any other field:
+        </para>
 
-            <programlisting language="php"><![CDATA[
+        <programlisting language="php"><![CDATA[
 $doc = Zend_Search_Lucene_Document_Html::loadHTML($htmlString);
 $doc->addField(Zend_Search_Lucene_Field::UnIndexed('created',
                                                    time()));
@@ -358,19 +359,18 @@ $doc->addField(Zend_Search_Lucene_Field::Text('annotation',
                                               'Document annotation text'));
 $index->addDocument($doc);
 ]]></programlisting>
-        </para>
 
         <para>
             Document links are not included in the generated document, but may be retrieved with
             the <methodname>Zend_Search_Lucene_Document_Html::getLinks()</methodname> and
             <methodname>Zend_Search_Lucene_Document_Html::getHeaderLinks()</methodname> methods:
+        </para>
 
-            <programlisting language="php"><![CDATA[
+        <programlisting language="php"><![CDATA[
 $doc = Zend_Search_Lucene_Document_Html::loadHTML($htmlString);
 $linksArray = $doc->getLinks();
 $headerLinksArray = $doc->getHeaderLinks();
 ]]></programlisting>
-        </para>
 
         <para>
             Starting from Zend Framework 1.6 it's also possible to exclude links with
@@ -391,12 +391,12 @@ $headerLinksArray = $doc->getHeaderLinks();
         <para>
             <classname>Zend_Search_Lucene</classname> offers a Word 2007 parsing feature. Documents
             can be created directly from a Word 2007 file:
+        </para>
 
-            <programlisting language="php"><![CDATA[
+        <programlisting language="php"><![CDATA[
 $doc = Zend_Search_Lucene_Document_Docx::loadDocxFile($filename);
 $index->addDocument($doc);
 ]]></programlisting>
-        </para>
 
         <para>
             <classname>Zend_Search_Lucene_Document_Docx</classname> class uses the
@@ -468,8 +468,9 @@ $index->addDocument($doc);
 
         <para>
             Parsed documents may be augmented by the programmer with any other field:
+        </para>
 
-            <programlisting language="php"><![CDATA[
+        <programlisting language="php"><![CDATA[
 $doc = Zend_Search_Lucene_Document_Docx::loadDocxFile($filename);
 $doc->addField(Zend_Search_Lucene_Field::UnIndexed(
     'indexTime',
@@ -481,7 +482,6 @@ $doc->addField(Zend_Search_Lucene_Field::Text(
 );
 $index->addDocument($doc);
 ]]></programlisting>
-        </para>
 
     </sect2>
 
@@ -491,12 +491,12 @@ $index->addDocument($doc);
         <para>
             <classname>Zend_Search_Lucene</classname> offers a Powerpoint 2007 parsing feature.
             Documents can be created directly from a Powerpoint 2007 file:
+        </para>
 
-            <programlisting language="php"><![CDATA[
+        <programlisting language="php"><![CDATA[
 $doc = Zend_Search_Lucene_Document_Pptx::loadPptxFile($filename);
 $index->addDocument($doc);
 ]]></programlisting>
-        </para>
 
         <para>
             <classname>Zend_Search_Lucene_Document_Pptx</classname> class uses the
@@ -568,8 +568,9 @@ $index->addDocument($doc);
 
         <para>
             Parsed documents may be augmented by the programmer with any other field:
+        </para>
 
-            <programlisting language="php"><![CDATA[
+        <programlisting language="php"><![CDATA[
 $doc = Zend_Search_Lucene_Document_Pptx::loadPptxFile($filename);
 $doc->addField(Zend_Search_Lucene_Field::UnIndexed(
     'indexTime',
@@ -579,7 +580,6 @@ $doc->addField(Zend_Search_Lucene_Field::Text(
     'Document annotation text'));
 $index->addDocument($doc);
 ]]></programlisting>
-        </para>
     </sect2>
 
     <sect2 id="zend.search.lucene.index-creation.xlsx-documents">
@@ -587,12 +587,12 @@ $index->addDocument($doc);
         <para>
             <classname>Zend_Search_Lucene</classname> offers a Excel 2007 parsing feature. Documents
             can be created directly from a Excel 2007 file:
+        </para>
 
-            <programlisting language="php"><![CDATA[
+        <programlisting language="php"><![CDATA[
 $doc = Zend_Search_Lucene_Document_Xlsx::loadXlsxFile($filename);
 $index->addDocument($doc);
 ]]></programlisting>
-        </para>
 
         <para>
             <classname>Zend_Search_Lucene_Document_Xlsx</classname> class uses the
@@ -664,8 +664,9 @@ $index->addDocument($doc);
 
         <para>
             Parsed documents may be augmented by the programmer with any other field:
+        </para>
 
-            <programlisting language="php"><![CDATA[
+        <programlisting language="php"><![CDATA[
 $doc = Zend_Search_Lucene_Document_Xlsx::loadXlsxFile($filename);
 $doc->addField(Zend_Search_Lucene_Field::UnIndexed(
     'indexTime',
@@ -675,6 +676,5 @@ $doc->addField(Zend_Search_Lucene_Field::Text(
     'Document annotation text'));
 $index->addDocument($doc);
 ]]></programlisting>
-        </para>
     </sect2>
 </sect1>

+ 44 - 37
documentation/manual/en/module_specs/Zend_Search_Lucene-Queries.xml

@@ -11,11 +11,11 @@
     <para>
         User queries can be combined with queries created through the query <acronym>API</acronym>.
         Simply use the query parser to construct a query from a string:
+    </para>
 
-        <programlisting language="php"><![CDATA[
+    <programlisting language="php"><![CDATA[
 $query = Zend_Search_Lucene_Search_QueryParser::parse($queryString);
 ]]></programlisting>
-    </para>
 
     <sect2 id="zend.search.lucene.queries.exceptions">
         <title>Query Parser Exceptions</title>
@@ -42,15 +42,15 @@ $query = Zend_Search_Lucene_Search_QueryParser::parse($queryString);
             It's a good idea to catch
             <classname>Zend_Search_Lucene_Search_QueryParserException</classname>s and handle them
             appropriately:
+        </para>
 
-            <programlisting language="php"><![CDATA[
+        <programlisting language="php"><![CDATA[
 try {
     $query = Zend_Search_Lucene_Search_QueryParser::parse($queryString);
 } catch (Zend_Search_Lucene_Search_QueryParserException $e) {
     echo "Query syntax error: " . $e->getMessage() . "\n";
 }
 ]]></programlisting>
-        </para>
 
         <para>
             The same technique should be used for the find() method of a
@@ -100,14 +100,14 @@ $hits  = $index->find($query);
         <para>
             The term field is optional. <classname>Zend_Search_Lucene</classname> searches through
             all indexed fields in each document if the field is not specified:
+        </para>
 
-            <programlisting language="php"><![CDATA[
+        <programlisting language="php"><![CDATA[
 // Search for 'word1' in all indexed fields
 $term  = new Zend_Search_Lucene_Index_Term('word1');
 $query = new Zend_Search_Lucene_Search_Query_Term($term);
 $hits  = $index->find($query);
 ]]></programlisting>
-        </para>
     </sect2>
 
     <sect2 id="zend.search.lucene.queries.multiterm-query">
@@ -194,8 +194,9 @@ $hits  = $index->find($query);
 
         <para>
             It's also possible to specify terms list within MultiTerm query constructor:
+        </para>
 
-            <programlisting language="php"><![CDATA[
+        <programlisting language="php"><![CDATA[
 $terms = array(new Zend_Search_Lucene_Index_Term('word1'),
                new Zend_Search_Lucene_Index_Term('word2', 'author'),
                new Zend_Search_Lucene_Index_Term('word3'));
@@ -205,7 +206,6 @@ $query = new Zend_Search_Lucene_Search_Query_MultiTerm($terms, $signs);
 
 $hits  = $index->find($query);
 ]]></programlisting>
-        </para>
 
         <para>
             The <varname>$signs</varname> array contains information about the term type:
@@ -338,7 +338,9 @@ $hits  = $index->find($query);
 
         <para>
             It's also possible to specify subqueries list within Boolean query constructor:
-            <programlisting language="php"><![CDATA[
+        </para>
+
+        <programlisting language="php"><![CDATA[
 ...
 $subqueries = array($subquery1, $subquery2, $subquery3);
 $signs = array(true, null, false);
@@ -347,7 +349,6 @@ $query = new Zend_Search_Lucene_Search_Query_Boolean($subqueries, $signs);
 
 $hits  = $index->find($query);
 ]]></programlisting>
-        </para>
 
         <para>
             The <varname>$signs</varname> array contains information about the subquery type:
@@ -377,15 +378,19 @@ $hits  = $index->find($query);
         <para>
             Each query which uses boolean operators can be rewritten using signs notation and
             constructed using <acronym>API</acronym>. For example:
+        </para>
 
-            <programlisting language="querystring"><![CDATA[
+        <programlisting language="querystring"><![CDATA[
 word1 AND (word2 AND word3 AND NOT word4) OR word5
 ]]></programlisting>
+
+        <para>
             is equivalent to
-            <programlisting language="querystring"><![CDATA[
+        </para>
+
+        <programlisting language="querystring"><![CDATA[
 (+(word1) +(+word2 +word3 -word4)) (word5)
 ]]></programlisting>
-        </para>
     </sect2>
 
     <sect2 id="zend.search.lucene.queries.wildcard">
@@ -406,34 +411,34 @@ word1 AND (word2 AND word3 AND NOT word4) OR word5
 
         <para>
             Query string:
+        </para>
 
-            <programlisting language="querystring"><![CDATA[
+        <programlisting language="querystring"><![CDATA[
 field1:test*
 ]]></programlisting>
-        </para>
 
         <para>or</para>
 
         <para>
             Query construction by <acronym>API</acronym>:
+        </para>
 
-            <programlisting language="php"><![CDATA[
+        <programlisting language="php"><![CDATA[
 $pattern = new Zend_Search_Lucene_Index_Term('test*', 'field1');
 $query = new Zend_Search_Lucene_Search_Query_Wildcard($pattern);
 $hits  = $index->find($query);
 ]]></programlisting>
-        </para>
 
         <para>
             The term field is optional. <classname>Zend_Search_Lucene</classname> searches through
             all fields on each document if a field is not specified:
+        </para>
 
-            <programlisting language="php"><![CDATA[
+        <programlisting language="php"><![CDATA[
 $pattern = new Zend_Search_Lucene_Index_Term('test*');
 $query = new Zend_Search_Lucene_Search_Query_Wildcard($pattern);
 $hits  = $index->find($query);
 ]]></programlisting>
-        </para>
     </sect2>
 
     <sect2 id="zend.search.lucene.queries.fuzzy">
@@ -446,11 +451,13 @@ $hits  = $index->find($query);
 
         <para>
             Query string:
+        </para>
 
-            <programlisting language="querystring"><![CDATA[
+        <programlisting language="querystring"><![CDATA[
 field1:test~
 ]]></programlisting>
 
+        <para>
             This query matches documents containing 'test' 'text' 'best' words and others.
         </para>
 
@@ -458,13 +465,13 @@ field1:test~
 
         <para>
             Query construction by <acronym>API</acronym>:
+        </para>
 
-            <programlisting language="php"><![CDATA[
+        <programlisting language="php"><![CDATA[
 $term = new Zend_Search_Lucene_Index_Term('test', 'field1');
 $query = new Zend_Search_Lucene_Search_Query_Fuzzy($term);
 $hits  = $index->find($query);
 ]]></programlisting>
-        </para>
 
         <para>
             Optional similarity can be specified after "~" sign.
@@ -472,34 +479,34 @@ $hits  = $index->find($query);
 
         <para>
             Query string:
+        </para>
 
-            <programlisting language="querystring"><![CDATA[
+        <programlisting language="querystring"><![CDATA[
 field1:test~0.4
 ]]></programlisting>
-        </para>
 
         <para>or</para>
 
         <para>
             Query construction by <acronym>API</acronym>:
+        </para>
 
-            <programlisting language="php"><![CDATA[
+        <programlisting language="php"><![CDATA[
 $term = new Zend_Search_Lucene_Index_Term('test', 'field1');
 $query = new Zend_Search_Lucene_Search_Query_Fuzzy($term, 0.4);
 $hits  = $index->find($query);
 ]]></programlisting>
-        </para>
 
         <para>
             The term field is optional. <classname>Zend_Search_Lucene</classname> searches through
             all fields on each document if a field is not specified:
+        </para>
 
-            <programlisting language="php"><![CDATA[
+        <programlisting language="php"><![CDATA[
 $term = new Zend_Search_Lucene_Index_Term('test');
 $query = new Zend_Search_Lucene_Search_Query_Fuzzy($term);
 $hits  = $index->find($query);
 ]]></programlisting>
-        </para>
     </sect2>
 
     <sect2 id="zend.search.lucene.queries.phrase-query">
@@ -651,7 +658,7 @@ $query->addTerm(new Zend_Search_Lucene_Index_Term('framework'));
 
         <para>
             will search for the phrase 'zend framework'.
-         </para>
+        </para>
 
         <programlisting language="php"><![CDATA[
 $query = new Zend_Search_Lucene_Search_Query_Phrase();
@@ -722,19 +729,20 @@ $hits2 = $index->find($query);
 
         <para>
             Query string:
+        </para>
 
-            <programlisting language="querystring"><![CDATA[
+        <programlisting language="querystring"><![CDATA[
 mod_date:[20020101 TO 20030101]
 title:{Aida TO Carmen}
 ]]></programlisting>
-        </para>
 
         <para>or</para>
 
         <para>
             Query construction by <acronym>API</acronym>:
+        </para>
 
-            <programlisting language="php"><![CDATA[
+        <programlisting language="php"><![CDATA[
 $from = new Zend_Search_Lucene_Index_Term('20020101', 'mod_date');
 $to   = new Zend_Search_Lucene_Index_Term('20030101', 'mod_date');
 $query = new Zend_Search_Lucene_Search_Query_Range(
@@ -742,13 +750,13 @@ $query = new Zend_Search_Lucene_Search_Query_Range(
              );
 $hits  = $index->find($query);
 ]]></programlisting>
-        </para>
 
         <para>
             Term fields are optional. <classname>Zend_Search_Lucene</classname> searches through all
             fields if the field is not specified:
+        </para>
 
-            <programlisting language="php"><![CDATA[
+        <programlisting language="php"><![CDATA[
 $from = new Zend_Search_Lucene_Index_Term('Aida');
 $to   = new Zend_Search_Lucene_Index_Term('Carmen');
 $query = new Zend_Search_Lucene_Search_Query_Range(
@@ -756,14 +764,14 @@ $query = new Zend_Search_Lucene_Search_Query_Range(
              );
 $hits  = $index->find($query);
 ]]></programlisting>
-        </para>
 
         <para>
             Either (but not both) of the boundary terms may be set to <constant>NULL</constant>.
             <classname>Zend_Search_Lucene</classname> searches from the beginning or
             up to the end of the dictionary for the specified field(s) in this case:
+        </para>
 
-            <programlisting language="php"><![CDATA[
+        <programlisting language="php"><![CDATA[
 // searches for ['20020101' TO ...]
 $from = new Zend_Search_Lucene_Index_Term('20020101', 'mod_date');
 $query = new Zend_Search_Lucene_Search_Query_Range(
@@ -771,7 +779,6 @@ $query = new Zend_Search_Lucene_Search_Query_Range(
              );
 $hits  = $index->find($query);
 ]]></programlisting>
-        </para>
     </sect2>
 </sect1>
 <!--

+ 55 - 34
documentation/manual/en/module_specs/Zend_Search_Lucene-QueryLanguage.xml

@@ -103,11 +103,13 @@ title:"Do it right" AND go
         <para>
             Note: The field is only valid for the term, phrase or subquery that it directly
             precedes, so the query
+        </para>
 
-            <programlisting language="querystring"><![CDATA[
+        <programlisting language="querystring"><![CDATA[
 title:Do it right
 ]]></programlisting>
 
+        <para>
             Will only find "Do" in the title field. It will find "it" and "right" in the default
             field (if the default field is set) or in all indexed fields (if the default field is
             set to <constant>NULL</constant>).
@@ -134,28 +136,30 @@ title:Do it right
             The single character wildcard search looks for string that match the term with the "?"
             replaced by any single character. For example, to search for "text" or "test" you can
             use the search:
+        </para>
 
-            <programlisting language="querystring"><![CDATA[
+        <programlisting language="querystring"><![CDATA[
 te?t
 ]]></programlisting>
-        </para>
 
         <para>
             Multiple character wildcard searches look for 0 or more characters when matching strings
             against terms. For example, to search for test, tests or tester, you can use the search:
+        </para>
 
-            <programlisting language="querystring"><![CDATA[
+        <programlisting language="querystring"><![CDATA[
 test*
 ]]></programlisting>
-        </para>
 
         <para>
             You can use "?", "*" or both at any place of the term:
+        </para>
 
-            <programlisting language="querystring"><![CDATA[
+        <programlisting language="querystring"><![CDATA[
 *wr?t*
 ]]></programlisting>
 
+        <para>
             It searches for "write", "wrote", "written", "rewrite", "rewrote" and so on.
         </para>
 
@@ -202,19 +206,23 @@ test*
             between the lower and upper bound specified by the range query. Range Queries can be
             inclusive or exclusive of the upper and lower bounds. Sorting is performed
             lexicographically.
+        </para>
 
-            <programlisting language="querystring"><![CDATA[
+        <programlisting language="querystring"><![CDATA[
 mod_date:[20020101 TO 20030101]
 ]]></programlisting>
 
+        <para>
             This will find documents whose mod_date fields have values between 20020101 and
             20030101, inclusive. Note that Range Queries are not reserved for date fields. You could
             also use range queries with non-date fields:
+        </para>
 
-            <programlisting language="querystring"><![CDATA[
+        <programlisting language="querystring"><![CDATA[
 title:{Aida TO Carmen}
 ]]></programlisting>
 
+        <para>
             This will find all documents whose titles would be sorted between Aida and Carmen, but
             not including Aida and Carmen.
         </para>
@@ -227,11 +235,11 @@ title:{Aida TO Carmen}
         <para>
             If field is not specified then <classname>Zend_Search_Lucene</classname> searches for
             specified interval through all fields by default.
+        </para>
 
-            <programlisting language="querystring"><![CDATA[
+        <programlisting language="querystring"><![CDATA[
 {Aida TO Carmen}
 ]]></programlisting>
-        </para>
     </sect2>
 
     <sect2 id="zend.search.lucene.query-language.fuzzy">
@@ -242,19 +250,23 @@ title:{Aida TO Carmen}
             based on the Levenshtein Distance, or Edit Distance algorithm. To do a fuzzy search use
             the tilde, "~", symbol at the end of a Single word Term. For example to search for a
             term similar in spelling to "roam" use the fuzzy search:
+        </para>
 
-            <programlisting language="querystring"><![CDATA[
+        <programlisting language="querystring"><![CDATA[
 roam~
 ]]></programlisting>
 
+        <para>
             This search will find terms like foam and roams. Additional (optional) parameter can
             specify the required similarity. The value is between 0 and 1, with a value closer to 1
             only terms with a higher similarity will be matched. For example:
+        </para>
 
-            <programlisting language="querystring"><![CDATA[
+        <programlisting language="querystring"><![CDATA[
 roam~0.8
 ]]></programlisting>
 
+        <para>
             The default that is used if the parameter is not given is 0.5.
         </para>
     </sect2>
@@ -287,11 +299,11 @@ roam~0.8
             a string. To do a proximity search use the tilde, "~", symbol at the end of the phrase.
             For example to search for a "Zend" and "Framework" within 10 words of each other in a
             document use the search:
+        </para>
 
-            <programlisting language="querystring"><![CDATA[
+        <programlisting language="querystring"><![CDATA[
 "Zend Framework"~10
 ]]></programlisting>
-        </para>
     </sect2>
 
     <sect2 id="zend.search.lucene.query-language.boosting">
@@ -307,25 +319,31 @@ roam~0.8
         <para>
             Boosting allows you to control the relevance of a document by boosting individual terms.
             For example, if you are searching for
+        </para>
 
-            <programlisting language="querystring"><![CDATA[
+        <programlisting language="querystring"><![CDATA[
 PHP framework
 ]]></programlisting>
 
+        <para>
             and you want the term "PHP" to be more relevant boost it using the ^ symbol along with
             the boost factor next to the term. You would type:
+        </para>
 
-            <programlisting language="querystring"><![CDATA[
+        <programlisting language="querystring"><![CDATA[
 PHP^4 framework
 ]]></programlisting>
 
+        <para>
             This will make documents with the term <acronym>PHP</acronym> appear more relevant. You
             can also boost phrase terms and subqueries as in the example:
+        </para>
 
-            <programlisting language="querystring"><![CDATA[
+        <programlisting language="querystring"><![CDATA[
 "PHP framework"^4 "Zend Framework"
 ]]></programlisting>
 
+        <para>
             By default, the boost factor is 1. Although the boost factor must be positive,
             it may be less than 1 (e.g. 0.2).
         </para>
@@ -364,11 +382,11 @@ PHP^4 framework
             <para>
                 To search for documents that contain "PHP framework" and "Zend Framework" use the
                 query:
+            </para>
 
-                <programlisting language="querystring"><![CDATA[
+            <programlisting language="querystring"><![CDATA[
 "PHP framework" AND "Zend Framework"
 ]]></programlisting>
-            </para>
         </sect3>
 
         <sect3 id="zend.search.lucene.query-language.boolean.or">
@@ -381,11 +399,11 @@ PHP^4 framework
             <para>
                 To search for documents that contain "PHP framework" or "Zend Framework" use the
                 query:
+            </para>
 
-                <programlisting language="querystring"><![CDATA[
+            <programlisting language="querystring"><![CDATA[
 "PHP framework" OR "Zend Framework"
 ]]></programlisting>
-            </para>
         </sect3>
 
         <sect3 id="zend.search.lucene.query-language.boolean.not">
@@ -400,11 +418,11 @@ PHP^4 framework
             <para>
                 To search for documents that contain "PHP framework" but not "Zend Framework" use
                 the query:
+            </para>
 
-                <programlisting language="querystring"><![CDATA[
+            <programlisting language="querystring"><![CDATA[
 "PHP framework" AND NOT "Zend Framework"
 ]]></programlisting>
-            </para>
         </sect3>
 
         <sect3 id="zend.search.lucene.query-language.boolean.other-form">
@@ -426,11 +444,11 @@ PHP^4 framework
             <para>
                 To search for documents that must contain "Zend" and may contain "Framework" use the
                 query:
+            </para>
 
-                <programlisting language="querystring"><![CDATA[
+            <programlisting language="querystring"><![CDATA[
 +Zend Framework
 ]]></programlisting>
-            </para>
         </sect3>
 
         <sect3 id="zend.search.lucene.query-language.boolean.minus">
@@ -444,11 +462,11 @@ PHP^4 framework
             <para>
                 To search for documents that contain "PHP framework" but not "Zend Framework" use
                 the query:
+            </para>
 
-                <programlisting language="querystring"><![CDATA[
+            <programlisting language="querystring"><![CDATA[
 "PHP framework" -"Zend Framework"
 ]]></programlisting>
-            </para>
         </sect3>
 
         <sect3 id="zend.search.lucene.query-language.boolean.no-operator">
@@ -471,11 +489,11 @@ PHP^4 framework
             <para>
                 To search for documents that requires "PHP framework" and may contain "Zend
                 Framework" use the query:
+            </para>
 
-                <programlisting language="querystring"><![CDATA[
+            <programlisting language="querystring"><![CDATA[
 +"PHP framework" "Zend Framework"
 ]]></programlisting>
-            </para>
 
             <para>
                 The default boolean operator may be set or retrieved with the
@@ -500,10 +518,13 @@ PHP^4 framework
             Java Lucene and <classname>Zend_Search_Lucene</classname> support using parentheses to
             group clauses to form sub queries. This can be useful if you want to control the
             precedence of boolean logic operators for a query or mix different boolean query styles:
+        </para>
 
-            <programlisting language="querystring"><![CDATA[
+        <programlisting language="querystring"><![CDATA[
 +(framework OR library) +php
 ]]></programlisting>
+
+        <para>
             <classname>Zend_Search_Lucene</classname> supports subqueries nested to any level.
         </para>
     </sect2>
@@ -518,11 +539,11 @@ PHP^4 framework
         <para>
             To search for a title that contains both the word "return" and the phrase "pink panther"
             use the query:
+        </para>
 
-            <programlisting language="querystring"><![CDATA[
+        <programlisting language="querystring"><![CDATA[
 title:(+return +"pink panther")
 ]]></programlisting>
-        </para>
     </sect2>
 
     <sect2 id="zend.search.lucene.query-language.escaping">
@@ -544,10 +565,10 @@ title:(+return +"pink panther")
         <para>
             For other instances of these characters use the \ before each special character you'd
             like to escape. For example to search for (1+1):2 use the query:
+        </para>
 
-            <programlisting language="querystring"><![CDATA[
+        <programlisting language="querystring"><![CDATA[
 \(1\+1\)\:2
 ]]></programlisting>
-        </para>
     </sect2>
 </sect1>

+ 27 - 21
documentation/manual/en/module_specs/Zend_Search_Lucene-Searching.xml

@@ -110,8 +110,9 @@ $index->find($query);
             <para>
                 Actually, in some cases it's the only way to search for values within untokenized
                 fields:
+            </para>
 
-                <programlisting language="php"><![CDATA[
+            <programlisting language="php"><![CDATA[
 $userQuery = Zend_Search_Lucene_Search_QueryParser::parse($queryStr);
 
 $pathTerm  = new Zend_Search_Lucene_Index_Term(
@@ -125,17 +126,16 @@ $query->addSubquery($pathQuery, true /* required */);
 
 $hits = $index->find($query);
 ]]></programlisting>
-            </para>
 
             <para>
                 <methodname>Zend_Search_Lucene_Search_QueryParser::parse()</methodname> method also
                 takes an optional encoding parameter, which can specify query string encoding:
+            </para>
 
-                <programlisting language="php"><![CDATA[
+            <programlisting language="php"><![CDATA[
 $userQuery = Zend_Search_Lucene_Search_QueryParser::parse($queryStr,
                                                           'iso-8859-5');
 ]]></programlisting>
-            </para>
 
             <para>
                 If the encoding parameter is omitted, then current locale is used.
@@ -145,13 +145,13 @@ $userQuery = Zend_Search_Lucene_Search_QueryParser::parse($queryStr,
                 It's also possible to specify the default query string encoding with
                 <methodname>Zend_Search_Lucene_Search_QueryParser::setDefaultEncoding()</methodname>
                 method:
+            </para>
 
-                <programlisting language="php"><![CDATA[
+            <programlisting language="php"><![CDATA[
 Zend_Search_Lucene_Search_QueryParser::setDefaultEncoding('iso-8859-5');
 ...
 $userQuery = Zend_Search_Lucene_Search_QueryParser::parse($queryStr);
 ]]></programlisting>
-            </para>
 
             <para>
                 <methodname>Zend_Search_Lucene_Search_QueryParser::getDefaultEncoding()</methodname>
@@ -248,13 +248,15 @@ foreach ($hits as $hit) {
             <classname>Zend_Search_Lucene</classname> gives the possibility to limit result set size
             with <methodname>getResultSetLimit()</methodname> and
             <methodname>setResultSetLimit()</methodname> methods:
+        </para>
 
-            <programlisting language="php"><![CDATA[
+        <programlisting language="php"><![CDATA[
 $currentResultSetLimit = Zend_Search_Lucene::getResultSetLimit();
 
 Zend_Search_Lucene::setResultSetLimit($newLimit);
 ]]></programlisting>
 
+        <para>
             The default value of 0 means 'no limit'.
         </para>
 
@@ -316,13 +318,13 @@ foreach ($hits as $hit) {
 
         <para>
             <code>$index->find()</code> call may take several optional parameters:
+        </para>
 
-            <programlisting language="php"><![CDATA[
+        <programlisting language="php"><![CDATA[
 $index->find($query [, $sortField [, $sortType [, $sortOrder]]]
                     [, $sortField2 [, $sortType [, $sortOrder]]]
              ...);
 ]]></programlisting>
-        </para>
 
         <para>
              A name of stored field by which to sort result should be passed as the
@@ -344,17 +346,19 @@ $index->find($query [, $sortField [, $sortType [, $sortOrder]]]
 
         <para>
             Examples:
+        </para>
 
-            <programlisting language="php"><![CDATA[
+        <programlisting language="php"><![CDATA[
 $index->find($query, 'quantity', SORT_NUMERIC, SORT_DESC);
 ]]></programlisting>
-            <programlisting language="php"><![CDATA[
+
+        <programlisting language="php"><![CDATA[
 $index->find($query, 'fname', SORT_STRING, 'lname', SORT_STRING);
 ]]></programlisting>
-            <programlisting language="php"><![CDATA[
+
+        <programlisting language="php"><![CDATA[
 $index->find($query, 'name', SORT_STRING, 'quantity', SORT_NUMERIC, SORT_DESC);
 ]]></programlisting>
-        </para>
 
         <para>
             Please use caution when using a non-default search order; the query needs to retrieve
@@ -374,8 +378,9 @@ $index->find($query, 'name', SORT_STRING, 'quantity', SORT_NUMERIC, SORT_DESC);
             The first one is utilizing <classname>Zend_Search_Lucene_Document_Html</classname> class
             (see <link linkend="zend.search.lucene.index-creation.html-documents">HTML documents
                 section</link> for details) using the following methods:
+        </para>
 
-            <programlisting language="php"><![CDATA[
+        <programlisting language="php"><![CDATA[
 /**
  * Highlight text with specified color
  *
@@ -386,7 +391,7 @@ $index->find($query, 'name', SORT_STRING, 'quantity', SORT_NUMERIC, SORT_DESC);
 public function highlight($words, $colour = '#66ffff');
 ]]></programlisting>
 
-            <programlisting language="php"><![CDATA[
+        <programlisting language="php"><![CDATA[
 /**
  * Highlight text using specified View helper or callback function.
  *
@@ -402,7 +407,6 @@ public function highlight($words, $colour = '#66ffff');
  */
 public function highlightExtended($words, $callback, $params = array())
 ]]></programlisting>
-        </para>
 
         <para>
             To customize highlighting behavior use <methodname>highlightExtended()</methodname>
@@ -430,11 +434,11 @@ public function highlightExtended($words, $callback, $params = array())
         <para>
             <link linkend="zend.view.helpers">View helpers</link> also can be used as callbacks in
             context of view script:
+        </para>
 
-            <programlisting language="php"><![CDATA[
+        <programlisting language="php"><![CDATA[
 $doc->highlightExtended('word1 word2 word3...', array($this, 'myViewHelper'));
 ]]></programlisting>
-        </para>
 
         <para>
             The result of highlighting operation is retrieved by
@@ -469,12 +473,12 @@ $doc->highlightExtended('word1 word2 word3...', array($this, 'myViewHelper'));
             <code>Zend_Search_Lucene_Search_Query->highlightMatches(string $inputHTML[,
                 $defaultEncoding = 'UTF-8'[,
                 Zend_Search_Lucene_Search_Highlighter_Interface $highlighter]])</code> method:
+        </para>
 
-            <programlisting language="php"><![CDATA[
+        <programlisting language="php"><![CDATA[
 $query = Zend_Search_Lucene_Search_QueryParser::parse($queryStr);
 $highlightedHTML = $query->highlightMatches($sourceHTML);
 ]]></programlisting>
-        </para>
 
         <para>
             Optional second parameter is a default <acronym>HTML</acronym> document encoding. It's
@@ -484,8 +488,9 @@ $highlightedHTML = $query->highlightMatches($sourceHTML);
         <para>
             Optional third parameter is a highlighter object which has to implement
             <classname>Zend_Search_Lucene_Search_Highlighter_Interface</classname> interface:
+        </para>
 
-            <programlisting language="php"><![CDATA[
+        <programlisting language="php"><![CDATA[
 interface Zend_Search_Lucene_Search_Highlighter_Interface
 {
     /**
@@ -512,6 +517,7 @@ interface Zend_Search_Lucene_Search_Highlighter_Interface
 }
 ]]></programlisting>
 
+        <para>
             Where <classname>Zend_Search_Lucene_Document_Html</classname> object is an object
             constructed from the source <acronym>HTML</acronym> provided to the
             <classname>Zend_Search_Lucene_Search_Query->highlightMatches()</classname> method.

+ 4 - 3
documentation/manual/en/module_specs/Zend_Service_StrikeIron-AdvancedUses.xml

@@ -23,8 +23,9 @@
             To try a StrikeIron service that does not have a wrapper class available,
             give the <code>wsdl</code> option to <methodname>getService()</methodname>
             instead of the <code>class</code> option:
+        </para>
 
-            <programlisting language="php"><![CDATA[
+        <programlisting language="php"><![CDATA[
 $strikeIron = new Zend_Service_StrikeIron(array('username' => 'your-username',
                                                 'password' => 'your-password'));
 
@@ -38,7 +39,6 @@ echo $result->listingName;
 
 // Zend Technologies USA Inc
 ]]></programlisting>
-        </para>
 
         <para>
             Using StrikeIron services from the WSDL will require at least some understanding
@@ -90,8 +90,9 @@ echo $result->listingName;
                 url="http://www.php.net/manual/en/function.soap-soapclient-getlastrequest.php"><methodname>__getLastRequest()</methodname></ulink>
             and <ulink
                 url="http://www.php.net/manual/en/function.soap-soapclient-getlastresponse.php"><methodname>__getLastRequest()</methodname></ulink>:
+        </para>
 
-            <programlisting language="php"><![CDATA[
+        <programlisting language="php"><![CDATA[
 $strikeIron =
     new Zend_Service_StrikeIron(array('username' => 'your-username',
                                       'password' => 'your-password',

+ 6 - 6
documentation/manual/en/module_specs/Zend_Service_StrikeIron-BundledServices.xml

@@ -35,8 +35,9 @@
 
             The service contains a <methodname>getZipCode()</methodname> method that will retrieve
             information about a United States ZIP code or Canadian postal code:
+        </para>
 
-            <programlisting language="php"><![CDATA[
+        <programlisting language="php"><![CDATA[
 $strikeIron = new Zend_Service_StrikeIron(array('username' => 'your-username',
                                                 'password' => 'your-password'));
 
@@ -73,7 +74,6 @@ if ($zips->count == 0) {
 // http://www.strikeiron.com/exampledata/StrikeIronZipCodeInformation_v3.pdf
 $status = $response->serviceStatus;
 ]]></programlisting>
-        </para>
     </sect2>
 
     <sect2 id="zend.service.strikeiron.bundled-services.us-address-verification">
@@ -105,8 +105,9 @@ $status = $response->serviceStatus;
         <para>
             The service contains a <methodname>verifyAddressUSA()</methodname> method that will
             verify an address in the United States:
+        </para>
 
-            <programlisting language="php"><![CDATA[
+        <programlisting language="php"><![CDATA[
 $strikeIron = new Zend_Service_StrikeIron(array('username' => 'your-username',
                                                 'password' => 'your-password'));
 
@@ -138,7 +139,6 @@ if ($result->addressErrorNumber != 0) {
     $valid = ($result->valid == 'VALID');
 }
 ]]></programlisting>
-        </para>
     </sect2>
 
     <sect2 id="zend.service.strikeiron.bundled-services.sales-use-tax-basic">
@@ -171,8 +171,9 @@ if ($result->addressErrorNumber != 0) {
             The service contains two methods, <methodname>getTaxRateUSA()</methodname> and
             <methodname>getTaxRateCanada()</methodname>, that will retrieve sales and use tax data
             for the United States and Canada, respectively.
+        </para>
 
-            <programlisting language="php"><![CDATA[
+        <programlisting language="php"><![CDATA[
 $strikeIron = new Zend_Service_StrikeIron(array('username' => 'your-username',
                                                 'password' => 'your-password'));
 
@@ -189,6 +190,5 @@ $rateInfo = $taxBasic->getTaxRateUS(array('zip_code' => 95014));
 print_r($rateInfo);               // show all properties
 echo $rateInfo->state_sales_tax;  // or just the state sales tax
 ]]></programlisting>
-        </para>
     </sect2>
 </sect1>

+ 12 - 7
documentation/manual/en/module_specs/Zend_Service_StrikeIron-Overview.xml

@@ -172,14 +172,14 @@
             of specifying your StrikeIron account information and other options in
             its constructor. It also has a factory method that will return clients
             for StrikeIron services:
+        </para>
 
-            <programlisting language="php"><![CDATA[
+        <programlisting language="php"><![CDATA[
 $strikeIron = new Zend_Service_StrikeIron(array('username' => 'your-username',
                                                 'password' => 'your-password'));
 
 $taxBasic = $strikeIron->getService(array('class' => 'SalesUseTaxBasic'));
 ]]></programlisting>
-        </para>
 
         <para>
             The <methodname>getService()</methodname> method will return a client for any
@@ -206,8 +206,9 @@ $taxBasic = $strikeIron->getService(array('class' => 'SalesUseTaxBasic'));
             Once you have used the <methodname>getService()</methodname> method to get a client
             for a particular StrikeIron service, you can utilize that client
             by calling methods on it just like any other <acronym>PHP</acronym> object.
+        </para>
 
-            <programlisting language="php"><![CDATA[
+        <programlisting language="php"><![CDATA[
 $strikeIron = new Zend_Service_StrikeIron(array('username' => 'your-username',
                                                 'password' => 'your-password'));
 
@@ -221,6 +222,7 @@ echo $rateInfo->abbreviation;
 echo $rateInfo->GST;
 ]]></programlisting>
 
+        <para>
             In the example above, the <methodname>getService()</methodname> method is used
             to return a client to the <link
                 linkend="zend.service.strikeiron.bundled-services.sales-use-tax-basic">Sales &amp;
@@ -262,8 +264,9 @@ echo $rateInfo->GST;
             The simplest way to examine a result from the service is to use the built-in
             <acronym>PHP</acronym> functions like <ulink
                 url="http://www.php.net/print_r">print_r()</ulink>:
+        </para>
 
-            <programlisting language="php"><![CDATA[
+        <programlisting language="php"><![CDATA[
 <?php
 $strikeIron = new Zend_Service_StrikeIron(array('username' => 'your-username',
                                                 'password' => 'your-password'));
@@ -288,7 +291,6 @@ Zend_Service_StrikeIron_Decorator Object
         )
 )
 ]]></programlisting>
-        </para>
 
         <para>
             In the output above, we see that the decorator (<varname>$rateInfo</varname>) wraps an
@@ -333,8 +335,9 @@ Zend_Service_StrikeIron_Decorator Object
             An exception will be thrown when such a fault occurs. You should
             anticipate and catch these exceptions when making method calls to the
             service:
+        </para>
 
-            <programlisting language="php"><![CDATA[
+        <programlisting language="php"><![CDATA[
 $strikeIron = new Zend_Service_StrikeIron(array('username' => 'your-username',
                                                 'password' => 'your-password'));
 
@@ -352,6 +355,7 @@ try {
 }
 ]]></programlisting>
 
+        <para>
             The exceptions thrown will always be
             <classname>Zend_Service_StrikeIron_Exception</classname>.
         </para>
@@ -391,8 +395,9 @@ try {
             Each StrikeIron client returned by the <code>getService</code> method
             has the ability to check the subscription status for that service using
             the <methodname>getSubscriptionInfo()</methodname> method of the client:
+        </para>
 
-            <programlisting language="php"><![CDATA[
+        <programlisting language="php"><![CDATA[
 // Get a client for the Sales & Use Tax Basic service
 $strikeIron = new Zend_Service_StrikeIron(array('username' => 'your-username',
                                                 'password' => 'your-password'));

+ 2 - 0
documentation/manual/en/module_specs/Zend_Service_Twitter.xml

@@ -660,6 +660,7 @@ $response   = $twitter->friendship->destroy('myoldfriend');
 
                 <example id="zend.service.twitter.friendship.exists">
                     <title>Checking friend existence</title>
+
                     <programlisting language="php"><![CDATA[
 $twitter    = new Zend_Service_Twitter('myusername', 'mysecretpassword');
 $response   = $twitter->friendship->exists('myfriend');
@@ -718,6 +719,7 @@ $response   = $twitter->favorite->favorites();
 
                 <example id="zend.service.twitter.favorite.create">
                     <title>Creating favorites</title>
+
                     <programlisting language="php"><![CDATA[
 $twitter    = new Zend_Service_Twitter('myusername', 'mysecretpassword');
 $response   = $twitter->favorite->create(12351);

+ 3 - 2
documentation/manual/en/module_specs/Zend_Session-AdvancedUsage.xml

@@ -49,10 +49,11 @@ Zend_Session::start();
                     equivalent), and the setting is already enabled in <code>php.ini</code>, then
                     add the following to your <code>.htaccess</code> file (usually in your
                     <acronym>HTML</acronym> document root directory):
-                    <programlisting language="httpd.conf"><![CDATA[
+                </para>
+
+                <programlisting language="httpd.conf"><![CDATA[
 php_value session.auto_start 0
 ]]></programlisting>
-                </para>
             </listitem>
 
             <listitem>

+ 3 - 1
documentation/manual/en/module_specs/Zend_Session-BasicUsage.xml

@@ -19,13 +19,15 @@
     <para>
         Each instance of <classname>Zend_Session_Namespace</classname> corresponds to an entry of
         the <varname>$_SESSION</varname> superglobal array, where the namespace is used as the key.
+    </para>
 
-        <programlisting language="php"><![CDATA[
+    <programlisting language="php"><![CDATA[
 $myNamespace = new Zend_Session_Namespace('myNamespace');
 
 // $myNamespace corresponds to $_SESSION['myNamespace']
 ]]></programlisting>
 
+    <para>
         It is possible to use <classname>Zend_Session</classname> in conjunction with other code
         that uses <varname>$_SESSION</varname> directly. To avoid problems, however, it is highly
         recommended that such code only uses parts of <varname>$_SESSION</varname> that do not

+ 8 - 12
documentation/manual/en/module_specs/Zend_Soap_AutoDiscovery.xml

@@ -97,8 +97,9 @@
             Here is an example of common usage of the autodiscovery functionality. The
             <methodname>handle()</methodname> function generates the WSDL file and posts it to the
             browser.
+        </para>
 
-            <programlisting language="php"><![CDATA[
+        <programlisting language="php"><![CDATA[
 class My_SoapServer_Class {
 ...
 }
@@ -107,7 +108,6 @@ $autodiscover = new Zend_Soap_AutoDiscover();
 $autodiscover->setClass('My_SoapServer_Class');
 $autodiscover->handle();
 ]]></programlisting>
-        </para>
 
         <para>
             If you need access to the generated WSDL file either to save it to a file or as an
@@ -134,8 +134,7 @@ $autodiscover->handle();
                 requests.
             </para>
 
-            <para>
-                <programlisting language="php"><![CDATA[
+            <programlisting language="php"><![CDATA[
 if(isset($_GET['wsdl'])) {
     $autodiscover = new Zend_Soap_AutoDiscover();
     $autodiscover->setClass('HelloWorldService');
@@ -147,7 +146,6 @@ if(isset($_GET['wsdl'])) {
     $soap->handle();
 }
 ]]></programlisting>
-            </para>
         </note>
     </sect2>
 
@@ -157,13 +155,13 @@ if(isset($_GET['wsdl'])) {
         <para>
             If class is used to provide SOAP server functionality, then the same class should be
             provided to <classname>Zend_Soap_AutoDiscover</classname> for WSDL generation:
+        </para>
 
-            <programlisting language="php"><![CDATA[
+        <programlisting language="php"><![CDATA[
 $autodiscover = new Zend_Soap_AutoDiscover();
 $autodiscover->setClass('My_SoapServer_Class');
 $autodiscover->handle();
 ]]></programlisting>
-        </para>
 
         <para>
             The following rules are used while WSDL generation:
@@ -241,8 +239,9 @@ $autodiscover->handle();
             If set of functions are used to provide SOAP server functionality, then the same set
             should be provided to <classname>Zend_Soap_AutoDiscovery</classname> for WSDL
             generation:
+        </para>
 
-            <programlisting language="php"><![CDATA[
+        <programlisting language="php"><![CDATA[
 $autodiscover = new Zend_Soap_AutoDiscover();
 $autodiscover->addFunction('function1');
 $autodiscover->addFunction('function2');
@@ -250,7 +249,6 @@ $autodiscover->addFunction('function3');
 ...
 $autodiscover->handle();
 ]]></programlisting>
-        </para>
 
         <para>
             The following rules are used while WSDL generation:
@@ -414,8 +412,7 @@ $autodiscover->handle();
             or <code>addFunction</code> method on the AutoDiscover class.
         </para>
 
-        <para>
-            <programlisting language="php"><![CDATA[
+        <programlisting language="php"><![CDATA[
 $autodiscover = new Zend_Soap_AutoDiscover();
 // Default is 'use' => 'encoded' and
 // 'encodingStyle' => 'http://schemas.xmlsoap.org/soap/encoding/'
@@ -434,6 +431,5 @@ $autodiscover->setBindingStyle(
 $autodiscover->addFunction('myfunc1');
 $autodiscover->handle();
 ]]></programlisting>
-        </para>
     </sect2>
 </sect1>

+ 4 - 4
documentation/manual/en/module_specs/Zend_Soap_Client.xml

@@ -157,8 +157,9 @@
                         <constant>SOAP_COMPRESSION_GZIP</constant> and
                         <constant>SOAP_COMPRESSION_DEFLATE</constant> options which may be used like
                         this:
+                    </para>
 
-                        <programlisting language="php"><![CDATA[
+                    <programlisting language="php"><![CDATA[
 // Accept response compression
 $client = new Zend_Soap_Client("some.wsdl",
   array('compression' => SOAP_COMPRESSION_ACCEPT));
@@ -173,7 +174,6 @@ $client = new Zend_Soap_Client("some.wsdl",
 $client = new Zend_Soap_Client("some.wsdl",
   array('compression' => SOAP_COMPRESSION_ACCEPT | SOAP_COMPRESSION_DEFLATE));
 ]]></programlisting>
-                    </para>
                 </listitem>
             </itemizedlist>
         </para>
@@ -194,8 +194,9 @@ $client = new Zend_Soap_Client("some.wsdl",
 
         <para>
             Use it like in the following example:
+        </para>
 
-            <programlisting language="php"><![CDATA[
+        <programlisting language="php"><![CDATA[
 //****************************************************************
 //                Server code
 //****************************************************************
@@ -243,6 +244,5 @@ $result1 = $client->method1(10);
 // $result2 is a float
 $result2 = $client->method2(22, 'some string');
 ]]></programlisting>
-        </para>
     </sect2>
 </sect1>

+ 19 - 19
documentation/manual/en/module_specs/Zend_Soap_Server.xml

@@ -206,8 +206,9 @@
         <para>
             The first one is to attach some class to the <classname>Zend_Soap_Server</classname>
             object which has to completely describe Web Service <acronym>API</acronym>:
+        </para>
 
-            <programlisting language="php"><![CDATA[
+        <programlisting language="php"><![CDATA[
 ...
 class MyClass {
     /**
@@ -243,22 +244,22 @@ $server->setObject(new MyClass());
 $server->handle();
 ]]></programlisting>
 
-            <note>
-                <title>Important!</title>
+        <note>
+            <title>Important!</title>
 
-                <para>
-                    You should completely describe each method using method docblock if you plan to
-                    use autodiscover functionality to prepare corresponding Web Service WSDL.
-                </para>
-            </note>
-        </para>
+            <para>
+                You should completely describe each method using method docblock if you plan to
+                use autodiscover functionality to prepare corresponding Web Service WSDL.
+            </para>
+        </note>
 
         <para>
             The second method of defining Web Service <acronym>API</acronym> is using set of
             functions and <methodname>addFunction()</methodname> or
             <methodname>loadFunctions()</methodname> methods:
+        </para>
 
-            <programlisting language="php"><![CDATA[
+        <programlisting language="php"><![CDATA[
 ...
 /**
  * This function ...
@@ -287,7 +288,6 @@ $server->addFunction('function2');
 ...
 $server->handle();
 ]]></programlisting>
-        </para>
     </sect2>
 
     <sect2 id="zend.soap.server.request_response">
@@ -315,8 +315,9 @@ $server->handle();
                 standard input stream ('php://input'). It may be overridden either by supplying
                 optional parameter to the <methodname>handle()</methodname> method or by setting
                 request using <methodname>setRequest()</methodname> method:
+            </para>
 
-                <programlisting language="php"><![CDATA[
+            <programlisting language="php"><![CDATA[
 ...
 $server = new Zend_Soap_Server(...);
 ...
@@ -327,7 +328,6 @@ $server->handle($request);
 $server->setRequest();
 $server->handle();
 ]]></programlisting>
-            </para>
 
             <para>
                 Request object may be represented using any of the following:
@@ -370,15 +370,15 @@ $server->handle();
                 Last processed request may be retrieved using
                 <methodname>getLastRequest()</methodname> method as an <acronym>XML</acronym>
                 string:
+            </para>
 
-                <programlisting language="php"><![CDATA[
+            <programlisting language="php"><![CDATA[
 ...
 $server = new Zend_Soap_Server(...);
 ...
 $server->handle();
 $request = $server->getLastRequest();
 ]]></programlisting>
-            </para>
         </sect3>
 
         <sect3 id="zend.soap.server.request_response.response">
@@ -399,8 +399,9 @@ $request = $server->getLastRequest();
 
                 Generated response is returned by <methodname>handle()</methodname> method in this
                 case.
+            </para>
 
-                <programlisting language="php"><![CDATA[
+            <programlisting language="php"><![CDATA[
 ...
 $server = new Zend_Soap_Server(...);
 ...
@@ -411,13 +412,13 @@ $server->setReturnResponse(true);
 $response = $server->handle();
 ...
 ]]></programlisting>
-            </para>
 
             <para>
                 Last response may be also retrieved by <methodname>getLastResponse()</methodname>
                 method for some post-processing:
+            </para>
 
-                <programlisting language="php"><![CDATA[
+            <programlisting language="php"><![CDATA[
 ...
 $server = new Zend_Soap_Server(...);
 ...
@@ -425,7 +426,6 @@ $server->handle();
 $response = $server->getLastResponse();
 ...
 ]]></programlisting>
-            </para>
         </sect3>
     </sect2>
 </sect1>

+ 2 - 2
documentation/manual/en/module_specs/Zend_Soap_Wsdl.xml

@@ -430,8 +430,9 @@
             <para>
                 <methodname>getType($type)</methodname> method may be used to get mapping for a
                 specified <acronym>PHP</acronym> type:
+            </para>
 
-               <programlisting language="php"><![CDATA[
+            <programlisting language="php"><![CDATA[
 ...
 $wsdl = new Zend_Soap_Wsdl('My_Web_Service', $myWebServiceUri);
 
@@ -445,7 +446,6 @@ class MyClass {
 ...
 $soapMyClassType = $wsdl->getType('MyClass');
 ]]></programlisting>
-            </para>
         </sect3>
 
         <sect3 id="zend.soap.wsdl.types.add_complex">

+ 3 - 2
documentation/manual/en/module_specs/Zend_Tool-Extending.xml

@@ -291,9 +291,10 @@
                     Assuming you want to put the link inside <filename>/usr/local/bin</filename>
                     (this could also work for placing the link inside
                     <filename>/home/username/bin/</filename> for example) you would issue a
-                    command similar to this: </para>
+                    command similar to this:
+                </para>
 
-                    <programlisting language="sh"><![CDATA[
+                <programlisting language="sh"><![CDATA[
 ln -s /usr/local/share/ZendFramework/bin/zf.sh /usr/local/bin/zf
 
 # OR (for example)

+ 0 - 1
documentation/manual/en/module_specs/Zend_Tool-Usage-CLI.xml

@@ -363,7 +363,6 @@ zf create form Comment -m Blog
                 The following will have to be run on the command line:
             </para>
 
-
             <programlisting language="text"><![CDATA[
 zf configure dbadapter "adapter=Pdo_Mysql&username=test&password=test&dbname=test"
 ]]></programlisting>

+ 3 - 2
documentation/manual/en/module_specs/Zend_Tool_Framework-CliTool.xml

@@ -145,9 +145,10 @@
             Assuming you want to put the link inside <filename>/usr/local/bin</filename>
             (this could also work for placing the link inside
             <filename>/home/username/bin/</filename> for example) you would issue a
-            command similar to this: </para>
+            command similar to this:
+        </para>
 
-            <programlisting language="sh"><![CDATA[
+        <programlisting language="sh"><![CDATA[
 ln -s /usr/local/share/ZendFramework/bin/zf.sh /usr/local/bin/zf
 
 # OR (for example)

+ 1 - 1
documentation/manual/en/module_specs/Zend_Tool_Framework-WritingProviders.xml

@@ -189,7 +189,7 @@ class My_Component_HelloProvider
                 would probably do this in OO code:
             </para>
 
-        <programlisting language="php"><![CDATA[
+            <programlisting language="php"><![CDATA[
 class My_Component_HelloProvider
     implements Zend_Tool_Framework_Provider_Interface
 {

+ 13 - 4
documentation/manual/en/module_specs/Zend_Translate-Using.xml

@@ -9,6 +9,7 @@
 
     <example id="zend.translate.using.example1">
         <title>Example of single-language PHP code</title>
+
         <programlisting language="php"><![CDATA[
 print "Example\n";
 print "=======\n";
@@ -68,8 +69,9 @@ print $translate->_("Here is line two") . "\n";
 
     <para>
         Create a new <classname>Zend_Translate</classname> object and define the base adapter:
+    </para>
 
-        <programlisting language="php"><![CDATA[
+    <programlisting language="php"><![CDATA[
 $translate = new Zend_Translate
     array(
         'adapter' => 'gettext',
@@ -79,6 +81,7 @@ $translate = new Zend_Translate
 );
 ]]></programlisting>
 
+    <para>
         In this example we chose the
         <emphasis>Gettext Adapter</emphasis>.
         We place our file <emphasis>source-de.mo</emphasis>
@@ -91,13 +94,15 @@ $translate = new Zend_Translate
         The next step is to wrap all strings which are to be translated.
         The simplest approach is to have only simple strings or sentences
         like this:
+    </para>
 
-        <programlisting language="php"><![CDATA[
+    <programlisting language="php"><![CDATA[
 print $translate->_("Example") . "\n";
 print "=======\n";
 print $translate->_("Here is line one") . "\n";
 ]]></programlisting>
 
+    <para>
         Some strings do not needed to be translated.
         The separating line is always a separating line,
         even in other languages.
@@ -106,11 +111,13 @@ print $translate->_("Here is line one") . "\n";
     <para>
         Having data values integrated into a translation string is also
         supported through the use of embedded parameters.
+    </para>
 
-        <programlisting language="php"><![CDATA[
+    <programlisting language="php"><![CDATA[
 printf($translate->_("Today is the %1\$s") . "\n", date("d.m.Y"));
 ]]></programlisting>
 
+    <para>
         Instead of <methodname>print()</methodname>, use the <methodname>printf()</methodname>
         function and replace all parameters with <code>%1\$s</code> parts.
         The first is <code>%1\$s</code>, the second is <code>%2\$s</code>,
@@ -123,13 +130,15 @@ printf($translate->_("Today is the %1\$s") . "\n", date("d.m.Y"));
     <para>
         Each string is identified in the translation storage by a message ID.
         You can use message IDs instead of strings in your code, like this:
+    </para>
 
-        <programlisting language="php"><![CDATA[
+    <programlisting language="php"><![CDATA[
 print $translate->_(1) . "\n";
 print "=======\n";
 print $translate->_(2) . "\n";
 ]]></programlisting>
 
+    <para>
         But doing this has several disadvantages:
     </para>
 

+ 2 - 2
documentation/manual/en/module_specs/Zend_Validate-PostCode.xml

@@ -88,7 +88,7 @@ $validator->setFormat('AT-\d{5}');
             <classname>Zend_Validate_PostCode</classname>.
         </para>
 
-    <programlisting language="php"><![CDATA[
+        <programlisting language="php"><![CDATA[
 $validator = new Zend_Validate_PostCode('de_AT');
 $validator = new Zend_Validate_PostCode($locale);
 ]]></programlisting>
@@ -99,7 +99,7 @@ $validator = new Zend_Validate_PostCode($locale);
             "format"; these will be used to set the appropriate values in the validator object.
         </para>
 
-    <programlisting language="php"><![CDATA[
+        <programlisting language="php"><![CDATA[
 $validator = new Zend_Validate_PostCode(array(
     'locale' => 'de_AT',
     'format' => 'AT_\d+'

+ 5 - 3
documentation/manual/en/module_specs/Zend_Validate-ValidatorChains.xml

@@ -8,8 +8,9 @@
         following code demonstrates a way to solve the example from the
         <link linkend="zend.validate.introduction">introduction</link>, where a username must be
         between 6 and 12 alphanumeric characters:
+    </para>
 
-        <programlisting language="php"><![CDATA[
+    <programlisting language="php"><![CDATA[
 // Create a validator chain and add validators to it
 $validatorChain = new Zend_Validate();
 $validatorChain->addValidator(
@@ -28,6 +29,7 @@ if ($validatorChain->isValid($username)) {
 }
 ]]></programlisting>
 
+    <para>
         Validators are run in the order they were added to <classname>Zend_Validate</classname>. In
         the above example, the username is first checked to ensure that its length is between 6 and
         12 characters, and then it is checked to ensure that it contains only alphanumeric
@@ -46,15 +48,15 @@ if ($validatorChain->isValid($username)) {
         are determined to be unnecessary or inappropriate for the situation. If the above example
         were written as follows, then the alphanumeric validation would not occur if the string
         length validation fails:
+    </para>
 
-        <programlisting language="php"><![CDATA[
+    <programlisting language="php"><![CDATA[
 $validatorChain->addValidator(
                     new Zend_Validate_StringLength(array('min' => 6,
                                                          'max' => 12)),
                     true)
                ->addValidator(new Zend_Validate_Alnum());
 ]]></programlisting>
-    </para>
 
     <para>
         Any object that implements <classname>Zend_Validate_Interface</classname> may be used in a

+ 11 - 13
documentation/manual/en/module_specs/Zend_Validate.xml

@@ -70,8 +70,9 @@
 
         <para>
             The following example illustrates validation of an e-mail address:
+        </para>
 
-            <programlisting language="php"><![CDATA[
+        <programlisting language="php"><![CDATA[
 $validator = new Zend_Validate_EmailAddress();
 
 if ($validator->isValid($email)) {
@@ -83,7 +84,6 @@ if ($validator->isValid($email)) {
     }
 }
 ]]></programlisting>
-        </para>
     </sect2>
 
     <sect2 id="zend.validate.introduction.messages">
@@ -116,8 +116,7 @@ if ($validator->isValid($email)) {
             which message template you are changing.
         </para>
 
-        <para>
-            <programlisting language="php"><![CDATA[
+        <programlisting language="php"><![CDATA[
 $validator = new Zend_Validate_StringLength(8);
 
 $validator->setMessage(
@@ -132,13 +131,13 @@ if (!$validator->isValid('word')) {
     // "The string 'word' is too short; it must be at least 8 characters"
 }
 ]]></programlisting>
-        </para>
 
         <para>
             You can set multiple messages using the <methodname>setMessages()</methodname>
             method. Its argument is an array containing key/message pairs.
+        </para>
 
-            <programlisting language="php"><![CDATA[
+        <programlisting language="php"><![CDATA[
 $validator = new Zend_Validate_StringLength(array('min' => 8, 'max' => 12));
 
 $validator->setMessages( array(
@@ -148,7 +147,6 @@ $validator->setMessages( array(
         'The string \'%value%\' is too long'
 ));
 ]]></programlisting>
-        </para>
 
         <para>
             If your application requires even greater flexibility with which it
@@ -158,8 +156,9 @@ $validator->setMessages( array(
             it is the value you specified as the argument of
             <methodname>isValid()</methodname>. Other properties may be supported on a
             case-by-case basis in each validation class.
+        </para>
 
-            <programlisting language="php"><![CDATA[
+        <programlisting language="php"><![CDATA[
 $validator = new Zend_Validate_StringLength(array('min' => 8, 'max' => 12));
 
 if (!validator->isValid('word')) {
@@ -172,7 +171,6 @@ if (!validator->isValid('word')) {
         . "\n";
 }
 ]]></programlisting>
-        </para>
     </sect2>
 
     <sect2 id="zend.validate.introduction.static">
@@ -189,24 +187,24 @@ if (!validator->isValid('word')) {
             namespace. The <methodname>is()</methodname> method automatically loads the
             class, creates an instance, and applies the <methodname>isValid()</methodname>
             method to the data input.
+        </para>
 
-            <programlisting language="php"><![CDATA[
+        <programlisting language="php"><![CDATA[
 if (Zend_Validate::is($email, 'EmailAddress')) {
     // Yes, email appears to be valid
 }
 ]]></programlisting>
-        </para>
 
         <para>
             You can also pass an array of constructor arguments, if they
             are needed for the validator.
+        </para>
 
-            <programlisting language="php"><![CDATA[
+        <programlisting language="php"><![CDATA[
 if (Zend_Validate::is($value, 'Between', array('min' => 1, 'max' => 12))) {
     // Yes, $value is between 1 and 12
 }
 ]]></programlisting>
-        </para>
 
         <para>
             The <methodname>is()</methodname> method returns a boolean value, the same as

+ 1 - 0
documentation/manual/en/module_specs/Zend_View-Helpers-HeadScript.xml

@@ -89,6 +89,7 @@
 
         <example id="zend.view.helpers.initial.headscript.conditional">
             <title>Headscript With Conditional Comments</title>
+
             <programlisting language="php"><![CDATA[
 // adding scripts
 $this->headScript()->appendFile(

+ 1 - 1
documentation/manual/en/module_specs/Zend_View-Introduction.xml

@@ -232,7 +232,7 @@ php_value "short_open_tag" "on"
                     long tags on the fly:
                 </para>
 
-        <programlisting language="php"><![CDATA[
+                <programlisting language="php"><![CDATA[
 $view->setUseStreamWrapper(true);
 ]]></programlisting>
 

+ 0 - 1
documentation/manual/en/tutorials/form-decorators-composite.xml

@@ -8,7 +8,6 @@
         example showing a "date of birth element":
     </para>
 
-
     <programlisting language="php"><![CDATA[
 <div class="element">
     <?php echo $form->dateOfBirth->renderLabel() ?>