PLEASE DO NOT REPLY TO THIS MESSAGE. TO FURTHER COMMENT ON THE STATUS OF THIS BUG PLEASE FOLLOW THE LINK BELOW AND USE THE ON-LINE APPLICATION. REPLYING TO THIS MESSAGE DOES NOT UPDATE THE DATABASE, AND SO YOUR COMMENT WILL BE LOST SOMEWHERE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=3035 *** shadow/3035 Tue Aug 7 17:01:53 2001 --- shadow/3035.tmp.26812 Tue Aug 7 17:01:53 2001 *************** *** 0 **** --- 1,64 ---- + +============================================================================+ + | Cannot parse schema for schema | + +----------------------------------------------------------------------------+ + | Bug #: 3035 Product: Xerces-J | + | Status: NEW Version: 1.4.2 | + | Resolution: Platform: All | + | Severity: Major OS/Version: All | + | Priority: Other Component: Schema-Structures | + +----------------------------------------------------------------------------+ + | Assigned To: [EMAIL PROTECTED] | + | Reported By: [EMAIL PROTECTED] | + +----------------------------------------------------------------------------+ + | URL: | + +============================================================================+ + | DESCRIPTION | + Hi, + + To validate a schema against "schema for schema" for syntactic correctness, + I needed to let TraverseSchema class be able to parse "schema for schema". + + I found a problem which relates to the fact that schema for schema contains + several utility types not for public use. One example of such utility types + is (which is an excerpt from datatypes.xsd): + + <xs:simpleType name="derivationControl"> + <xs:annotation> + <xs:documentation> + A utility type, not for public use</xs:documentation> + </xs:annotation> + <xs:restriction base="xs:NMTOKEN"> + <xs:enumeration value="substitution"/> + <xs:enumeration value="extension"/> + <xs:enumeration value="restriction"/> + <xs:enumeration value="list"/> + <xs:enumeration value="union"/> + </xs:restriction> + </xs:simpleType> + + To handle utility types, the following changes to TraverseSchema were found to + be + necessary. + + public DatatypeValidator getDatatypeValidator(String uri, String localpart) + { + + DatatypeValidator dv = null; + + if (uri.equals(SchemaSymbols.URI_SCHEMAFORSCHEMA)) { + dv = fDatatypeRegistry.getDatatypeValidator( localpart ); + } + /** + * tkamiya - 2001-08-06 + else { + dv = fDatatypeRegistry.getDatatypeValidator( uri+","+localpart ); + } + */ + + if (dv == null) + dv = fDatatypeRegistry.getDatatypeValidator( uri+","+localpart ); + + return dv; + } + + -Takuki Kamiya \ No newline at end of file --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
