Unable to exchange codes or input, you can consider the following approach. This is a very common dichotomous approach to diagnosis , I'm afraid, and indeed you can easily start it ...
Try to reduce the size of the input XML by deleting parts of it, ensuring that the underlying XML document remains well formed and possibly valid (if validation is required in the parser setting). If you maintain validity, this may require a modification of the [copy] of the Scheme (DTD or another), since the mandate elements can be removed during the cut and try approach ... BTW, the error message seems to hint more at the validation question , which is the main problem of the statement of correctness.
, , ( , ) , .
, , . " ": XML- ? (, : , ...)
, ...