Hello,
I'm trying to analyze a DTD document using the 'DTDGrammar' interface. I load the DTD using 'XMLDTDLoader' instance. Then I use 'getFirstElementDeclIndex()', 'getNextElementDeclIndex(int)', 'getElementDecl(int, XMLElementDecl)' to traverse through the declarations. Now I try to analyze the content model of each declaration but seem I can't get how the 'getContentSpec(int, XMLContentSpec)' behaves. The index I'm passing as argument is that I've used to obtain the corresponding element declaration. The results I get:
<!ELEMENT a (b, c)>
<!ELEMENT e (#PCDATA)>
<!ELEMENT f (#PCDATA)>
<!ELEMENT b ANY>
<!ELEMENT c (e, f)>
Seems like:
XMLElementDecl decl = new XMLElementDecl(); XMLContentSpec spec = new XMLContentSpec();
getElementDecl(1, decl); // returns "e" element declaration; getContentSpec(1, spec); // returns something different from // what I expect;
The content spec returned from the second method call seems to return an 'XMLContentSpec' representing the second particle in the "a" element content spec, i.e. "c".
Could somebody give me some hint here?
-- Thank you in advance, Stanimir
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]