Try OpenEdge Now
skip to main content
ABL Reference
Handle Attributes and Methods Reference : XML-SCHEMA-PATH attribute
 

XML-SCHEMA-PATH attribute

(WebSpeed Only)
A delimiter-separated list of directory paths for the XML Document Type Definition (DTD) associated with a particular XML document in a WebSpeed environment. Searched if the XML document contains a relative path to the DTD.
Data type: CHARACTER
Access: Readable/Writeable
Applies to: WEB-CONTEXT system handle
Almost identical to the SCHEMA-PATH attribute of the X-document and SAX-reader objects. Like SCHEMA-PATH, the pathnames can contain Unicode characters. See OpenEdge Development: Internationalizing Applications for more information about Unicode. For more information on SCHEMA-PATH, see the reference entry for the SCHEMA-PATH attribute.

What XML-SCHEMA-PATH avoids

In WebSpeed, the first time you access the X-document handle or any of its attributes, you trigger a load of the document, which precedes your access. For example, if you set the SCHEMA-PATH attribute of X-document (of WEB-CONTEXT) before accessing X-document (of WEB-CONTEXT) or any of its attributes, when the document arrives, WebSpeed first loads the document, then sets SCHEMA-PATH to your value. So at load time, SCHEMA-PATH might not contain your value, which might cause WebSpeed not to find your DTD, which might cause validation of the document to fail.
By contrast, if you set XML-SCHEMA-PATH instead of SCHEMA-PATH, when the document arrives, WebSpeed assigns the value of XML-SCHEMA-PATH to SCHEMA-PATH before doing anything else. As a result, WebSpeed searches for your DTD.

How to use XML-SCHEMA-PATH

In WebSpeed, instead of accessing the SCHEMA-PATH attribute of X-document (of WEB-CONTEXT), access XML-SCHEMA-PATH. For example, if you want a WebSpeed application to set the DTD search path (perhaps based on a Web request) of an XML document, instead of having the application set the SCHEMA-PATH attribute of X-document (of WEB-CONTEXT), have the application set the XML-SCHEMA-PATH attribute (of WEB-CONTEXT).
For more information on accessing XML documents using the Document Object Model (DOM) and SAX interfaces, see OpenEdge® Development: Working with XML.