hi everybody.
I have an XML that looks like this
and an xsd schema that I want to validate the xml. the schema is
i'm using VS 2003 and when I try to validate the xml I get the following error:
--------------------------
"two wrongs don't make a right, but three lefts do" - the unknown sage
I have an XML that looks like this
Code:
<InterOpMessage xmlns="[URL unfurl="true"]http://www.apl.ro/interop">[/URL]
<EnvelopeVersion>1.0</EnvelopeVersion>
<Header>
<MessageDetails>
<Class>ITL_DECC_01</Class>
<Timestamp></Timestamp>
</MessageDetails>
<SenderDetails>
<IDAuthentication>
<SenderID>1547</SenderID>
</IDAuthentication>
</SenderDetails>
</Header>
<InterOpDetails />
<Body />
</InterOpMessage>
and an xsd schema that I want to validate the xml. the schema is
Code:
<?xml version="1.0" ?>
<xsd:schema targetNamespace="[URL unfurl="true"]http://www.apl.ro/interop"[/URL] xmlns:xsd="[URL unfurl="true"]http://www.w3.org/2001/XMLSchema"[/URL]
xmlns="[URL unfurl="true"]http://www.apl.ro/interop"[/URL]
xmlns:gt="[URL unfurl="true"]http://www.apl.ro/interop"[/URL] attributeFormDefault="unqualified" elementFormDefault="qualified" version="2.0"
id="interOpMessage_Envelope">
<xsd:element name="interOpMessage">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="EnvelopeVersion" type="xsd:string" />
<xsd:element name="Header">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="MessageDetails">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="Class">
<xsd:simpleType>
<xsd:restriction
base="gt:UnicodeNameString">
<xsd:maxLength value="32" />
<xsd:minLength value="4" />
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="Timestamp" type="xsd:dateTime"
minOccurs="0" />
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="SenderDetails" minOccurs="0">
<xsd:complexType>
<xsd:sequence>
<xsd:element ref="gt:IDAuthentication" minOccurs="0"
/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="InterOpDetails">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="Keys" minOccurs="0">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="Key" minOccurs="0"
maxOccurs="unbounded">
<xsd:complexType>
<xsd:simpleContent>
<xsd:extension
base="gt:UnicodeNameString">
<xsd:attribute
name="Type" type="gt:UnicodeNameString" use="required" />
</xsd:extension>
</xsd:simpleContent>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="Body" minOccurs="0">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="Data" minOccurs="0">
<xsd:complexType>
<xsd:sequence>
<xsd:any namespace="##any" processContents="lax"
minOccurs="0" maxOccurs="unbounded" />
</xsd:sequence>
<xsd:anyAttribute namespace="##any" />
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="IDAuthentication">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="SenderID" type="xsd:string" minOccurs="0" />
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:simpleType name="UnicodeNameString">
<xsd:restriction base="xsd:string">
<xsd:pattern value="[\p{L}\p{Nd}_\-\(\)\{\}]*" />
</xsd:restriction>
</xsd:simpleType>
</xsd:schema>
i'm using VS 2003 and when I try to validate the xml I get the following error:
Code:
The '[URL unfurl="true"]http://www.apl.ro/interop:InterOpMessage'[/URL] element is not declared. An error occurred at , (1, 2).
--------------------------
"two wrongs don't make a right, but three lefts do" - the unknown sage