}
else
{
if (usedFixedUrls)
{
final PropertyTagV1 propTag = relatedTopic.getProperty(CommonConstants.FIXED_URL_PROP_TAG_ID);
if (propTag != null)
{
list.add(DocbookUtils.buildEmphasisPrefixedXRef(xmlDocument, XMLPreProcessor.OPTIONAL_LIST_PREFIX, propTag.getValue()));
}
else
{
list.add(DocbookUtils.buildEmphasisPrefixedXRef(xmlDocument, XMLPreProcessor.OPTIONAL_LIST_PREFIX, relatedTopic.getXRefID()));
}
}
else
{
list.add(DocbookUtils.buildEmphasisPrefixedXRef(xmlDocument, XMLPreProcessor.OPTIONAL_LIST_PREFIX, relatedTopic.getXRefID()));
}
}
}
else
{
if (internal)
{
final TranslatedTopicDataV1 relatedTranslatedTopicData = translatedTopicData.getLatestRelatedTranslationDataByTopicID(relatedTopic.getId());
if (relatedTranslatedTopicData != null)
{
final String url = getURLToInternalTranslatedTopic(relatedTranslatedTopicData.getTranslatedTopic().getId(), relatedTranslatedTopicData.getTranslationLocale());
/* Get the related translated data object and the title from the XML */
final String relatedTitle = DocBookUtilities.findTitle(relatedTranslatedTopicData.getTranslatedXml());
list.add(DocbookUtils.buildULink(xmlDocument, url, relatedTitle));
}
else
{
final String url = getURLToInternalTopic(relatedTopic.getId());
final String relatedTopicTitle = "[" + relatedTopic.getLocale() + "] " + relatedTopic.getTitle() + "*";
list.add(DocbookUtils.buildULink(xmlDocument, url, relatedTopicTitle));
translatedTopicTitleErrors.addTitle(relatedTopic.getTitle());
}
}
else
{
if (usedFixedUrls)
{
final PropertyTagV1 propTag = relatedTopic.getProperty(CommonConstants.FIXED_URL_PROP_TAG_ID);
if (propTag != null)
{
list.add(DocbookUtils.buildXRef(xmlDocument, propTag.getValue()));
}
else
{
list.add(DocbookUtils.buildXRef(xmlDocument, relatedTopic.getXRefID()));
}