Commits

Shlomi Fish  committed 98ada48

Apply the patch from https://rt.cpan.org/Ticket/Display.html?id=69703 .

Documentation spelling fixes.

  • Participants
  • Parent commits 9730bcb

Comments (0)

Files changed (3)

     - Fix docbook source validity
         - resolves https://rt.cpan.org/Ticket/Display.html?id=69702
         - thanks to Ville Skytta / SCOP for the patch.
+    - Applied patch from https://rt.cpan.org/Ticket/Display.html?id=69703
+        - [PATCH] Documentation spelling fixes
+        - thanks to Ville Skytta / SCOP for the patch.
+        - minor correction by the current maintainer (SHLOMIF).
 
 1.82            Wed Jul 20 23:43:53 IDT 2011
     - Moved some if blocks after the dSP; (which contains declarations) to be

File docs/libxml.dbk

 		<para>All functions working with DOM accept and return
 		character strings (UTF-8 encoded with UTF8 flag on). E.g.
 		<programlisting><![CDATA[
-my $doc = XML::LibXML:Document->new('1.0',$some_encoding);
+my $doc = XML::LibXML::Document->new('1.0',$some_encoding);
 my $element = $doc->createElement($name);
 $element->appendText($text);
 $xml_fragment = $element->toString(); # returns a character string
 		Note that the method <function>toString</function>
 		returns XML as a character string if applied to
 		other node than the Document node and
-		a byte string containing the apropriate
+		a byte string containing the appropriate
 		<programlisting>&lt;?xml version="1.0" encoding="..."?&gt;</programlisting>
 		declaration if applied to a <xref linkend="XML-LibXML-Document"/>.
 		</para>
 		since it is considered bad practice.
 		</para>
 		<programlisting><![CDATA[
-my $doc = XML::LibXML:Document->new('1.0','iso-8859-2');
+my $doc = XML::LibXML::Document->new('1.0','iso-8859-2');
 my $text = $doc->createTextNode($some_latin2_encoded_byte_string);
 # WORKS, BUT NOT RECOMMENDED!
 ]]>
 $thr->join;
 </programlisting>
 <para>Note that libxml2 uses dictionaries to store short strings and
-these dicionaries are kept on a document node. Without mutex locks, it
+these dictionaries are kept on a document node. Without mutex locks, it
 could happen in the previous example that the thread modifies the
 dictionary while other threads attempt to read from it, which could
 easily lead to a crash.</para>
                             <funcsynopsisinfo>$libxmlnode = XML::LibXML-&gt;import_GDOME( $node, $deep );</funcsynopsisinfo>
                         </funcsynopsis>
 
-                        <para>This clones an XML::GDOME node to a XML::LibXML node explicitly.</para>
+                        <para>This clones an XML::GDOME node to an XML::LibXML node explicitly.</para>
                     </listitem>
                 </varlistentry>
 
                             <funcsynopsisinfo>$gdomenode = XML::LibXML-&gt;export_GDOME( $node, $deep );</funcsynopsisinfo>
                         </funcsynopsis>
 
-                        <para>Allows to clone an XML::LibXML node into a XML::GDOME node.</para>
+                        <para>Allows to clone an XML::LibXML node into an XML::GDOME node.</para>
                     </listitem>
                 </varlistentry>
             </variablelist>
         <sect1>
             <title>Parsing</title>
 
-            <para>A XML document is read into a data structure such as a DOM tree by a piece of software, called a parser. XML::LibXML currently provides four
+            <para>An XML document is read into a data structure such as a DOM tree by a piece of software, called a parser. XML::LibXML currently provides four
             different parser interfaces:</para>
 
             <itemizedlist>
                 <para>The functions described above are implemented to
                 parse well formed documents. In some cases a program
                 gets well balanced XML instead of well formed
-                documents (e.g. a XML fragment from a Database). With
+                documents (e.g. an XML fragment from a database). With
                 XML::LibXML it is not required to wrap such fragments
                 in the code, because XML::LibXML is capable even to
                 parse well balanced XML fragments.</para>
                     </varlistentry>
                 </variablelist>
 
-                <para>By default XML::LibXML does not process XInclude tags within a XML Document (see options section below). XML::LibXML allows to post
+                <para>By default XML::LibXML does not process XInclude tags within an XML Document (see options section below). XML::LibXML allows to post
                 process a document to expand XInclude tags.</para>
 
                 <variablelist>
                                 <funcsynopsisinfo>$doc = $parser-&gt;parse_string( $xmlstring);</funcsynopsisinfo>
                             </funcsynopsis>
 
-                            <para>This function is similar to parse_fh(), but it parses a XML document that is available as a single string in memory. Again,
+                            <para>This function is similar to parse_fh(), but it parses an XML document that is available as a single string in memory. Again,
                             you can pass an optional base URI to the function.</para>
 
                             <programlisting>my $doc = $parser-&gt;parse_string( $xmlstring, $baseuri );</programlisting>
 	      </para>
 	      <para>IMPORTANT:
 		Due to limitations in the libxml2 library line numbers greater than
-		65535 will be returned as 65535. Unfortunatelly, this is a long and sad story, please see
+		65535 will be returned as 65535. Unfortunately, this is a long and sad story, please see
 		<ulink url="http://bugzilla.gnome.org/show_bug.cgi?id=325533">http://bugzilla.gnome.org/show_bug.cgi?id=325533</ulink> for more details.
               </para>
             </listitem>
 	      <para>Note that although this flag disables entity substitution, it
 	      does not prevent the parser from loading external entities;
 	      when substitution of an external entity is disabled, the
-	      entity will be represented in the document tree by a XML_ENTITY_REF_NODE node
+	      entity will be represented in the document tree by an XML_ENTITY_REF_NODE node
 	      whose subtree will be the content obtained by parsing the external resource;
 	      Although this nesting is visible from the DOM
 	      it is transparent to XPath data model, so it is possible to
             <listitem>
 	      <para>/parser, reader/</para>
               <para>Implement XInclude substitution; possible values are 0 and 1</para>
-              <para>Expands XIinclude tags immediately while parsing the document.
+              <para>Expands XInclude tags immediately while parsing the document.
 		Note that the parser will use the URI resolvers installed
 		via <function>XML::LibXML::InputCallback</function> to parse the included document (if any).</para>
             </listitem>
                         <programlisting>
                             $parser-&gt;keep_blanks(0);
                         </programlisting>
-                        <para>This is actually an oposite of the <literal>no_blanks</literal> parser option.
+                        <para>This is actually the opposite of the <literal>no_blanks</literal> parser option.
 			  If used without an argument retrieves negated value of <literal>no_blanks</literal>.
-			  If used with an argument sets <literal>no_blanks</literal> to the oposite value.
+			  If used with an argument sets <literal>no_blanks</literal> to the opposite value.
 			</para>
                     </listitem>
                 </varlistentry>
             parsing a document. While using the SAX parser XML::LibXML will not create a DOM Document tree.</para>
 
             <para>Such an interface is useful if very large XML documents have to be processed and no DOM functions are required. By using this interface it is
-            possible to read data stored within a XML document directly into the application data structures without loading the document into memory.</para>
+            possible to read data stored within an XML document directly into the application data structures without loading the document into memory.</para>
 
             <para>The SAX interface of XML::LibXML is based on the famous XML::SAX interface. It uses the generic interface as provided by XML::SAX::Base.</para>
 
             array. The only way to access these structure's values is
             through the DOM interface provided by XML::LibXML. This
             also means, that one <emphasis>can't</emphasis> simply
-            inherit a XML::LibXML node and add new member variables as
+            inherit an XML::LibXML node and add new member variables as
             they were hash keys.</para>
 
             <para>The DOM interface of XML::LibXML does not intend to
              In this respect,
 	     XML::LibXML DOM implementation differs from the DOM
              Level 2 specification according to which special
-              attributes for declaring the apropriate XML namespaces
+              attributes for declaring the appropriate XML namespaces
               should not be added when a node with a namespace prefix
               and namespace URI is created.
             </para>
             <para>The namespace is declared on the document element
               during the setAttributeNodeNS() call.
             </para>
-            <para>Namespaces can be also declared explicitly by the use of XML::LibXML:Element's setNamespace() function.
+            <para>Namespaces can be also declared explicitly by the use of XML::LibXML::Element's setNamespace() function.
 	     Since 1.61, they can also be manipulated with functions
              setNamespaceDeclPrefix() and setNamespaceDeclURI() (not available in DOM).
 	     Changing an URI or prefix of an existing namespace declaration
                     </funcsynopsis>
 
                     <para><emphasis>toString</emphasis> is a DOM serializing function,
-		    so the DOM Tree is serialized into a XML string, ready for output.</para>
+		    so the DOM Tree is serialized into an XML string, ready for output.</para>
                     <para>IMPORTANT: unlike toString for other nodes, on document nodes
 		      this function returns the XML as a byte string in the original encoding of the
                       document (see the actualEncoding() method)! This means you
                     <para><emphasis>cloneNode</emphasis> creates a
                     copy of <function>$node</function>. When $deep is
                     set to 1 (true) the function will copy all
-                    childnodes as well. If $deep is 0 only the current
+                    child nodes as well. If $deep is 0 only the current
                     node will be copied. Note that in case of element,
                     attributes are copied even if $deep is 0.
                     </para>
                         <funcsynopsisinfo>$boolean = $node-&gt;hasChildNodes();</funcsynopsisinfo>
                     </funcsynopsis>
 
-                    <para>If the current node has Childnodes this function returns TRUE (1), otherwise it returns FALSE (0, not undef).</para>
+                    <para>If the current node has child nodes this function returns TRUE (1), otherwise it returns FALSE (0, not undef).</para>
                 </listitem>
             </varlistentry>
 
                         <funcsynopsisinfo>$childnode = $node-&gt;firstChild;</funcsynopsisinfo>
                     </funcsynopsis>
 
-                    <para>If a node has childnodes this function will return the first node in the childlist.</para>
+                    <para>If a node has child nodes this function will return the first node in the child list.</para>
                 </listitem>
             </varlistentry>
 
                         <funcsynopsisinfo>$childnode = $node-&gt;lastChild;</funcsynopsisinfo>
                     </funcsynopsis>
 
-                    <para>If the <function>$node</function> has childnodes this function returns the last child node.</para>
+                    <para>If the <function>$node</function> has child nodes this function returns the last child node.</para>
                 </listitem>
             </varlistentry>
 
                         <funcsynopsisinfo>$node-&gt;setBaseURI($strURI);</funcsynopsisinfo>
                     </funcsynopsis>
             <para>This method only does something useful for an element node
-	    in a XML document.
+	    in an XML document.
             It sets the xml:base attribute on the node to $strURI, which
 	    effectively sets the base URI of the node to the same value.
 	    </para>
                         <funcsynopsisinfo>$attr = XML::LibXML::Attr-&gt;new($name [,$value]);</funcsynopsisinfo>
                     </funcsynopsis>
 
-                    <para>Class constructor. If you need to work with ISO encoded strings, you should <emphasis>always</emphasis> use the <function>createAttrbute</function>
+                    <para>Class constructor. If you need to work with ISO encoded strings, you should <emphasis>always</emphasis> use the <function>createAttribute</function>
                     of <xref linkend="XML-LibXML-Document"/>.</para>
                 </listitem>
             </varlistentry>
                 <sect3>
                     <title>The Parser Process</title>
 
-                    <para>The parser process work on a XML data stream, along which, links to other resources can be embedded. This can be links to external
+                    <para>The parser process works on an XML data stream, along which, links to other resources can be embedded. This can be links to external
                     DTDs or XIncludes for example. Those resources are identified by URIs. The callback implementation of libxml2 assumes that one callback
                     group can handle a certain amount of URIs and a certain URI scheme. Per default, callback handlers for <emphasis>file://*</emphasis>,
                     <emphasis>file:://*.gz</emphasis>, <emphasis>http://*</emphasis> and <emphasis>ftp://*</emphasis> are registered.</para>
                     </funcsynopsis>
 
                     <para>This function allows to validate a (parsed) document
-	            against the given RelaxNG schema. The argument of this function should be a XML::LibXML::Document object.
+	            against the given RelaxNG schema. The argument of this function should be an XML::LibXML::Document object.
 	            If this function succeeds, it will return 0, otherwise
                     it will die() and report the errors found. Because of this validate() should be always evaluated.</para>
                 </listitem>
 	<emphasis>http://xmlsoft.org/html/libxml-xmlreader.html</emphasis>.
 	This feature requires at least libxml2-2.6.21.
 	Pull-parser (StAX in Java, XmlReader in C#) use an iterator
-	approach to parse a xml-file. They are easier to program than
+	approach to parse XML documents. They are easier to program than
 	event-based parser (SAX) and much more lightweight than
 	tree-based parser (DOM), which load the complete tree into
 	memory.</para>
             <listitem>
               <para>the reader further supports various
 	      parser options described in
-	      <xref linkend="XML-LibXML-Parser"/> (specificly those
+	      <xref linkend="XML-LibXML-Parser"/> (specifically those
 	      labeled by /reader/).
 	      </para>
             </listitem>
         <varlistentry>
           <term>nodePath()</term>
           <listitem>
-            <para>Returns a cannonical location path to the current element
+            <para>Returns a canonical location path to the current element
 	    from the root node to the current node. Namespaced
 	    elements are matched by '*', because there is no way to declare
 	    prefixes within XPath patterns. Unlike
       <title>Synopsis</title>
       <programlisting>use XML::LibXML;
 my $pattern = XML::LibXML::Pattern-&gt;new('/x:html/x:body//x:div', { 'x' => 'http://www.w3.org/1999/xhtml' });
-# test a match on a XML::LibXML::Node $node
+# test a match on an XML::LibXML::Node $node
 
 if ($pattern->matchesNode($node)) { ... }
 
-# or on a XML::LibXML::Reader
+# or on an XML::LibXML::Reader
 
 if ($reader->matchesPattern($pattern)) { ... }
 
       <para>This is a perl interface to libxml2's pattern matching support
 	<emphasis>http://xmlsoft.org/html/libxml-pattern.html</emphasis>.
       This feature requires recent versions of libxml2.</para>
-      <para>Patterns are a small subset of XPath language, which is limitted
+      <para>Patterns are a small subset of XPath language, which is limited
       to (disjunctions of) location paths involving the child and descendant axes in abbreviated form
       as described by the extended BNF given below:
       </para>
 	    <funcsynopsis>
 	      <funcsynopsisinfo>$bool = $pattern->matchesNode($node);</funcsynopsisinfo>
 	    </funcsynopsis>
-	    <para>Given a XML::LibXML::Node object, returns a true value if
+	    <para>Given an XML::LibXML::Node object, returns a true value if
 	    the node is matched by the compiled pattern expression.</para>
 	  </listitem>
 	</varlistentry>
       <para>The
 	XML::LibXML::Error class is a tiny frontend to
 	<emphasis>libxml2</emphasis>&#39;s structured error support. If
-	XML::LibXML is compied with structured error support, all errors
-	reported by libxml2 are transformed to XML::LibXML:Error
+	XML::LibXML is compiled with structured error support, all errors
+	reported by libxml2 are transformed to XML::LibXML::Error
 	objects. These objects automatically serialize to the
 	corresponding error messages when printed or used in a string
 	operation, but as objects, can also be used to get a detailed and
 	    <funcsynopsis>
 	      <funcsynopsisinfo>$XML::LibXML::Error::WARNINGS=1;</funcsynopsisinfo>
 	    </funcsynopsis>
-	    <para>Traditionally, XML::LibXML was supressing parser
+	    <para>Traditionally, XML::LibXML was suppressing parser
 	      warnings by setting libxml2's global variable
 	      xmlGetWarningsDefaultValue to 0. Since
 	      1.70 we do not change libxml2's global
 	    <funcsynopsis>
 	      <funcsynopsisinfo>$message = $@-&#62;as_string();</funcsynopsisinfo>
 	    </funcsynopsis>
-	    <para>This functions takes serializes a XML::LibXML::Error
+	    <para>This function serializes an XML::LibXML::Error
 	      object to a string containing the full error message
 	      close to the message produced by <emphasis>libxml2</emphasis> default error
 	      handlers and tools like xmllint. This method is also used
 	    <funcsynopsis>
 	      <funcsynopsisinfo>print $@->dump();</funcsynopsisinfo>
 	    </funcsynopsis>
-	    <para>This function serializes a XML::LibXML::Error to a
+	    <para>This function serializes an XML::LibXML::Error to a
 	      string displaying all fields of the error structure
 	      individually on separate lines of the form 'name' => 'value'.
 	    </para>
 	<title>Encoding functions</title>
 	<para>
 	  To encode or decode a string to or from UTF-8, XML::LibXML::Common exports
-	  two functions, which provide interfact to the encoding support in <literal>libxml2</literal>.
+	  two functions, which provide an interface to the encoding support in <literal>libxml2</literal>.
 	  Which encodings are supported by these functions depends
 	  on how <literal>libxml2</literal> was compiled.  UTF-16 is
 	  always supported and on most installations, ISO encodings are
 	</para>
 	<para>
 	  This interface was useful for older versions of Perl.
-	  Since Perl >= 5.8 provides similar funcions via the <literal>Encode</literal> module,
+	  Since Perl >= 5.8 provides similar functions via the <literal>Encode</literal> module,
 	  it is probably a good idea to use those instead.
 	</para>
 	<variablelist>
 	  </varlistentry>
 	</variablelist>
 	<para>Both these functions report their errors on the standard
-	error. If an error occours the function will croak(). To catch
+	error. If an error occurs the function will croak(). To catch
 	the error information it is required to call the encoding
 	function from within an eval block in order to prevent the
 	entire script from being stopped on encoding error.</para>
 	</para>
 	<para>The merge also naturally eliminates a practical and
 	urgent problem experienced by many XML::LibXML users on certain
-	platforms, namely misterious misbehavior of XML::LibXML
+	platforms, namely mysterious misbehavior of XML::LibXML
 	occurring if the installed (often pre-packaged) version of
 	XML::LibXML::Common was compiled against an older version of
 	libxml2 than XML::LibXML.

File lib/XML/LibXML/SAX/Generator.pm

 
 =head1 DESCRIPTION
 
-THIS CLASS IS DEPRACED! Use XML::LibXML::SAX::Parser instead!
+THIS CLASS IS DEPRECATED! Use XML::LibXML::SAX::Parser instead!
 
 This helper class allows you to generate SAX events from any XML::LibXML
 node, and all it's sub-nodes. This basically gives you interop from