[jboss-dev-forums] [Design of JBossXB] - DtdAwareContentHandler to support SAX2 LexicalHandler events
scott.stark@jboss.org
do-not-reply at jboss.com
Sun Nov 5 18:23:45 EST 2006
The only way I can get the version for ejb2.x descriptors is to get the doctype. I hacked in some support for this by adding an extended ContentHandler that supports the startDTD/endDTD from the SAX2 LexicalHandler:
| interface DtdAwareContentHandler extends ContentHandler
| {
| public void startDTD(String name, String publicId, String systemId);
| public void endDTD();
| }
|
The DelegatingContentHandler supports this, and the ObjectModelBuilder and DelegatingObjectModelFactory have been updated to pass this even on based on reflection of the type ObjectModelFactory:
| public class BookObjectFactory
| implements ObjectModelFactory
| {
| // ObjectModelFactory implementation
|
| public void startDTD(String name, String publicId, String systemId)
| {
| // Get version info from publicId...
| }
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3983333#3983333
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3983333
More information about the jboss-dev-forums
mailing list