You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-dev@xerces.apache.org by bu...@apache.org on 2001/03/20 17:57:54 UTC

[Bug 1051] New - Validation not being done by parser

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

*** shadow/1051	Tue Mar 20 08:57:54 2001
--- shadow/1051.tmp.15261	Tue Mar 20 08:57:54 2001
***************
*** 0 ****
--- 1,37 ----
+ +============================================================================+
+ | Validation not being done by parser                                        |
+ +----------------------------------------------------------------------------+
+ |        Bug #: 1051                        Product: Xerces-J                |
+ |       Status: NEW                         Version: 1.2.3                   |
+ |   Resolution:                            Platform: PC                      |
+ |     Severity: Normal                   OS/Version:                         |
+ |     Priority:                           Component: DOM                     |
+ +----------------------------------------------------------------------------+
+ |  Assigned To: xerces-j-dev@xml.apache.org                                  |
+ |  Reported By: czanelli@c-bridge.com                                        |
+ |      CC list: Cc:                                                          |
+ +----------------------------------------------------------------------------+
+ |          URL:                                                              |
+ +============================================================================+
+ |                              DESCRIPTION                                   |
+ I'm having a problem getting validation to work during parsing.
+ 
+ I tried adding a tag that wasn't defined in the dtd and no exceptions were 
+ thrown when I parsed the XML into a Document.
+ 
+ Here is how i constructed my statement:
+ try {
+   DOMParser parser = new DOMParser();
+   parser.setFeature("http://xml.org/sax/features/validation", true);
+   parser.setFeature("http://apache.org/xml/features/dom/defer-node-expansion", 
+      true);
+   parser.setFeature("http://xml.org/sax/features/namespaces", true);
+   parser.setFeature("http://apache.org/xml/features/validation/schema", true);
+   parser.parse(configFile);
+   this.document = parser.getDocument();
+ .....
+ 
+ I'm using Xerces 1.2.3.
+ Is this the proper way to activate validation?  Or is this a bug?
+ 
+ -Chris

---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-dev-help@xml.apache.org