Hi all,
Let say I have the following XML snippet:
<SubRoot>
<One/>
<Two/>
</SubRoot>
This part is validated against the following schema (relevant part):
<xs:element name="SubRoot" minOccurs="0">
<xs:complexType>
<xs:sequence>
<xs:element name="One" type="sdt:d_Double"/>
<xs:element name="Two" type="sdt:d_String"/>
</xs:sequence>
</xs:complexType>
</xs:element>
The types are defined as:
<xsd:simpleType name="d_Double">
<xsd:restriction base="xsd:double">
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="d_String">
<xsd:restriction base="xsd:string">
</xsd:restriction>
</xsd:simpleType>
Now, this validation fails since <One> is a "double" and the tag is empty... If I would change it to type string it works fine. Does anyone know why this is? Also any pointer to where I could find information about validation and what would be the expected result in a case like this (for various types).
Thank you
Bjorn
Let say I have the following XML snippet:
<SubRoot>
<One/>
<Two/>
</SubRoot>
This part is validated against the following schema (relevant part):
<xs:element name="SubRoot" minOccurs="0">
<xs:complexType>
<xs:sequence>
<xs:element name="One" type="sdt:d_Double"/>
<xs:element name="Two" type="sdt:d_String"/>
</xs:sequence>
</xs:complexType>
</xs:element>
The types are defined as:
<xsd:simpleType name="d_Double">
<xsd:restriction base="xsd:double">
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="d_String">
<xsd:restriction base="xsd:string">
</xsd:restriction>
</xsd:simpleType>
Now, this validation fails since <One> is a "double" and the tag is empty... If I would change it to type string it works fine. Does anyone know why this is? Also any pointer to where I could find information about validation and what would be the expected result in a case like this (for various types).
Thank you
Bjorn