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.1 Mapping Rule File Definition Format

L.1.2 parentRule

mark1Description

This tag specifies rules relating to parent elements.

mark1Format

<parentRule id="attribute value" tagname="attribute value" parent="attribute value"
controller="attribute value" controller-arg="attribute value" />

mark1Attributes

[Table L-2 Attributes]

Attribute name

Description

Required item?

Id

Specifies the mapping rule identifier (*1).
This attribute must be specified.

Required

tagname

Specifies the name of the XML tag converted by the parentRule tag.
This attribute must be set.
If spaces ("") are specified as the value for this attribute, the opening and closing parentRule tags will not be output.

Required

parent

Specifies the mapping rule identifier of the parent rule for a parent tag that exists in the parentRule tag. This attribute need not be specified if the XML documents that are output by the parentRule tag are the root element of the XML documents. Otherwise it must be specified.
Additionally, a parentRule tag with a mapping rule identifier specified by this attribute must be defined before defining the parentRule tag for which the parent tag is specified.

Conditional

controller

To specify consolidation under the parentRule tag, set "KEY" as the value of the controller attribute.
Records where the column value for the element specified by the controller-arg attribute is the same as for a record that has already been processed are consolidated in a single parent element.
Duplicate column elements under this parent element are eliminated, and those that remain become siblings. Consolidation is performed only if the controller attribute is specified.

Optional

controller-arg

Specifies the elements to be consolidated, in addition to the mapping rule identifier for the attribute or column elements to be consolidated. For each record, the consolidation process checks if the column name indicated by the specified mapping rule identifier is the same as any other record that has already been processed. If any such records are found, they will be consolidated. Multiple columns can be checked using commas to separate each mapping rule identifier.

Optional

*1) 'Mapping rule identifiers' are used to identify mapping rules. Each mapping rule identifier must be unique within a mapping rule file.

mark1Elements

None

mark1Notes on the parentRule Tag

Mapping rule files must always include one parent rule for the root element that does not specify the parent attribute.

If "KEY" is specified as the value of the controller attribute, parents (parentRule) under the specified parentRule tag are grouped together under a single parent if the elements under the specified columnRule tag have the same value. When KEY is specified, it is necessary to specify a columnRule mapping rule identifier for the controller-arg attribute.
If more than one columnRule mapping rule identifier is specified for the controller-arg attribute, consolidation will occur only when all specified element values are the same. If the columnRule tags under the parentRule tag that specifies the KEY attribute contain element values not specified by the controller-arg attribute, only the last of these element values will be stored during consolidation.
Element values in results tables must be sorted using the consolidated column values.

Contents Index PreviousNext

All Rights Reserved, Copyright(C) FUJITSU LIMITED 2006