chulett wrote:Pretty much what I meant... thinking perhaps this
igorlp - can you post an specific example or two of your issue? XML, xsd, errors/warnings, whatever you can.
Yes..
This is schema:
<?xml version="1.0" encoding="utf-8" ?>
- <xs:schema id="TElectricCircuitBatchSchema" targetNamespace="
http://iec.co.il/NIS/TElectricCircuitBatchSchema/v1.0" elementFormDefault="qualified" xmlns="
http://iec.co.il/NIS/TElectricCircuitBatchSchema/v1.0" xmlns:mstns="
http://iec.co.il/NIS/TElectricCircuitBatchSchema/v1.0" xmlns:xs="
http://www.w3.org/2001/XMLSchema">
- <!-- Interface no.20
-->
- <xs:element name="CircuitList">
- <xs:complexType>
- <xs:sequence>
- <xs:element name="Circuit" maxOccurs="unbounded">
- <xs:complexType>
- <xs:sequence>
- <xs:element name="ActionType">
- <xs:simpleType>
- <xs:restriction base="xs:string">
<xs:enumeration value="I" />
<xs:enumeration value="U" />
<xs:enumeration value="D" />
</xs:restriction>
</xs:simpleType>
</xs:element>
- <xs:element name="District">
- <xs:simpleType>
- <xs:restriction base="xs:string">
<xs:maxLength value="1" />
</xs:restriction>
</xs:simpleType>
</xs:element>
- <xs:element name="DistrictsTraverse" minOccurs="0">
- <xs:simpleType>
- <xs:restriction base="xs:string">
<xs:maxLength value="1" />
</xs:restriction>
</xs:simpleType>
</xs:element>
- <xs:element name="OperationalVoltage" minOccurs="0">
- <xs:simpleType>
- <xs:restriction base="xs:string">
<xs:maxLength value="8" />
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="CircuitID" type="xs:int" />
<xs:element name="NumOfPolesInCircuit" type="xs:int" minOccurs="0" />
<xs:element name="StationID" type="xs:int" minOccurs="0" />
<xs:element name="FieldNumber" type="xs:int" minOccurs="0" />
- <xs:element name="CircuitName" minOccurs="0">
- <xs:simpleType>
- <xs:restriction base="xs:string">
<xs:maxLength value="40" />
</xs:restriction>
</xs:simpleType>
</xs:element>
- <xs:element name="CircuitClassification" minOccurs="0">
- <xs:simpleType>
- <xs:restriction base="xs:string">
<xs:maxLength value="7" />
</xs:restriction>
</xs:simpleType>
</xs:element>
- <xs:element name="CircuitType" minOccurs="0">
- <xs:simpleType>
- <xs:restriction base="xs:string">
<xs:maxLength value="7" />
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="InstallationDate" type="xs:dateTime" minOccurs="0" />
<xs:element name="LastUpdateDate" type="xs:dateTime" minOccurs="0" />
- <xs:element name="SegmentConductorMaterial" minOccurs="0">
- <xs:simpleType>
- <xs:restriction base="xs:string">
<xs:maxLength value="255" />
</xs:restriction>
</xs:simpleType>
</xs:element>
- <xs:element name="SegmentConductorSize" minOccurs="0">
- <xs:simpleType>
- <xs:restriction base="xs:string">
<xs:maxLength value="255" />
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="SegmentWiresNumPerPhase" type="xs:int" minOccurs="0" />
- <xs:element name="GroundConductorMaterial" minOccurs="0">
- <xs:simpleType>
- <xs:restriction base="xs:string">
<xs:maxLength value="255" />
</xs:restriction>
</xs:simpleType>
</xs:element>
- <xs:element name="GroundConductorSize" minOccurs="0">
- <xs:simpleType>
- <xs:restriction base="xs:string">
<xs:maxLength value="255" />
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="GroundWiresNumPerPhase" type="xs:int" minOccurs="0" />
- <xs:element name="CircuitColor" minOccurs="0">
- <xs:simpleType>
- <xs:restriction base="xs:string">
<xs:maxLength value="20" />
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="Status" type="xs:int" minOccurs="0" />
<xs:element name="SerialNumber" type="xs:int" minOccurs="0" />
- <xs:element name="ApprovalDrawingID" minOccurs="0">
- <xs:simpleType>
- <xs:restriction base="xs:string">
<xs:maxLength value="30" />
</xs:restriction>
</xs:simpleType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
This is a file:
<?xml version="1.0" encoding="utf-8"?>
<CircuitList xmlns="
http://iec.co.il/NIS/TElectricCircuitBatchSchema/v1.0">
<Circuit>
<ActionType>I</ActionType>
<District>345</District>
<DistrictsTraverse>7</DistrictsTraverse>
<CircuitID>904</CircuitID>
<CircuitClassification>ק</CircuitClassification>
<CircuitType>ע</CircuitType>
<SegmentConductorMaterial>4</SegmentConductorMaterial>
<SegmentConductorSize>64.5</SegmentConductorSize>
<SegmentWiresNumPerPhase>1</SegmentWiresNumPerPhase>
<ApprovalDrawingID>rrrrrrrrrrrrrrrrrrrr</ApprovalDrawingID>
<OperationalVoltage>115657576576576</OperationalVoltage>
<FieldNumber>2211</FieldNumber>
<StationID>22</StationID>
<CircuitColor>1111111111111</CircuitColor>
<SerialNumber>5555555</SerialNumber>
</Circuit>
</CircuitList>
I mean that datastage do warnings for not rigth data, but validation of XML don't give errors or warnings