XML schema validation fails
Hi,
currently I have a little problem upon saving some excel worksheets as xml data. Normally cell's without a value are not exported into xml, because in my schema they are marked as optional (see schema below). But sometimes values are copy-pasted into the worksheet and I'll get the following error message while saving from the schema validation: "Error parsing '' as decimal datatype. The attribute 'Exposure' with value '' failed to parse." I can't find any differences to other "empty" cells - same format, formula and value are blank. Any ideas? Kind regards, Michael Here is the schema I use: <?xml version="1.0" encoding="UTF-8" standalone="yes"? <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" <xs:element name="test" <xs:complexType <xs:sequence <xs:element ref="myType" maxOccurs="unbounded" / </xs:sequence </xs:complexType </xs:element <xs:element name="myType" <xs:complexType <xs:attribute name="Exposure" type="Amount" use="optional" / </xs:complexType </xs:element <xs:simpleType name="Amount" <xs:restriction base="xs:decimal" <xs:minInclusive value="0" / <xs:fractionDigits value="12" / </xs:restriction </xs:simpleType </xs:schema |
All times are GMT +1. The time now is 08:22 AM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com