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=24881>. 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=24881 grammar load crash Summary: grammar load crash Product: Xerces-C++ Version: Nightly build (please specify the date) Platform: PC OS/Version: Windows NT/2K Status: NEW Severity: Major Priority: Other Component: Validating Parser (Schema) (Xerces 1.5 or up only) AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] Attached code sample crashes with this message (using VS.NET 2003) Unhandled exception at 0x1208747a (xerces-c_2_4_0D.dll) in test.exe: 0xC0000005: Access violation reading location 0x00000010. on CVS shapshot 20031120171656 but works with older 20031112111708. The problem is problably related to ValidationContext introduced in meantime. ### The code sample test.cpp : #include <xercesc/util/PlatformUtils.hpp> #include <xercesc/parsers/XercesDOMParser.hpp> #include <xercesc/validators/common/Grammar.hpp> XERCES_CPP_NAMESPACE_USE int main(int argc, char *argv[]) { XMLPlatformUtils::Initialize(); XercesDOMParser parser; parser.setDoSchema(true); parser.setDoNamespaces(true); parser.setValidationScheme(XercesDOMParser::Val_Always); parser.loadGrammar("test.xsd", Grammar::SchemaGrammarType); XMLPlatformUtils::Terminate(); return 0; } ### The schema sample test.xsd : <?xml version="1.0" encoding="UTF-8"?> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"> <xs:element name="mapping"> <xs:complexType> <xs:sequence> <xs:element name="table" type="tableType" maxOccurs="unbounded"/> </xs:sequence> </xs:complexType> </xs:element> <xs:complexType name="tableType"> <xs:sequence> <xs:choice maxOccurs="unbounded"> <xs:element name="column" type="columnType" maxOccurs="unbounded"/> <xs:element name="table" type="tableType" maxOccurs="unbounded"/> </xs:choice> </xs:sequence> <xs:attribute name="name" type="xs:string" use="required"/> <xs:attribute name="tag" type="xs:string" use="optional"/> <xs:attribute name="desc" type="xs:string" use="optional"/> </xs:complexType> <xs:complexType name="columnType"> <xs:attribute name="name" type="xs:string" use="required"/> <xs:attribute name="tag" type="xs:string" use="optional"/> <xs:attribute name="type" use="required"> <xs:simpleType> <xs:restriction base="xs:string"> <xs:enumeration value="string"/> <xs:enumeration value="number"/> <xs:enumeration value="date"/> <xs:enumeration value="time"/> <xs:enumeration value="boolean"/> </xs:restriction> </xs:simpleType> </xs:attribute> <xs:attribute name="desc" type="xs:string" use="optional"/> <xs:attribute name="length" type="xs:integer" use="optional"/> <xs:attribute name="digits" type="xs:integer" use="optional"/> <xs:attribute name="fraction" type="xs:integer" use="optional"/> <xs:attribute name="nullable" type="xs:boolean" use="optional" default="true"/> </xs:complexType> </xs:schema> --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
