Hi Sabrina,
Thanks for your response. Let me explain you the requirement a little more in detail. I am receiving schema definitions/metadata from multiple sources. These definitions/metadata are sent in the format of XSD or JSON Schema. All I am trying to do is comparing these metadata information across sources (like XSD and JSON in my example) and give an output if they match or not.
Below are sample XSD and JSON schemas -
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema elementFormDefault="qualified" targetNamespace="myNamespace/TroubleTicketCountResponse.xsd" version="214.0.00" xmlns="myNamespace/TroubleTicketCountResponse.xsd" xmlns:xs="">
<xs:element name="TicketCountResponse" type="TicketCountResponseInfo"/>
<xs:complexType name="TicketCountResponseInfo">
<xs:annotation>
<xs:documentation>Retrieves Ticket counts</xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:element minOccurs="0" name="addressId">
<xs:annotation>
<xs:documentation>Location Id</xs:documentation>
</xs:annotation>
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="30"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element minOccurs="0" name="organizationId" type="xs:int">
<xs:annotation>
<xs:documentation>Organization Identifier</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element minOccurs="0" name="assetId">
<xs:annotation>
<xs:documentation>CircuitId</xs:documentation>
</xs:annotation>
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="20"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element minOccurs="0" name="assetKey">
<xs:annotation>
<xs:documentation>AssetId</xs:documentation>
</xs:annotation>
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="30"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element minOccurs="0" name="accountOrganizationId" type="xs:string">
<xs:annotation>
<xs:documentation>accountOrganizationid</xs:documentation>
</xs:annotation>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:schema>
JSON -
"title": "CustomerTroubleTicketCount",
"description": "Retrieves Ticket counts",
"type": "object",
"properties": {
"addressId": {
"description": "replacement for Location Id",
"type": "string"
},
"organizationId": {
"description": "Organization Identifier",
"type": "number"
},
"assetId": {
"description": "Circuit Id",
"type": "string",
}
},
"assetKey": {
"description": "AssetId can be serial circuit/CLCI",
"type": "string",
}
},
"accountOrganizationId": {
"description": "accountOrganizationid",
"type": "string",
}
}
As you can see i have same fields in both the schemas. All I am trying to do is compare them using Talend and publish an output on the basis of that comparison.