DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=23402>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=23402

Calling of getConfig() function on a Document type Object

           Summary: Calling of getConfig() function on a Document type
                    Object
           Product: Xerces2-J
           Version: 2.5.0
          Platform: Other
        OS/Version: Windows NT/2K
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: Other
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]
                CC: [EMAIL PROTECTED]


import org.w3c.dom.Document;
import org.w3c.dom.DOMConfiguration;
import org.w3c.dom.ls.DOMBuilder;

..... 

Document document = builder.parseURI("data/personal-schema.xml");
DOMConfiguration config = document.getConfig();
config.setParameter("error-handler",new MyErrorHandler());
config.setParameter("validate", Boolean.TRUE);
document.normalizeDocument();


In the above code snippet given as an illustration in the
file xerces-2_5_0\docs\faq-dom.html to explain "How can the user
make sure that my DOM document in memory conforms to a schema".

I feel the statement :

DOMConfiguration config = document.getConfig();

will give compile time error because the getConfig function is neither
available in the parent interface class Document nor
in the class Node (parent of Document).

This problem is further experienced in the program file
xerces-2_5_0\samples\dom\DOM3.java, where too the function
getConfig() is called on a Document type object.
When compiled DOM3.java gives the following error:

D:\JavaResources\Xerces25\xerces-2_5_0\samples\dom>javac DOM3.java
DOM3.java:148: cannot resolve symbol
symbol  : method getConfig  ()
location: interface org.w3c.dom.Document
            config = doc.getConfig();
                        ^
DOM3.java:162: cannot resolve symbol
symbol  : method normalizeDocument  ()
location: interface org.w3c.dom.Document
            doc.normalizeDocument();
               ^
2 errors

Notice the problem also occurs with calling normalizeDocument() 
function which is neither declared in Document or Node.

Please let me know whether I am correct in my analysis or is there
some mistake I am making.

Thanks and Regards,
Atin

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

Reply via email to