#137 Topic names are not merged

open
nobody
None
5
2007-04-10
2007-04-10
Xuan Baldauf
No

Be this "input.xtm":

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE topicMap PUBLIC "-//TopicMaps.Org//DTD XML Topic Map (XTM) 1.0//EN"
"http://www.topicmaps.org/xtm/1.0/xtm1.dtd">
<topicMap id="x1nndk8s1c-0"
xml:base="file:/some/directory/input.xtm"
xmlns="http://www.topicmaps.org/xtm/1.0/" xmlns:xlink="http://www.w3.org/1999/xlink">
<topic id="x1nndk8spk-107af">
<baseName id="x1nndk8spk-107b1">
<baseNameString>Guest</baseNameString>
</baseName>
<baseName id="x1nndk8spk-bc24">
<baseNameString>Guest</baseNameString>
</baseName>
</topic>
</topicMap>

If you call "java org.tm4j.topicmap.cmd.Merge -o output.xtm input.xtm", then these two basenames should merge. However, they are not merged, as "output.xtm" will be something like (actual):

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE topicMap PUBLIC "-//TopicMaps.Org//DTD XML Topic Map (XTM) 1.0//EN"
"http://www.topicmaps.org/xtm/1.0/xtm1.dtd">
<topicMap id="x1nndk8s1c-0"
xml:base="file:/some/directory/output.xtm"
xmlns="http://www.topicmaps.org/xtm/1.0/" xmlns:xlink="http://www.w3.org/1999/xlink">
<topic id="x1nndk8spk-107af">
<baseName id="x1nndk8spk-107b1">
<baseNameString>Guest</baseNameString>
</baseName>
<baseName id="x1nndk8spk-bc24">
<baseNameString>Guest</baseNameString>
</baseName>
</topic>
</topicMap>

and not something like (expected):

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE topicMap PUBLIC "-//TopicMaps.Org//DTD XML Topic Map (XTM) 1.0//EN"
"http://www.topicmaps.org/xtm/1.0/xtm1.dtd">
<topicMap id="x1nndk8s1c-0"
xml:base="file:/some/directory/output.correct.xtm"
xmlns="http://www.topicmaps.org/xtm/1.0/" xmlns:xlink="http://www.w3.org/1999/xlink">
<topic id="x1nndk8spk-107af">
<baseName id="x1nndk8spk-485">
<baseNameString>Guest</baseNameString>
</baseName>
</topic>
</topicMap>

Discussion