Tuesday 21 June 2016

How to merge XSD's(2 or more) in TIBCO

  1. How to merge schema’s in TIBCO

  2. How to merge schema’s using import and include properties in TIBCO?
    1. Scenario

    2. Assume like we have 3 schema’s à EmployeeHistory, empDetails, empStatus.
      We want to merge three schemas in single XSD i.e EmployeeHistory
      1. empDetails (XSD):


      2. empStatus (XSD):



      3. EmployeeHistory (XSD):



    3. Solution




My requirementà we want to merge three schemas in single XSD.

Two ways we’ll merge schemas

  • INCLUDEà <xs:include schemaLocation="empDetails.xsd"/>

  • IMPORTà <xs:import namespace="http://www.tibco.com/schemas/FunctionsTest/Schema1.xsd3" schemaLocation="empStatus.xsd"/>


 

      1. INCLUDE:

      2. INCLUDEà Gotoà Overviewà includeà select schema which one you want to merge.


        NOTE: The namespace of an included schema must be the same as the base schema.
        EmployeeHistory:
        <?xml version="1.0" encoding="UTF-8"?>
        <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
        xmlns="http://www.tibco.com/schemas/FunctionsTest/Schema1.xsd"
        targetNamespace="http://www.tibco.com/schemas/FunctionsTest/Schema1.xsd"
        empDetails(XSD):
        <?xml version="1.0" encoding="UTF-8"?>
        <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
        xmlns="http://www.tibco.com/schemas/FunctionsTest/Schema1.xsd2"
        targetNamespace="http://www.tibco.com/schemas/FunctionsTest/Schema1.xsd2"
         
        In this scenario, if we try to merge these two schemas then it’ll prompt below error msg


        Include Output:


      3. IMPORT:




IMPORTà Gotoà Overviewà importà select schema which one you want to merge.






Import output:


  1. How to use import/include schema’s in TIBCO





NOTE:


If you try to add this imported schema in any process definition, for that we have to refer By namespace instead of By location.



Below are the screeshots for that



INCLUDE:




IMPORT:







No comments:

Post a Comment