0

Having trouble getting my XML schema to work with my xml file.

The layout of the xml file is:

<catalogue>
    <nextID>02</nextID>
        <letters>
            <letter>
                <title> </title>
                <sender> </sender>
                <recipient> </recipient>
                <text> </text>
            </letter>
        </letters>
</catalogue>

the xml schema layout I have is:

<?xml version="1.0"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
 elementFormDefault="qualified">

 <xs:element name="catalogue">
  <xs:complexType>
    <xs:sequence>
        <xs:element name ="nextID">
        </xs:element>
        <xs:element name="letters">
            <xs:complexType>
                <xs:sequence>
                    <xs:element name="letter">
                        <xs:complexType>
                            <xs:sequence>
                                <xs:element name ="title" type="xs:string"/>
                                <xs:element name ="sender" type="xs:string"/>
                                <xs:element name="recipient" type ="xs:string"/>
                                <xs:element name ="text" type="xs:string"/>
                            </xs:sequence>
                                <xs:attribute name="id" type="xs:integer" use="required"/>
                        </xs:complexType>
                    </xs:element>
                </xs:sequence>
            </xs:complexType>
        </xs:element>
    </xs:sequence>
   </xs:complexType>
</xs:element>
</xs:schema>

Any solutions?

2
Contributors
1
Reply
10
Views
3 Years
Discussion Span
Last Post by pritaeas
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.