Hi Dmitry, You can set a limit on entity expansion with the security-manager [1] property.
Thanks. [1] http://xerces.apache.org/xerces2-j/properties.html#security-manager Michael Glavassevich XML Technologies and WAS Development IBM Toronto Lab E-mail: mrgla...@ca.ibm.com E-mail: mrgla...@apache.org Dmitry Potapov <potapo...@gmail.com> wrote on 09/09/2013 06:30:47 AM: > Hello everyone, > > I have a small xml file (2 KB, attached), which contains DTD with entities > referencing other references, which in turn references yet another references > and so on. I've passed it to sax.Counter sample 20 minutes ago and it still > trying to process this file. No exceptions, no errors. (Even > OutOfMemoryException will be fine for me). > Memory consumption grows but it is not linear, it look like like > "memory = ln(time)" (see attachment) > > Is there any way to control DTD references depth, so I can throws SAXException > on such files? > Or, probably there is already option to control this present? I haven't found > one in samples/sax/Counter.java. > Or, probably there is a flag which disables entities resolving? > > > P.S. I've tried to turn on all validations in sample, but nothing changed. > > -- > Thanks in advance, > Dmitry > > --------------------------------------------------------------------- > To unsubscribe, e-mail: j-users-unsubscr...@xerces.apache.org > For additional commands, e-mail: j-users-h...@xerces.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: j-users-unsubscr...@xerces.apache.org For additional commands, e-mail: j-users-h...@xerces.apache.org