Hi. > > One of my colleagues happened to change a schema (by mistake) > > so that it imported itself, i.e.: > > > > mySchema.xsd: > > > > <xsd:schema xmlns="myNamespace"> > > <xsd:import namespace="myNamespace" > > schemaLocation="mySchema.xsd"/> > > ... > > > > This caused the parser to eat memory until the JVM went out > > of memory. Even if this is a stupid mistake, I personally think > > it should be considered as a major bug. > > > > Is this a new bug or has it been fixed in later versions? > > I'm not sure I would call it a bug because there is nothing in > the XML Schema specification forbidding it.
I think the bug is that the jvm runs out of memory, not the recursion. See the last note of '4.2.3 References to schema components across namespaces' in the 'schema part 1 - structures' definition: " ... The above is carefully worded so that multiple <import>ing of the same schema document will not constitute a violation of clause 2 of Schema Properties Correct (�3.15.6), but applications are allowed, indeed encouraged, to avoid <import>ing the same schema document more than once to forestall the necessity of establishing identity component by component ... " So I'd say, this should be changed. I posted it to the xerces-j-dev list as well. Regards. -- Bjoern Martin [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
