You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-users@xerces.apache.org by Mike Traum <mt...@yahoo.com> on 2004/10/10 19:48:29 UTC

parameter entities are expanded even when setting setExpandEntityReferences(false)

Hi,
I am working on a xml pretty printer. So, I need to reconstruct the
DOCTYPE from a dom Document. It seems that setting
DocumentBuilderFactory.setExpandEntityReferences(false) does not stop
parameter entities from being expanded, so I cannot figure out a way
to reconstruct an identical DOCTYPE.

Here's an example:
<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
          "http://www.oasis-open.org/docbook/xml/4.0/docbookx.dtd" [
        <!ENTITY % edgents SYSTEM "edg.ent" >
        %edgents;
]>


Here's the output, when using DocumentType.getInternalSubset() to get
the entities:
<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
"http://www.oasis-open.org/docbook/xml/4.0/docbookx.dtd"  [
<!ENTITY % edgents SYSTEM 'edg.ent'>
<!ENTITY version '3.0.1'>
]
>


thanks,
mike



		
_______________________________
Do you Yahoo!?
Declare Yourself - Register online to vote today!
http://vote.yahoo.com

---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-user-help@xml.apache.org