The Xpetal -xsd option generates a W3C XML schema based on an RDF schema, generally the EPRI CIM RDF schema.

The XML schema produced does not reflect all of the structure in the input (CIM). It provides type and element definitions intended as building blocks for messages. In other words, the generated schema is not intended to stand alone but would normally be imported into various message schema.

Using the -xsd Option

A command line using the -xsd option has the following form:

java -Xmx100M -jar Xpetal-20010921a.jar -xsd xyz.rdf xyz.xsd

Note that the -Xmx option may be needed to allow enough memory.

Using the Generated Schema

The generated CIM/XSD schema is intended to be imported into a message schema. A sample message schema, message-model-01.xsd can be examined to see one approach. Here are the main steps in writing a message schema:

1. Declare Namespaces

Declare both a cim and a message namespace in the top element. Make the
message namespace the target of the schema:


2. Import CIM

Import (rather than include) the cim schema. You need to quote the cim namespace again here and the URL of the actual schema document:


3. Define a Message

A message will be defined as a complexType. Its constituent elements don't all come from the CIM. Those that do, are defined as follows:

To define a message element that refers to a CIM class use this form:

 <xsd:element name="locationOfWork" type="cim:Substation"/>

To define a message element that corresponds to a cim association, (ie
reuse a cim association in a message) use this form:

 <xsd:element ref="cim:Substation.MemberOf_SubControlArea"/>

Copyright 2001, 2002 Langdale Consultants
Contact Arnold deVos for further information.