Hi All, Our app must ensure that all the incoming XML data uses the same namespace bindings as those used in the data already persisted (i.e. the prefixes must match). In addition, it is required that all namespace declarations be on the document element. Perhaps I should mention that we are well aware that the XML Schema spec. makes the choice of prefixes arbitrary and the location of namespace declarations flexible, but we have our reasons for doing this (mainly for simplicity of data processing).
We've implemented a "brute-force" algorithm for setting the prefixes to desired values, but it turned out, not surprisingly, that on very large documents (MB) it was too slow. We're currently exploring the two optimization techniques listed below. I'd appreciate if you'd comment on them and even suggest alternatives: 1. Make use of Xerces symbol table and then replace all string comparisons by reference comparisons. Since prefix setting involves a large amount of string comparisons, it is expected that this should significantly improve performance. It is not clear to us, however, if Xerces uses a symbol table by default, and if so, how it can be accessed? 2. Adjust the prefixes at parsing time by using our own content handlers. This might be a more efficient solution, but also a bit more difficult to implement. Thanks, Alex --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
