Error loading XML Schema

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
dbgreco
Participant
Posts: 2
Joined: Tue Sep 21, 2004 11:57 am

Error loading XML Schema

Post by dbgreco »

I am receiving an error when tryng to import an XML schema as a table definition into DataStage. The error is -
Opened XML file: C:\Documents and Settings\ZD94461\Desktop\XML Schemas\Arel\Course.xsd
+ Warning: Unrecognized schema type, document element name = 'xs:schema'
. Here is the XSD -

Code: Select all

<?xml version="1.0" encoding="utf-8"?>
<xs:schema id="Course" xmlns="http://tempuri.org/Course.xsd" xmlns:mstns="http://tempuri.org/Course.xsd" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" targetNamespace="http://tempuri.org/Course.xsd" elementFormDefault="qualified">
	<xs:element name="Course">
		<xs:complexType>
			<xs:sequence>
				<xs:element name="course_id" type="len15"/>
				<xs:element name="title" type="len50"/>
				<xs:element name="credit" type="credits_range" minOccurs="0"/>
				<xs:element name="description" type="len255" minOccurs="0"/>
				<xs:element name="userid" type="len15"/>
				<xs:element name="studio_id" type="len10"/>
				<xs:element name="course_type" type="type_enum"/>
				<xs:element name="url" type="len255" minOccurs="0"/>
				<xs:element name="helpdesk" type="xs:unsignedByte"/>
				<xs:element name="language_id" type="len20" minOccurs="0"/>
				<xs:element name="internet_access" type="xs:unsignedByte" minOccurs="0"/>
				<xs:element name="course_grades_type" type="xs:unsignedByte"/>
				<xs:element name="max_participants_in_lesson" type="part_range"/>
			</xs:sequence>
		</xs:complexType>
	</xs:element>
	<xs:simpleType id="len15" name="len15">
		<xs:restriction base="xs:string">
			<xs:maxLength value="15"/>
			<xs:minLength value="1"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType id="len50" name="len50">
		<xs:restriction base="xs:string">
			<xs:minLength value="1"/>
			<xs:maxLength value="50"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType id="credits_range" name="credits_range">
		<xs:restriction base="xs:string">
			<xs:minLength value="0"/>
			<xs:maxLength value="999"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType id="len255" name="len255">
		<xs:restriction base="xs:string">
			<xs:minLength value="1"/>
			<xs:maxLength value="255"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType id="len10" name="len10">
		<xs:restriction base="xs:string">
			<xs:minLength value="1"/>
			<xs:maxLength value="10"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType id="len20" name="len20">
		<xs:restriction base="xs:string">
			<xs:minLength value="1"/>
			<xs:maxLength value="20"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType id="part_range" name="part_range">
		<xs:restriction base="xs:int">
			<xs:minExclusive value="0"/>
			<xs:maxInclusive value="10000"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType id="type_enum" name="type_enum">
		<xs:restriction base="xs:unsignedByte">
			<xs:enumeration value="1"/>
			<xs:enumeration value="2"/>
			<xs:enumeration value="3"/>
		</xs:restriction>
	</xs:simpleType>
</xs:schema>
. Any help is appreciated.
dbgreco
Participant
Posts: 2
Joined: Tue Sep 21, 2004 11:57 am

Post by dbgreco »

Nevermind. If I would just read the Help first:

The XML Meta Data Tool scans XML documents and creates DataStage table definitions from them. The table definitions are stored in the DataStage Repository.

The tool performs the following tasks:

Create table definitions from:

- a sample XML document

- a file containing an XML DTD

- an XML schema document based on XML-Data or XDR (not XSD)

You can't import a XSD fle into DataStage 6.0. HTH someone else.
newtier
Premium Member
Premium Member
Posts: 27
Joined: Mon Dec 13, 2004 5:50 pm
Location: St. Louis, MO

Post by newtier »

As an addendum to dgreco's post, it just so happens we are in the process of upgrading to 7.5.1, so we have both 6.0r3 and 7.5.1 installed.

7.5.1 supports schemas (but not DTDs I think), just the reverse of 6.0.

We were able to import the schema into 7.5.1, export the table definition, then import the table definition into 6.0. Still waiting on dgreco to test, but it imported OK and looked OK in the meta data.

(We are using the 2.0 version of the XML packs.)
Rick H
Senior Consultant
Post Reply