Difference between revisions of "XML Data mapper"

From GreenVulcano Wiki
Jump to: navigation, search
Line 28: Line 28:
 
*between the output of a function and a parameter of another function;
 
*between the output of a function and a parameter of another function;
 
*between the output of a function and a target element.
 
*between the output of a function and a target element.
In the folders below that buttons, it is possible to access the [http://en.wikipedia.org/wiki/XSLT XSLT] functions used for data-mapping grouped by topic.
+
In the folders below that buttons, it is possible to access the [[Functions|functions]] used for data-mapping grouped by topic.
 
===Links===
 
===Links===
 
A link is a relation between the node in the source format and its counterpart in the target format.
 
A link is a relation between the node in the source format and its counterpart in the target format.

Revision as of 17:16, 1 February 2012

Introduction

XML Data mapper module allows users to implement a data transformation from one format defined by a source xsd to a format defined by a target xsd, and create xsl documents in a data transformation defined in VulCon. The use of graphics speeds up the process of defining the mapping of data, and give it a simple and efficient graphical representation.

Create a data transformation

The steps required to create a graphical form of data transformation are:

  • Access the VulCon Core view and expand the GVDataTransformation node
  • Click on Transformations item with right mouse button and choose in the drop-down list
Transformations --> Create XSLT Transformation
  • Using the appearing wizard, insert the data transformation definition parameters:
    • Transformation Name: a configuration file with .gvxdt extension and a xsl transformation file with .xsl extension will be created with the name choosen in this field
    • Data Source: the datasource name that indicates the repository where files will be deposited
    • Path XSL: internal del datasource path in which the xsl file will be generated
    • XSD Input: xsd file name defining the source format
    • root XSD Input: source xsd file root element name from which start the data transformation operation. Xsd files suggested by the drop-down list are stored in the /conf/xsds folder
    • XSD Output: xsd file name defining the target format
    • root XSD Output: target xsd file root element name from which start the data transformation operation. Xsd files suggested by the drop-down list are stored in the /conf/xsds folder
  • Click the wizard Finish button: in Graphic Editor VulCon perspective will appear the Data mapper graphic editor.

Data mapper graphic editor

Data Mapper

In Data mapper graphic editor are visible the representations for input and output formats.Items followed by '=' character are attributes, while those enclosed in angle brackets '<>' are nodes of the xml data. Is it possible to compress or expand simply by clicking on '+' or '-' symbols on the left of each node name. The right pane contains the palettes used for the definition of the data mapping. The Select button allows the selection of the xsd nodes interested for the transformation. The Create link button allows to define links:

  • between a source and a target element;
  • between a source element and a parameter of a function;
  • between the output of a function and a parameter of another function;
  • between the output of a function and a target element.

In the folders below that buttons, it is possible to access the functions used for data-mapping grouped by topic.

Links

A link is a relation between the node in the source format and its counterpart in the target format. Clicking the Create link button in the Palette pane, link mode is enabled. In this mode is possible creating a new connection simply clicking on a node in the source xsd format, and dragging it on a target node. Once defined a new connection in the graphic area, properties of the selected object are shown in Properties area. 'Match' property allows the definition of the selected mapping generation mode:

  • template: a template node will be created e called into the mapping;
  • for-each: a for-each node will be created to generate all defined mapping.

Functions

{{#w4grb_rate:}} <w4grb_ratinglist latestvotes items="5" nosort/>