469,357 Members | 1,729 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,357 developers. It's quick & easy.

Make a Schema Inline within another Schema


I am trying to create a schema with an inline schema in it. I have looked for a simple example of how to do this but i can't find one. I have included 2 simple schemas. How would i make the DataTypes.xsd as an inline schema within the Vendor.xsd

--- DataTypes.xsd ---
<?xml version="1.0"?>
<xsd:schema xmlns:ardt="urn:AR:DataTypes" xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="urn:AR:DataTypes" version="1.1">
<xsd:element name="Char4" type="ardt:Char4"/>
<xsd:element name="Char10" type="ardt:Char10"/>
<xsd:simpleType name="Char10">
<xsd:restriction base="xsd:string">
<xsd:maxLength value="10" fixed="false"/>
<xsd:simpleType name="Char4">
<xsd:restriction base="xsd:string">
<xsd:maxLength value="4" fixed="false"/>

--- Vendor.xsd ---
<?xml version="1.0"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ardt="urn:AR:DataTypes" elementFormDefault="qualified" attributeFormDefault="unqualified" version="0.1">
<xsd:import namespace="urn:AR:DataTypes" schemaLocation="DataTypes.xsd"/>
<xsd:complexType name="Vendor" mixed="false">
<xsd:element name="ID" type="ardt:Char4"/>
<xsd:element name="Name" type="ardt:Char10"/>

Any Help would be much appreciated
Feb 1 '07 #1
1 1473
839 Expert 512MB
Did you succeed to solve the problem ?
If yes, please let me know, in order to close the thread.
Mar 21 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

1 post views Thread by Matt McMinn | last post: by
1 post views Thread by martin | last post: by
2 posts views Thread by Edward Diener | last post: by
1 post views Thread by madhumadala | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by suresh191 | last post: by
1 post views Thread by Marylou17 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.