/Stanimir Stamenkov/:

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.

O.k. I realize I need a different index and I've made the following experiment:


http://www.geocities.com/stanio/test/DTDModelTest.java.txt
http://www.geocities.com/stanio/test/content.dtd.txt

(remove the .txt name extension after the download)

Extending the 'XMLDTDLoader' to intercept the standard handling and access the 'DTDGrammar' being built I'm able to build a map for the element names and the corresponding content spec indexes. It is pretty dirty hack and it is not guaranteed to work if the implementation changes. So I've wondered how the built content spec table is used currently?

I've also read <http://xml.apache.org/xerces2-j/faq-grammars.html#faq-5>:

No such API exists at the current moment for DTD's.

and "DTDGrammar - getContentSpec" <http://nagoya.apache.org/bugzilla/show_bug.cgi?id=10989>, but I still wonder.


--
Stanimir


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



Reply via email to