If you turn off validation (valScheme==Never), then all elements are just marked as declared for ease of processing. Since if validation is off, the parser does not really care if the element is defined in the grammar or not, so for performance reason, all elements are just marked as "Declared".
But if you've turned on validation, and still see dummy root that is not defined in grammar has createReason==Declared, then it is a bug ............ and please let us know if that's the case. Tinny Alberto Massari wrote: > At 10.47 12/02/2002 -0800, you wrote: > >The ElementDecl pool from the validator is a collection of all the > >elements appear in the grammar, and in the XML document. > > > >Each element has a "CreateReason", if this element has a corresponding > >definition in the grammar, then the "CreateReason" == Declared. If this > >element only appears in the DTD ATTLIST, but itself is not defined in the > >grammar, then the "CreateReason" == AttList. If this element only appears > >in the XML document, but not defined in the grammar, then the > >"CreateReason" == JustFaultIn ... etc. > > > >So you can check the createReason by calling getCreateReason() and bypass > >those no needed. Or if you only want those element that are defined in > >the grammar, you can call isDeclared() directly. > > Tinny, > as far as I remember, last time I parsed a document with a dummy root the > create reason was Declared, just like the elements found in the XMLSchema. > > Alberto > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
