Para gerar um xsd no progress, basta utilizar o WRITE-XMLSCHEMA.
Utilizando o pessoa.xml do post anterior

Exemplo

DEFINE TEMP-TABLE Pessoa
FIELD nome    AS CHARACTER
FIELD idade   AS INTEGER
FIELD sexo    AS CHARACTER
FIELD salario AS DECIMAL.

DEFINE VARIABLE cTargetType AS CHARACTER NO-UNDO.
DEFINE VARIABLE cFile AS CHARACTER NO-UNDO.
DEFINE VARIABLE lFormatted AS LOGICAL NO-UNDO.
DEFINE VARIABLE cEncoding AS CHARACTER NO-UNDO.
DEFINE VARIABLE lMinSchema AS LOGICAL NO-UNDO.
DEFINE VARIABLE retOK AS LOGICAL NO-UNDO.

ASSIGN
cTargetType = “file”
cFile = “pessoa.xsd”
lFormatted = YES
cEncoding = ?
lMinSchema = NO.

retOK = TEMP-TABLE Pessoa:WRITE-XMLSCHEMA(cTargetType,
cFile,
lFormatted,
cEncoding,
lMinSchema).


Arquivo gerado (pessoa.xsd)

<?xml version=”1.0″?>
<xsd:schema xmlns:xsd=”http://www.w3.org/2001/XMLSchema&#8221; xmlns=”” xmlns:prodata=”urn:schemas-progress-com:xml-prodata:0001″>
<xsd:element name=”Pessoa” prodata:proTempTable=”true” prodata:undo=”true”>
<xsd:complexType>
<xsd:sequence>
<xsd:element name=”PessoaRow” minOccurs=”0″ maxOccurs=”unbounded”>
<xsd:complexType>
<xsd:sequence>
<xsd:element name=”nome” type=”xsd:string” nillable=”true”/>
<xsd:element name=”idade” type=”xsd:int” nillable=”true”/>
<xsd:element name=”sexo” type=”xsd:string” nillable=”true”/>
<xsd:element name=”salario” type=”xsd:decimal” nillable=”true”/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:schema>

abs