Interstage Shunsaku Data Manager Application Development Guide - Microsoft(R) Windows(R) 2000/ Microsoft(R) Windows Server(TM) 2003 - - UNIX -
Contents Index PreviousNext

Appendix L XML Conversion Function Mapping Rules> L.3 Mapping Rule Conversion Examples

L.3.5 Extracting Column Data as Fixed Attributes

The following example shows how to extract XML documents by using column data as fixed attributes.

Results Table

The following mapping rule generates XML documents where a specific column value in the results table is used as the fixed attribute name for a particular tag.
This mapping rule also shows how to make the following fixed assignments:

Mapping Rule

<?xml version="1.0"?>
<MappingRule>
<parentRule id="p1" tagname="PERSON" />
<columnRule id="c1" colname="A" tagname="NUM" parent="p1" />
<attributeRule id="a1" colname="B" attrname="name" attrof="c1" />
<columnRule id="c2" colname="D" tagname="NAME" parent="p1" />
<attributeRule id="a2" colname="C" attrname="name" attrof="c2" />
<columnRule id= "c3" colname="E" tagname="JOB" parent="p1" />
<attributeRule id="a3" colname="F" attrname="name" attrof="c3" />
</MappingRule>

This mapping rule outputs the following XML document:

[Figure L-7 XML Output Data]


Contents Index PreviousNext

All Rights Reserved, Copyright(C) FUJITSU LIMITED 2006