Subject:SS4.6 103t: Crash - Validating XML Schema Author:Lee Humphries Date:20 May 2003 01:50 AM
Take any XML Schema and set the maxOccurs attribute on any element or attribute to something like 200000 instead of just "unbounded" and validate the schema.
Or try validating an XML document against such a schema.
Subject:Re: SS4.6 103t: Crash - Validating XML Schema Author:(Deleted User) Date:20 May 2003 08:59 AM
Hi Lee,
the only event that can prevent Stylus from detecting a crash and writing
the log is a stack overflow.
Given the description you provided, you have just hit a known limitation of
the Xerces C++ parser, documented at http://xml.apache.org/xerces-c/schema.html
"Limitations:
....
- Due to the way in which the parser constructs content models for elements
with complex content, specifying large values for the minOccurs or
maxOccurs attributes may cause a stack overflow or very poor performance in
the parser. Large values for minOccurs should be avoided, and unbounded
should be used instead of a large value for maxOccurs
"
Subject:Re: SS4.6 103t: Crash - Validating XML Schema Author:Lee Humphries Date:20 May 2003 06:32 PM
Hi Alberto,
>Given the description you provided, you
>have just hit a known limitation of the
>Xerces C++ parser, documented at
>http://xml.apache.org/xerces-c/schema.html
Which is a bit of a problem when the EDI transaction that I'm doing a custom schema for stipulates a limit of 200000 items.
Maybe some alert could be wrapped around the call to the Xerces validator to look for things like this that will cause Xerces to "spit the dummy".