Re: possible bug while validating schemas

2006-10-30 Thread Michael Glavassevich
That will probably be good enough but it really depends on how much memory you have. Michael Glavassevich XML Parser Development IBM Toronto Lab E-mail: [EMAIL PROTECTED] E-mail: [EMAIL PROTECTED] "Paul Tomsic" <[EMAIL PROTECTED]> wrote on 10/30/2006 11:27:48 AM: > okay, just for a sanity check

Re: possible bug while validating schemas

2006-10-30 Thread Paul Tomsic
okay, just for a sanity check on this, would something like this seem to be the appropriate use of the SecurityManager to fulfill my needs of not running out of memory? SAXParser parser = new SAXParser(); parser.setFeature("http://xml.org/sax/features/validation";, true); parser

Re: possible bug while validating schemas

2006-10-29 Thread Michael Glavassevich
Hi Paul, You can avoid the OOM error by setting the JAXP secure processing feature [1] or a SecurityManager [2][3]. This puts a limit on the maxOccurs values in the schema. A fatal error is emitted if the limit is exceeded. Thanks. [1] http://xerces.apache.org/xerces2-j/javadocs/api/javax/xml

Re: possible bug while validating schemas

2006-10-29 Thread Paul Tomsic
ah, of course. great catch. thank you. is there an obvious way to trap for this? i'm working for a large organization that tends to have 1000's of ppl that could be the maker of the XSD. short of me making an FAQ page of best-practices (which no one will read) can i programatically trap for th

Re: possible bug while validating schemas

2006-10-29 Thread Michael Glavassevich
Hi Paul, This happens because you have maxOccurs="5" on " originDestinationPair". The larger the value of maxOccurs the more memory Xerces requires to build the DFA representation of the content model. If the value is sufficiently large you'll run out of memory. The workaround for this limi