Author: amassari
Date: Wed Mar 19 04:47:20 2008
New Revision: 638798

URL: http://svn.apache.org/viewvc?rev=638798&view=rev
Log:
- add utf-8 to the list of encodings for which DOMLSSerializer writes a BOM
- update the example for interchange of DOMLSInput and InputSource to use the 
new names

Modified:
    xerces/c/trunk/doc/program-dom.xml

Modified: xerces/c/trunk/doc/program-dom.xml
URL: 
http://svn.apache.org/viewvc/xerces/c/trunk/doc/program-dom.xml?rev=638798&r1=638797&r2=638798&view=diff
==============================================================================
--- xerces/c/trunk/doc/program-dom.xml (original)
+++ xerces/c/trunk/doc/program-dom.xml Wed Mar 19 04:47:20 2008
@@ -868,32 +868,32 @@
         </s3>
 
         <anchor name="InputSourceWrapper"/>
-        <s3 title="How to interchange DOMInputSource and SAX InputSource?">
-        <p>DOM L3 has introduced a DOMInputSource which is similar to the SAX 
InputSource. The &XercesCName; internals
+        <s3 title="How to interchange DOMLSInput and SAX InputSource?">
+        <p>DOM L3 has introduced a DOMLSInput which is similar to the SAX 
InputSource. The &XercesCName; internals
         (XMLScanner, Reader, etc.) use the SAX InputSource to process the xml 
data. In order to support DOM L3, we need
-        to provide a mechanism to allow the &XercesCName; internals to talk to 
a DOMInputSource object. Similarly, &XercesCName;
+        to provide a mechanism to allow the &XercesCName; internals to talk to 
a DOMLSInput object. Similarly, &XercesCName;
         provides some framework classes for specialized types of input source 
(i.e. LocalFileInputSource, etc.) that are
-        derived from the SAX InputSource. In DOM L3, to allow users 
implementing their own DOMEntityResolver(s), which return
-        a DOMInputSource, to utilize these framework classes, we need to 
provide a mechanism to map a SAX InputSource to a
-        DOMInputSource. We are introducing to wrapper classes to interchange 
DOMInputSource and SAXInputSource.
+        derived from the SAX InputSource. In DOM L3, to allow users 
implementing their own DOMLSResourceResolver(s), which return
+        a DOMLSInput, to utilize these framework classes, we need to provide a 
mechanism to map a SAX InputSource to a
+        DOMInputSource. We are introducing to wrapper classes to interchange 
DOMLSInput and SAX InputSource.
         </p>
 
-           <s4 title="Wrapper4DOMInputSource">
+           <s4 title="Wrapper4DOMLSInput">
            <p>
-           Wraps a DOMInputSource object to a SAX InputSource.
+           Wraps a DOMLSInput object to a SAX InputSource.
            </p>
            <source>
-    #include &lt;xercesc/dom/DOMInputSource.hpp>
-    #include &lt;xercesc/framework/Wrapper4DOMInputSource.hpp>
+    #include &lt;xercesc/dom/DOMLSInput.hpp>
+    #include &lt;xercesc/framework/Wrapper4DOMLSInput.hpp>
 
-    class DBInputSource: public DOMInputSource
+    class DBInputSource: public DOMLSInput
     {
     ...
     };
 
     ...
-    DOMInputSource *domIS = new DBInputSource;
-    Wrapper4DOMInputSource domISWrapper(domIS);
+    DOMLSInput *domIS = new DBInputSource;
+    Wrapper4DOMLSInput domISWrapper(domIS);
     XercesDOMParser parser;
 
     parser.parse(domISWrapper);
@@ -902,15 +902,17 @@
 
            <s4 title="Wrapper4InputSource">
            <p>
-           Wraps a SAX InputSource object to a DOMInputSource.
+           Wraps a SAX InputSource object to a DOMLSInput.
            </p>
            <source>
     #include &lt;xercesc/framework/Wrapper4InputSource.hpp>
     #include &lt;xercesc/framework/LocalFileInputSource.hpp>
 
-    DOMInputSource* MyEntityResolver::resolveEntity(const XMLCh* const 
publicId,
-                                                    const XMLCh* const 
systemId,
-                                                    const XMLCh* const baseURI)
+    DOMLSInput* MyEntityResolver::resolveResource(  const XMLCh* const    
resourceType
+                                                  , const XMLCh* const    
namespaceUri
+                                                  , const XMLCh* const    
publicId
+                                                  , const XMLCh* const    
systemId
+                                                  , const XMLCh* const    
baseURI)
     {
         return new Wrapper4InputSource(new LocalFileInputSource(baseURI, 
systemId));
     }
@@ -1703,7 +1705,7 @@
 &lt;Test>&lt;![CDATA[&lt; > &amp; " ' &amp;lt; &amp;gt; &amp;amp; &amp;quot; 
&amp;apos; ] ]&gt;&lt;/Test>
 &lt;/root>
 </source>
-            <p>To summarize, here is the table that summarize how built-in 
entity refernece are handled for
+            <p>To summarize, here is the table that summarize how built-in 
entity reference are handled for
             different Node Type:</p>
       <table>
         <tr>
@@ -1937,11 +1939,10 @@
                                                 if and only if a 
DOMDocumentNode is rendered for serialization,
                                                 and the output encoding is 
among the encodings listed here (alias
                                                 acceptable),
-                                                UTF-16, UTF-16LE, UTF-16BE, 
UCS-4, UCS-4LE, and UCS-4BE.
+                                                UTF-8, UTF-16, UTF-16LE, 
UTF-16BE, UCS-4, UCS-4LE, and UCS-4BE.
 
-                                                In the case of UTF-16/UCS-4, 
the system directive, ENDIANMODE_LITTLE
-                                                and ENDIANMODE_BIG (which 
denotes the host machine's endian mode),
-                                                is refered to determine the 
appropriate BOM to be written.
+                                                In the case of UTF-16/UCS-4, 
the host machine's endian mode
+                                                is referred to determine the 
appropriate BOM to be written.
                 </td></tr>
                 <tr><th><em>default:</em></th><td> false </td></tr>
                 <tr><th><em>XMLUni Predefined Constant:</em></th><td> 
fgDOMWRTBOM </td></tr>



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to