0

I was reading up on XSD in this question where I saw this tool mentioned in the accepted answer comments. I went on to read the next answer and tried out their example.

I did not understand how the suggested XSD had no problems without including the line:

<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"> 

Is this the default behavior? Here's the proposed XSD for easier reading:

<?xml version="1.0" encoding="UTF-8"?>
<xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" 
xmlns:xs="http://www.w3.org/2001/XMLSchema">
  <xs:element name="root">
    <xs:complexType>
      <xs:sequence>
        <xs:element name="parent">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="child_one" type="xs:string" />
              <xs:element name="child_two" type="xs:int" />
            </xs:sequence>
          </xs:complexType>
        </xs:element>
      </xs:sequence>
    </xs:complexType>
  </xs:element>
</xs:schema>

==Addition by MHK (because I can edit the post, but can't add a comment) ==

Deleting a post because you now know where you went wrong is inappropriate. That's not the way StackOverflow works.

Michael Kay
  • 156,231
  • 11
  • 92
  • 164
heretoinfinity
  • 1,528
  • 3
  • 14
  • 33

0 Answers0