Bagepalli, Kiran wrote:
I checked in the schema and it does not say that the local declaration with a same name cannot be at two levels of a element declaration.<element name ="First"> ... ... <element name ="Local"> //At level 1 - This is First's local element </element> <element name="Second"> ... <element name ="Local"> //At level 1 - This is second;s local element. </element> Most of the xerces code seems to make the assumption that given a level and a name you will always find a unique SchemaElemDecl in a grammar. This is not true. Am I missing some part of the spec here.
I don't know about your problem since I have had no problems with reusing element names in different contexts. Note however that the scope parameter to SchemaGrammar:getElemDecl() etc. is not the nesting level of the element declaration. Rather, it's a hash value referencing another element declaration that represents the scope. Exactly how to retrieve the scope for a given context is not clear to me, but is does seem to involve navigating the model groups of your grammar. Correct me if I'm wrong, anyone! Cheers, Emil -- =========================================================== Emil Astrom, software developer, Excosoft AB [EMAIL PROTECTED] tel: +46 8 633 29 00 http://www.excosoft.se =========================================================== --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
