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.3 Extracting Fixed Values

The following example shows how to extract fixed values that do not exist in the results table as XML documents.

Results Table

The following mapping rule generates the XML document where fixed values that do not exist in the results table are specified as the attributes of the PERSON root tag.
This example also shows how mapping rules can be used to specify XML namespaces in the root tag.

Mapping Rule

<?xml version="1.0"?>
<MappingRule>
<parentRule id="p1" tagname="PERSON" />
<extensionRule id="e1" attrname="xmlns:info" attrof="p1" extender="STATIC" extender-arg="http://host.sample.co.jp/dtd/info"/>
<columnRule id="c1" colname="A" tagname="info:NUM" parent="p1" />
<columnRule id="c2" colname="B" tagname="info:NAME" parent="p1" />
<columnRule id="c3" colname="C" tagname="info:JOB" parent="p1" />
</MappingRule>

This mapping rule outputs the following XML document:

[Figure L-5 XML Output Data]


Contents Index PreviousNext

All Rights Reserved, Copyright(C) FUJITSU LIMITED 2006