Consultor Eletrônico



Kbase P166760: Can an XML document be loaded when the DTD is not available?
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   28/05/2010
Status: Unverified

GOAL:

Can an XML document be loaded when the DTD is not available?

GOAL:

Can an XML document be loaded using the DOM when the DTD is not available?

GOAL:

Will X-Document:LOAD() fail when an internal DTD cannot be found, even when the validate parameter is FALSE?

GOAL:

Can an XML document be loaded when the DTD cannot be located if error 9082 is suppressed?

FACT(s) (Environment):

All Supported Operating Systems
Progress 9.x
OpenEdge 10.x

FIX:

If a DTD is specified in an XML document, the X-Document:LOAD() method will stop loading the document if the DTD cannot be opened. Error 9082 will be raised, and the message will be similar to the following:
X-NODEREF or X-DOCUMENT LOAD got an error: FATAL ERROR: file , line , column , message 'An exception occurred! Type:NetAccessorException, Message:Could not open file'. (9082)
The DTD is read even when the XML document is not validated against it, so the XML parser can check for entity declarations in the DTD.
Error 9082 can be suppressed with the NO-ERROR option, so the code can check the ERROR-STATUS handle and recover appropriately. However, this does not make the XML document continue loading; it only allows the code to handle the case where the document does not load.
It is possible to work around this problem using the SAX parser by overriding the DTD specified in the XML document with a local one; see Progress Solution P95901 for details. This capability is not available using the DOM parser.