Mega Code Archive

 
Categories / XML / XML Schema
 

ComplexType outside the element

<?xml version="1.0"?> <name xmlns="http://www.rntsoft.com/name"   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"   xsi:schemaLocation="http://www.rntsoft.com/name Schema.xsd"   title="Mr.">   <first>first</first>   <middle>middle</middle>   <last>last</last> </name> File: Schema.xsd <?xml version="1.0"?> <schema xmlns="http://www.w3.org/2001/XMLSchema"   xmlns:target="http://www.rntsoft.com/name"   targetNamespace="http://www.rntsoft.com/name"   elementFormDefault="qualified">   <complexType name="NameType">     <sequence>       <element name="first" type="string" />       <element name="middle" type="string" />       <element name="last" type="string" />     </sequence>     <attribute name="title" type="string" />   </complexType>   <element name="name" type="target:NameType" /> </schema>