Dictionary-IV XSchema Requests – Overview
The READ directive specifies the XSchema definition to be used to process the XML request.
SYNTAX
READ XSchema-name
XSchema-name the Dictionary-IV XSchema definition name.EXAMPLE
READ OEFSCM01Returns the data collection defined by OEFSCM01 in XML format.
<?xml version="1.0" encoding="ISO-8859-1"?><XMLSource_OEFSCM01> <OELCUST> <Customer code>100100</Customer code> <Customer name>Toot-Your-Horn</Customer name> <Customer state>TX</Customer state> <Customer city>Port Lavaca</Customer city> <Customer phone>555-2341</Customer phone> <Sales representative>AF</Sales representative> </OELCUST></XMLSource_OEFSCM01>Override Values
Section titled “Override Values”When the XML XSchema request is made, the requestor can supply override values for the primary Link USING clause. This technique allows a single XSchema definition to be reused with varying key values.
For more information on USING syntax please refer to the Dictionary-IV Link Requests – Overview section.
EXAMPLE
OELCUST USING KEY "100100"; DATANAME LIST CUST-CODE CUST-NAME SR-CODE
OELSLRP USING #OEFCUST.SR-CODE; DATANAME LIST SR-NAMEThe XSchema OEFSCM99 is defined to return a collection of data for Customer Code “100100”.
READ OEFSCM99 LINK=OELCUST USING KEY "100102"An XML request with override values can be posted to return that same set of data for Customer Code “100102”:
The XSchema definition does not have to contain a valid key value if override values are used. The key value in the XSchema definition can simply function as a placeholder. In this case it is critical that an override value is always supplied when a XML request is posted referencing the XSchema definition.
The following is a valid XSchema definition:
OELCUST USING KEY "X"; DATANAME LIST CUST-CODE CUST-NAME SR-CODE
OELSLRP USING #OEFCUST.SR-CODE; DATANAME LIST SR-NAMEThe above will fail to return any results unless a valid USING clause is supplied as an override value.
READ OEFSCM99 LINK=OELCUST USING KEY "100102"From the TS XML DataServer Reference, version 8.9.1. Open this page in the PDF