0 Replies Latest reply on Nov 29, 2012 1:55 PM by 931428

    Mapping of XML attributes with XML elements in Mediator Transformations

    931428
      Hi,

      The soure XML look like as below in the source directory of file adapter/read:
      -------------------------------------------------------------------------------------------------------------
      <?xml version="1.0" encoding="ISO-8859-1" ?>
      <!-- Edited by Oracle JDeveloper 11.1.1.1.3®
      -->
      <CATALOG>
      <PLANT COMMON="Bloodroot" BOTANICAL="Sanguinaria canadensis">
      <ZONE>4</ZONE>
      <LIGHT>Mostly Shady</LIGHT>
      <PRICE>$2.44</PRICE>
      <AVAILABILITY>031599</AVAILABILITY>
      </PLANT>
      <PLANT COMMON="Columbine" BOTANICAL="Aquilegia canadensis">
      <ZONE>3</ZONE>
      <LIGHT>Mostly Shady</LIGHT>
      <PRICE>$9.37</PRICE>
      <AVAILABILITY>030699</AVAILABILITY>
      </PLANT>
      <PLANT COMMON="Marsh Marigold" BOTANICAL="Caltha palustris">
      <ZONE>4</ZONE>
      <LIGHT>Mostly Sunny</LIGHT>
      <PRICE>$6.81</PRICE>
      <AVAILABILITY>051799</AVAILABILITY>
      </PLANT>
      </CATALOG>


      The target XML will be as below in the target directory of file adapter/write.:
      ----------------------------------------------------------------------------------------------------------
      <?xml version="1.0" encoding="ISO-8859-1" ?>
      <!-- Edited by Oracle JDeveloper 11.1.1.1.3®
      -->
      <CATALOG>
      <PLANT>
      <COMMON>Bloodroot</COMMON>
      <BOTANICAL>Sanguinaria canadensis</BOTANICAL>
      </PLANT>
      <PLANT>
      <COMMON>Columbine</COMMON>
      <BOTANICAL>Aquilegia canadensis</BOTANICAL>
      </PLANT>
      <PLANT><COMMON>Marsh Marigold</COMMON>
      <BOTANICAL>Caltha palustris</BOTANICAL>
      </PLANT>
      </CATALOG>
      ------------------------------------------------------------------------------------------------------

      So, I need to map attributes(COMMON and BOTANICAL) of XML data in the source with common and botanical elements of the XML in the target. How should I map attributes with elements in the XSL editor of the Mediator Transformation.

      Thanks,
      Arnab