Hi,

I get an error message when I want to create a foreign key constraint in a dad file for using XML Extender to decompose an XML file:

SQL0530N: The insert or update value of the FOREIGN KEY "DB2ADMIN.PRIMTITLE.xxxxxx" is not equal to any value of the parent key of the parent table.

Here are the files:

<?xml version="1.0"?>
<!DOCTYPE DAD SYSTEM "C:\Program Files\IBM\SQLLIB\samples\db2xml\dtd\dad.dtd">
<DAD>
<dtdid>xmltest.dtd</dtdid>
<validation>YES</validation>
<Xcollection>
<prolog>?xml version="1.0"?</prolog>
<doctype>! DOCTYPE references SYSTEM "xmltest.dtd"</doctype>
<root_node>
<element_node name="references">
<RDB_node>
<table name="reference" key="ida"/>
<table name="primtitle" key="idb"/>
<condition>
reference.ida=primtitle.refid
</condition>
</RDB_node>
<element_node name="ref" multi_occurrence="YES">
<element_node name="key">
<text_node>
<RDB_node>
<table name="reference"/>
<column name="ida" type="integer"/>
</RDB_node>
</text_node>
</element_node>
<element_node name="primTitles">
<element_node name="primTitle" multi_occurrence="YES">
<element_node name="key">
<text_node>
<RDB_node>
<table name="primtitle"/>
<column name="idb" type="integer"/>
</RDB_node>
</text_node>
</element_node>
<element_node name="value">
<text_node>
<RDB_node>
<table name="primtitle"/>
<column name="title" type="varchar(100)"/>
</RDB_node>
</text_node>
</element_node>
</element_node>
</element_node>
</element_node>
</element_node>
</root_node>
</Xcollection>
</DAD>







<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE references SYSTEM "xmltest.dtd">
<references>
<ref>
<key>1</key>
<primTitles>
<primTitle>
<key>1</key>
<value>Titel11</value>
</primTitle>
<primTitle>
<key>2</key>
<value>Titel12</value>
</primTitle>
</primTitles>
</ref>
<ref>
<key>2</key>
<primTitles>
<primTitle>
<key>3</key>
<value>Titel21</value>
</primTitle>
<primTitle>
<key>4</key>
<value>Titel22</value>
</primTitle>
</primTitles>
</ref>
<ref>
<key>3</key>
<primTitles>
<primTitle>
<key>5</key>
<value>Titel31</value>
</primTitle>
<primTitle>
<key>6</key>
<value>Titel32</value>
</primTitle>
</primTitles>
</ref>
</references>





Thanks for your help.
Dennis