0
votes

I need to define a custom type date with some restriction. Currently i have:

<xs:simpleType name="validdatetype">
  <xs:restriction base="xs:date"/>
    <xs:minInclusive value="1900-01-01"/>
  </xs:restriction>
</xs:simpleType>

But when i try to open with some browser i get:

"Opening and ending tag mismatch: simpleType line 0 and restriction"

What am i doing wrong and how can i solve this? Thanks in advance and excuse my poor english!

1

1 Answers

1
votes

Your xs:restriction element is closed twice. Here's a fix:

<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
  <xs:simpleType name="validdatetype">
    <xs:restriction base="xs:date">
      <xs:minInclusive value="1900-01-01"/>
    </xs:restriction>
  </xs:simpleType>
</xs:schema>