Getting the internal DTDI've made one minor change to the patch to support
DTD subsets. Now both internal and external DTD subsets are supported, which
allows proper round tripping if internal, external or a mixture of internal
and external subsets are used. There are example XML documents in
dom4j/xml/dtd of these 3 cases.

So the DocumentType interface now has 2 properties for the internal and
external declarations.

http://dom4j.org/apidocs/org/dom4j/DocumentType.html

One minor problem at the moment, which is documented here

http://dom4j.org/todo.html

is that there is currently no consistent way of deterimining which
declarations are internal or external for sure on Crimson (though this works
fine when using the Xerces SAX parser) so by default I've disabled this
feature. We can re-enable it when we can be sure this works across both
crimson and xerces.

e.g. to expand all DTD entities you could do this...

SAXReader reader = new SAXReader();
reader.setIncludeInternalDTDDeclarations( true );
reader.setIncludeExternalDTDDeclarations( true );
Document doc = reader.read( "foo.xml" );

DocumentType docType = doc.getDocType();
List internalDecls = docType.getInternalDeclarations();
List externalDecls = docType.getExternalDeclarations();

The above changes are now in CVS and the daily build.

James


_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


_______________________________________________
dom4j-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/dom4j-user

Reply via email to