Hussein Shafie wrote: > Kevin Flynn wrote: >> >> Well, I don't really agree that these duplicate ID errors are any >> more real than the ones you already filter out - the source documents >> containing the variables are valid and have no duplicates. It just >> happens that source document A sometimes contains an ID that is the >> same as one in source document B. I can think of example uses where >> you might actually *want* to have two "variable" source documents >> with exactly the same set of variable IDs and then include them all >> in a "user" document. >> >> For example: >> >> productA.db: >> >> ... >> <para><phrase xml:id="name">Cheap Widget</phrase></para> >> <para><phrase xml:id="price">100 Euro</phrase></para> >> ... >> >> productB.db: >> >> ... >> <para><phrase xml:id="name">Expensive Widget</phrase></para> >> <para><phrase xml:id="price">200 Euro</phrase></para> >> ... >> >> priceList.db >> >> ... >> <variablelist> >> <varlistentry> >> <term><xi:include href="productA.db" xpointer="name" /></term> >> <listitem><xi:include href="productA.db" xpointer="price" >> /></listitem> >> </varlistentry> >> <varlistentry> >> <term><xi:include href="productB.db" xpointer="name" /></term> >> <listitem><xi:include href="productB.db" xpointer="price" >> /></listitem> >> </varlistentry> >> </variablelist> >> ... >> >> The duplicate IDs that result from this kind of use certainly have no >> practical consequence. Actually the IDs have no purpose in the >> *merged* document and could be stripped out during merging with no >> adverse effects in this case. >> > > In my opinion, the example above shows actual duplicate IDs. I would > recommend to use something like this: > > productA.db: > > ... > <para xml:id="cheap_widget"><phrase>Cheap Widget</phrase><phrase>100 > Euro</phrase></para> > ... > > productB.db: > > ... > <para xml:id="expensive_widget"><phrase>Expensive > Widget</phrase><phrase>200 Euro</phrase></para> > ... > > priceList.db > > ... > <variablelist> > <varlistentry> > <term><para><xi:include href="productA.db" > xpointer="element(cheap_widget/1)" /></para></term> > <listitem><para><xi:include href="productA.db" > xpointer="element(cheap_widget/2)" /></para></listitem> > </varlistentry> > <varlistentry> > <term><para><xi:include href="productB.db" > xpointer="element(expensive_widget/1)" /></para></term> > <listitem><para><xi:include href="productB.db" > xpointer="element(expensive_widget/2)" /></para></listitem> > </varlistentry> > </variablelist> > ... > Hi Hussein,
An approach that depends on element position rather than just IDs would not work in our case. However, I can see that I'm not going to convince you (and I can see why - the change I suggested would work for us but would not work in all cases), so consider the issue closed. Regards, Kevin Flynn

