Description

(Introduced in OpenInsight 4.1.3). Creates an XML Schema definition document (.XSD file) from fields in an OpenInsight table.

Syntax

retval = Create_XML_XSD_Schema (Tablename, Rpt_Fields, Dos_Path, DosFile)

Parameters

The Create_XML_XSD_Schema function has the following parameters.

ParameterDescription
TableNameOpenInsight table to be published as XML
Rpt_FieldsA value-mark delimited list of dictionary field names to be included in the XML Schema definition document.
DOS_PathUnused. Pass null.
DOSFileThe fully qualified path of the filename of the XML file for which the .XSD file is being created.

Returns

The fully qualified path name of the schema file associated with the XML file passed in DOSFile. No error is returned if the schema file is not successfully created.

See also

Extract_XML_Schema_Name()Get_XML_Value()Inet_OI_XML()XML_Importer()

Example

/* After the Create_XML_XSD_Schema() function is called, 
the Extract_XML_Schema_Name() function is called, 
the file C:\orders_schema.xsd will contain the schema definition 
for the ORDER_NO and ITEM_DESCRIPTIONS_ENTERED fields in the ORDERS table. */

declare function create_xml_xsd_schema
tablename = 'ORDERS'
rpt_fields = 'ORDER_NO':@vm : 'ITEM_DESCRIPTIONS_ENTERED'
dos_path = ''
dosfile = 'C:\orders.xml'
retval = create_xml_xsd_schema( tablename , rpt_fields , dos_path , dosfile)

Sample XSD File

Below is the contents of the schema file produced by running the example.

<?xml version="1.0" ?>
<rti:schema xmlns:rti="http://www.revelation.com/XMLSchema" rti:noNamespaceSchemaLocation="C:\orders.xml_schema.xsd">
<rti:annotation>
  <rti:documentation xml:lang="en">ORDERS schema created by the OpenInsight Schema Creator. 
  Copyright 2003. All rights reserved.</rti:documentation>
</rti:annotation>
<rti:element name="ORDERS" type="OIRowType" />
<rti:complexType name="OIRowType">
  <rti:element name="order_no" type="rti:integer" />
  <rti:element name="item_descriptions_entered_mv" type="item_descriptions_entered_mv_Type" />
</rti:complexType>
<rti:complexType name="item_descriptions_entered_mv_Type">
<rti:element name="item_descriptions_entered" type="rti:string" />
</rti:complexType>
</rti:schema>
  • No labels