Hi,

I'm trying to determine both what Xerces does when it encounters
recursive schema includes and what to do about it because it causes some
problems.

It appears that the XercesC schema parser creates multiple XSxxx type
objects for the same type if the schema files are included recursively.
In addition it would appear that the load time for a schema is much,
much slower in the presence of recursive includes.

I get one 'proper' globally defined type object but multiple duplicates
when the type appears as a contained type (in a complexType definition).
The only way I know this now is because I get different pointer values
for the XSxxx object when this situation arises, even though they end up
pointing to the same type.

Does anybody know firsthand whether there is any internal mechanism to
prevent this from happening (apparently not), and what can be done, at
present, to prevent this duplication from occuring.

It has occurred to me that it might be a good idea to create a new type
of parser warning specifically regarding the issue of 'recursive
includes'.  This of course only makes sense if there is a strong
consensus that this is a classic anti-pattern of XML Schema development
and should be avoided at all costs.  I can see more or less how to
implement it outside of Xerces by constructing a dependency graph of the
schema files and testing for back-edges.  So my question about this side
of things is whether there is any desire to make this test a built in
part of the parser to make the parser smarter about these things?

Thanks for some feedback here.

Elisha Berns
[EMAIL PROTECTED]
tel. (310) 556 - 8332
fax (310) 556 - 2839




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to