© Copyright International Business Machines Corporation 2005. All rights reserved. US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
This release notes file contains late-breaking information about limitations and known problems and workarounds for the WebSphereR Integration Developer XML mapping editor.
None
If you define your element with minOccurs NOT equal to 0 or 1 in your XSD Schema, similar to this:
<element maxOccurs="max_integer" minOccurs="min_integer" name="elementName" type="yourType"/>
where:
- min_integer is equal or greater than two but equal or less than max_integer
- elementName is the name of the element
- yourType is the type of the element
two or more entries of elementName will be displayed in the XML mapping editor when you use this XSD Schema as either source or target. If you perform a match mapping from the parent element to elementName, elementName will be mapped multiple times and can result in undesirable mapping.
Workaround 1:
Map each entry of elementName before performing match mapping from the parent element.Workaround 2:
Set minOccurs to 0 or 1.
Assume that you have a complex type in your XSD Schema that uses a group reference similar to the following example:
<complexType name="MyType1">
<sequence>
<group ref="xsd1:myType1"/>
</sequence>
</complexType><group name="myType1">
<sequence>
<element name="emplID">
<simpleType>
<restriction base="int"/>
</simpleType>
</element>
<element name="location">
<simpleType>
<restriction base="string">
<maxLength value="10"/>
</restriction>
</simpleType>
</element>
<element name="data">
<simpleType>
<restriction base="string">
<maxLength value="1"/>
</restriction>
</simpleType>
</element>
</sequence>
</group>If you select this XSD schema as the target in the XML mapping editor and you are trying to map emplID to a constant value, the XSL generated from this map will be incorrect.
Here is the workaround:
- Map the element (emplID) to the root element in the source tree first and use Define XSLT Function... to assign the constant value.
- Map the rest of the element (location, data) in the group to the desired values.
The XSL generated as a result will be correct.
Assume schema 1 has this content:
<xsd:complexType name="Raw_Materials_Type">
<xsd:sequence>
<xsd:element minOccurs="0" name="materialid" type="xsd:int"/>
<xsd:element minOccurs="0" name="quantity" type="xsd:int"/>
</xsd:sequence>
</xsd:complexType><xsd:element maxOccurs="unbounded" minOccurs="1" name="RawMaterials" type="Raw_Materials_Type"/>
And assume that schema 2 has this content:<xsd:element maxOccurs="3" minOccurs="3" name="MaterialDataSet" type="reservedmaterialdataset"/>
<complexType name="reservedmaterialdataset">
<sequence>
<group ref="xsd1:reservedmaterialdatasetGroup"/>
</sequence>
</complexType>
<group name="reservedmaterialdatasetGroup">
<sequence>
<element name="matID" type="xsd:int"/>
<element name="qty" type="xsd:int"/>
</sequence>
</group>If you are mapping schema 1 to schema 2 using the XML mapping editor, and you are trying to create maps (including all children elements) for: Raw_materials to MaterialDataSet, the XSL generated will be incorrect.
Workaround 1:
Change the minOccurs="3" to minOccurs="0" for Schema 2 and perform match mapping for these two elements. The generated XSL will be correct.Workaround 2:
- Create Mapping from materialid to the 1st MaterialDataSet/matID
- Define XSLT Function... for the 1st MaterialDataSet/matID using XPath Expression of /RawMaterials[1]/materialid/text()
- Create Mapping from the quantity to the 1st MaterialDataSet/qty
- Define XSLT Function... for the 1st MaterialDataSet/qty using XPath Expression of /RawMaterials[1]/quantity/text()
- Create Mapping from materialid to the 2nd MaterialDataSet/matID
- Define XSLT Function... for the 2nd MaterialDataSet/matID using XPath Expression of /RawMaterials[2]/materialid/text()
- Create Mapping from quantity to the 2nd MaterialDataSet/qty
- Define XSLT Function... for the 2nd MaterialDataSet/qty using XPath Expression of /RawMaterials[2]/quantity/text()
- Create Mapping from materialid to the 3rd MaterialDataSet/matID
- Define XSLT Function... for the 3re MaterialDataSet/matID using XPath Expression of /RawMaterials[3]/materialid/text()
- Create Mapping from the quantity to the 3rd MaterialDataSet/qty
- Define XSLT Function... for the 3rd MaterialDataSet/qty using XPath Expression of /RawMaterials[3]/quantity/text()
- Save the map and generate XSL
- Open the XSL file and look for a construct like:
<xsl:template name="MaterialDataSet">
<reservedRawMatDataSet>
...
<xsl:template name="MaterialDataSet_1">
<reservedRawMatDataSet>
...
<xsl:template name="MaterialDataSet_2">
<reservedRawMatDataSet>
...- Find the line:
<xsl:call-template name="MaterialDataSet"/>- Append the following line after:
<xsl:call-template name="MaterialDataSet_1"/>
<xsl:call-template name="MaterialDataSet_2"/>Now the XSL template is being called properly to match what you mapped in the XML mapping editor.