Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Referencing XSD's correctly in XML

Status
Not open for further replies.

Lord1e

Programmer
Nov 30, 2004
1
GB
I'm just seetting out on a quest to get to grips with XML and have already got well and truly confused.

I'm trying to refernce this xml search file >

<?xml version="1.0" encoding="ISO-8859-1"?>

<xsd:schema xmlns:xsd=" targetNamespace="schema url in here?"
xmlns="schema url in here?"
elementFormDefault="qualified">
<xsd:include schemaLocation="search_order.xsd"/>
<xsd:element name="search_order">
<xsd:complexType>
<OrderRequest>
<SPReference>###</SPReference>
<RequestType>search_order</RequestType>
<GatewayOrderReferenceList>
<GatewayOrderReferenceList SearchType="detail"> </GatewayOrderReferenceList>
<GatewayOrderReferenceList SearchType="summary"> </GatewayOrderReferenceList>
</GatewayOrderReferenceList>
</OrderRequest>
</xsd:complexType>
</xsd:element>
</xsd:schema>


with this pre built schema >

<?xml version="1.0" encoding="ISO-8859-1"?>
<!-- edited with XMLSpy v2005 U ( by CB (-) -->
<xs:schema xmlns:xs=" elementFormDefault="qualified" attributeFormDefault="unqualified">
<xs:element name="OrderRequest">
<xs:annotation>
<xs:documentation>XML Request for a detailed search on individual SPG Order Codes </xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:sequence>
<xs:element name="SPReference" type="xs:string"/>
<xs:element name="RequestType">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="Search_Order"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="GatewayOrderReferenceList">
<xs:complexType>
<xs:sequence>
<xs:element name="GatewayOrderReference" maxOccurs="unbounded">
<xs:complexType>
<xs:simpleContent>
<xs:extension base="xs:string">
<xs:attribute name="SearchType" use="required">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="Detail"/>
<xs:enumeration value="Summary"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>

I've got errors all over the place and i'm getting very confused.

Could someone point me in the right direction ?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top