XML 맵핑 편집기 릴리스 정보

© Copyright International Business Machines Corporation 2006. All rights reserved. US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.

릴리스 정보

1.0 설명
2.0 제한사항
3.0 알려진 문제점 및 임시 해결책
   3.1 minOccurs가 0 또는 1이 아닐 경우 요소의 배열이 개별적으로 표시됨
   3.2 그룹 참조에 대해 상수 맵을 정의할 때 올바르지 않은 XSL이 생성됨
   3.3 그룹 참조가 있는 배열 하위 맵핑을 수행할 때 올바르지 않은 XSL이 생성됨

1.0 설명

이 릴리스 정보 파일에는 WebSphereR Integration Developer XML 맵핑 편집기의 제한사항, 알려진 문제점 및 임시 해결책에 대한 최신 정보가 들어 있습니다.

2.0 제한사항

없음

3.0 알려진 문제점 및 임시 해결책

3.1 minOccurs가 0 또는 1이 아닐 경우 요소 배열이 개별적으로 표시됨

XSD 스키마에서 minOccurs가 0 또는 1이 아닌 요소를 정의할 때(다음과 유사):

<element maxOccurs="max_integer" minOccurs="min_integer" name="elementName" type="yourType"/>

여기서,

해당 XSD 스키마를 소스 또는 대상으로 사용할 때 두 개 이상의 elementName 항목이 XML 맵핑 편집기에 표시됩니다 .  상위 요소에서 elementName으로 일치사항 맵핑을 수행할 경우, elementName은 여러 번 맵핑되며 따라서 원하지 않는 맵핑이 발생할 수 있습니다.

임시 해결책 1:
상위 요소에서 일치사항 맵핑을 수행하기 전에 elementName의 각 항목을 맵핑하십시오.

임시 해결책 2:
minOccurs를 0 또는 1로 설정하십시오.

3.2 그룹 참조에 대한 상수 맵을 정의할 때 올바르지 않은 XSL이 생성됨

다음 예제와 유사한 그룹 참조를 사용하는 XSD 스키마에 복합 유형이 있다고 가정하십시오.

<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>

XML 맵핑 편집기에서 해당 XSD 스키마를 대상으로 선택하고 emplID를 상수 값으로 맵핑하려고 시도할 경우, 해당 맵에서 생성된 XSL은 올바르지 않습니다.

해결책은 다음과 같습니다.

  1. 먼저 요소(emplID)를 소스 트리의 루트 요소로 맵핑한 후 XSLT 기능 정의...를 사용하여 상수 값을 지정하십시오.
  2. 그룹의 나머지 요소(location, data)를 원하는 값으로 맵핑하십시오.

결과로 생성되는 XSL은 올바릅니다.

3.3 그룹 참조가 있는 배열 하위 맵핑을 수행할 때 올바르지 않은 XSL이 생성됨

스키마 1에 다음과 같은 컨텐츠가 있다고 가정하십시오.

<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>

XML 맵핑 편집기를 사용하여 스키마 1을 스키마 2로 맵핑하고  Raw_materials에서 MaterialDataSet로의 맵(모든 하위 요소 포함)을 작성하려고 시도할 경우, 생성되는 XSL이 올바르지 않습니다.

임시 해결책 1:
스키마 2의 경우 minOccurs="3"을 minOccurs="0"으로 변경하고 이들 두 요소에 대한 일치사항 맵핑을 수행하십시오.  생성되는 XSL은 올바릅니다.

임시 해결책 2:

  1. materialid에서 첫 번째 MaterialDataSet/matID로의 맵핑 작성
  2. /RawMaterials[1]/materialid/text()의 XPath 표현식을 사용하는 첫 번째 MaterialDataSet/matID에 대한 XSLT 기능 정의...
  3. quantity에서 첫 번째 MaterialDataSet/qty로의 맵핑 작성
  4. /RawMaterials[1]/quantity/text()의 XPath 표현식을 사용하는 첫 번째 MaterialDataSet/qty에 대한 XSLT 기능 정의...
  5. materialid에서 두 번째 MaterialDataSet/matID로의 맵핑 작성
  6. /RawMaterials[2]/materialid/text()의 XPath 표현식을 사용하는 두 번째 MaterialDataSet/matID에 대한 XSLT 기능 정의...
  7. quantity에서 두 번째 MaterialDataSet/qty로의 맵핑 작성
  8. /RawMaterials[2]/quantity/text()의 XPath 표현식을 사용하는 두 번째 MaterialDataSet/qtyAa에 대한 XSLT 기능 정의...
  9. materialid에서 세 번째 MaterialDataSet/matID로의 맵핑 작성
  10. /RawMaterials[3]/materialid/text()의 XPath 표현식을 사용하는 세 번째 MaterialDataSet/matID에 대한 XSLT 기능 정의...
  11. quantity에서 세 번째 MaterialDataSet/qty로의 맵핑 작성
  12. /RawMaterials[3]/quantity/text()의 XPath 표현식을 사용하는 세 번째 MaterialDataSet/qty에 대한 XSLT 기능 정의...
  13. 맵 저장 및 XSL 생성
  14. XSL 파일을 열고 다음 구조물 검색:
        <xsl:template name="MaterialDataSet">
             <reservedRawMatDataSet>
        ...
        <xsl:template name="MaterialDataSet_1">
             <reservedRawMatDataSet>
        ...
        <xsl:template name="MaterialDataSet_2">
             <reservedRawMatDataSet>
        ...
  15. 다음 행 찾기:
     <xsl:call-template name="MaterialDataSet"/>
  16. 다음 행을 뒤에 추가:

    <xsl:call-template name="MaterialDataSet_1"/>
    <xsl:call-template name="MaterialDataSet_2"/>

이제 XML 맵핑 편집기에서 맵핑한 것과 일치하도록 XSL 템플리트가 적절히 호출됩니다.