Here is my XSD. I am not able to understand why I keep getting this error:
CDIER0202E: Internal Fatal DOM error encountered while loading XML
schema=:urn|library|Test123247_1|resource|SmallCase.xsd:urn|library|Test123247_1|resource|SmallCase.xsd:urn|library|Test123247_1|resource|SmallCase.xsd:3:35:322:The
prefix “xsd” for element “xsd:element” is not bound..
Here is the new XSD after edits:
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:scotiaXML="http://xml.scotia.com" targetNamespace="http://xml.scotia.com" elementFormDefault="qualified" attributeFormDefault="unqualified" version="1.0">
<!-- Begin Level 1 =============================================-->
<xsd:element name="OTC_Matching" type="temp"/>
<xsd:complexType name="temp" mixed="false">
<xsd:sequence>
<xsd:choice>
<xsd:element ref="PostTrade"/>
</xsd:choice>
</xsd:sequence>
</xsd:complexType>
<!-- End Level 1 =============================================-->
<xsd:element name="PostTrade" type="PostTradeTransaction"/>
<xsd:complexType name="PostTradeTransaction" abstract="true">
<xsd:sequence>
<xsd:choice>
<xsd:element name="elem1" type="xsd:string"/>
</xsd:choice>
</xsd:sequence>
</xsd:complexType>
Your first problem is you haven’t assigned the namespace xsd to anything. Why are you using xs and xsd ? I think you want to replace xsd with xs everywhere.
A second problem is you haven’t provided a close tag.
A third problem is that you have not indicated that PostTrade is in a sequence with OTC_Matching.
Can you provide a sample xml you want to validate with this schema?
This gets further and gives me the error:
With this