http://nagoya.apache.org/bugzilla/show_bug.cgi?id=2132 *** shadow/2132 Tue Jun 12 08:19:42 2001 --- shadow/2132.tmp.5190 Tue Jun 12 08:19:42 2001 *************** *** 0 **** --- 1,59 ---- + +============================================================================+ + | Indefinite loop on recursive import | + +----------------------------------------------------------------------------+ + | Bug #: 2132 Product: Xerces-J | + | Status: NEW Version: 1.4 | + | Resolution: Platform: PC | + | Severity: Normal OS/Version: Windows NT/2K | + | Priority: Other Component: Schema-Structures | + +----------------------------------------------------------------------------+ + | Assigned To: [EMAIL PROTECTED] | + | Reported By: [EMAIL PROTECTED] | + | CC list: Cc: | + +----------------------------------------------------------------------------+ + | URL: | + +============================================================================+ + | DESCRIPTION | + With two namespaces, each one with its schema and each one importing the + other, Xerces just loops and crashes. + AFAIK, the recursive inclusion of the schemas is allowed by the spec. The + definitions are not recursive, it's just that the namespaces need definitions + included in each other. + + test files: + schemas: + + <schema xmlns="http://www.w3.org/2000/10/XMLSchema" + xmlns:first="http://www.first.test" + xmlns:second="http://www.second.test" + targetNamespace="http://www.first.test" + elementFormDefault="qualified"> + + <!-- import the second namespace --> + <import namespace="http://www.second.test" schemaLocation="loop2.xsd"/> + + <element name="test" type="string"/> + + </schema> + + and + + <schema xmlns="http://www.w3.org/2000/10/XMLSchema" + xmlns:first="http://www.first.test" + xmlns:second="http://www.second.test" + targetNamespace="http://www.second.test" + elementFormDefault="qualified"> + + <!-- import the first namespace --> + <import namespace="http://www.first.test" schemaLocation="loop1.xsd"/> + + <element name="unused" type="string"/> + + </schema> + + and instance: + + <?xml version="1.0" encoding="UTF-8"?> + <test xmlns="http://www.first.test" + xsi:schemaLocation="http://www.first.test loop1.xsd" + xmlns:xsi="http://www.w3.org/2000/10/XMLSchema-instance"/> \ No newline at end of file --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
