Consultor Eletrônico



Kbase P9648: Error 49 when validation is used within LOAD method for XML
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   14/10/2008
Status: Verified

FACT(s) (Environment):

Progress 9.1x
UNIX

SYMPTOM(s):

Error 49 when validation is used within LOAD method for XML

The DTD contains the elements and its attributes. If the DTD have some elements defined but they're not included in the xml file, you're supposed to get an error saying that an 'Element ... is not valid for content model:...'.

This works properly in a Windows operating system. Any UNIX operating system prompts the error 49.

SYSTEM ERROR: Memory violation. (49).

X_NODEREF or X-DOCUMENT LOAD got an error: file ...message 'Element 'Agent' is not valid for content model: '(Test, Agent,... (9082)

CAUSE:

There is a bug in the error handling routine. One of the error message buffers is too small so it overflows when a generated error message reaches a certain length, causing the Memory violation.

FIX:

You have two possible workarounds:

1. LOAD the xml file with FALSE option as validate like:

l_xmldoc:LOAD("file","file.xml",FALSE).

Although you put FALSE, the document's physical structure is still validated.


2. Create a DTD with the exact elements included in each xml.