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/06/05 17:56:00 UTC

[Bug 1590] - when using schema to validate xml file using SAXParser, it keeps reporting schema error

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

*** shadow/1590	Sun May 20 17:26:34 2001
--- shadow/1590.tmp.5517	Tue Jun  5 08:56:00 2001
***************
*** 1,19 ****
! Bug#: 1590
! Product: Xerces-J
! Version: 1.3.1
! Platform: PC
! OS/Version: Windows 9x
! Status: NEW   
! Resolution: 
! Severity: Normal
! Priority: Medium
! Component: SAX
! AssignedTo: xerces-j-dev@xml.apache.org                            
! ReportedBy: yzhao71@yahoo.com               
! URL: 
! Cc: 
! Summary: when using schema to validate xml file using SAXParser, it keeps reporting schema error
! 
  *********************schema****************************************************
  
  <?xml version="1.0" encoding="UTF-8"?>
--- 1,19 ----
! +============================================================================+
! | when using schema to validate xml file using SAXParser, it keeps reporting |
! +----------------------------------------------------------------------------+
! |        Bug #: 1590                        Product: Xerces-J                |
! |       Status: RESOLVED                    Version: 1.3.1                   |
! |   Resolution: INVALID                    Platform: PC                      |
! |     Severity: Normal                   OS/Version: Windows 9x              |
! |     Priority: Medium                    Component: SAX                     |
! +----------------------------------------------------------------------------+
! |  Assigned To: xerces-j-dev@xml.apache.org                                  |
! |  Reported By: yzhao71@yahoo.com                                            |
! |      CC list: Cc:                                                          |
! +----------------------------------------------------------------------------+
! |          URL:                                                              |
! +============================================================================+
! |                              DESCRIPTION                                   |
  *********************schema****************************************************
  
  <?xml version="1.0" encoding="UTF-8"?>
***************
*** 408,410 ****
--- 408,438 ----
  	at UnitTest.doTest(UnitTest.java:621)
  
  	at UnitTest.main(UnitTest.java:691)
+ 
+ ------- Additional Comments From mhuffman@ca.ibm.com  2001-06-05 08:55 -------
+ The schema has an error where the attribute "array" is declared as 
+ type "xsd:boolean". Facet "enumeration" cannot be used for <simpleType> 
+ definitions that restrict "xsd:boolean".
+ 
+ Change 
+ <xsd:restriction base="xsd:boolean">
+ to
+ <xsd:restriction base="xsd:string">
+ in your "array" attribute declaration and it works fine under Xerces-J 1.3.0 
+ and 1.3.1.
+ 
+ FURTHER NOTE:
+ =============
+ Your schema also has other errors in it which were not properly reported by 
+ Xerces-J 1.3.0 and 1.3.1.  When you have use="default" in an attribute 
+ declaration you MUST also specify value="..." where "..." is the default value 
+ you want.  You did it in 1 place but did not do it in the others.
+ 
+ In Xerces-J 1.4.0 this error is caught and reported, however the syntax has 
+ changed from [use="default" value="1"] to [default="1"] and you will have to 
+ modify your schema accordingly.  Also note the schema namespace needs to change 
+ under 1.4.0 from ...www.w3.org/2000/10/XML... to ...www.w3.org/2001/XML...
+ 
+ Hope this helps.
+ 
+ Mark Huffman, XML Parsers, IBM Canada - 2001/06/05.
\ No newline at end of file

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