0

我们有很多客户,客户特定文档中有几组不同后缀的单词。有时我们需要更新客户文档中包含的文字。为了更容易,单词存储在如下表中:

<row>
   <entry><ph id="1" customer="A">szolgáltatáshely</ph></entry>
   <entry><ph id="2" customer="A B C D E">szolgáltatási hely</ph></entry>
   <entry><ph id="3" customer="F">felhasználási hely</ph></entry>
</row>

该解决方案正在运行,但是我们在验证和生成 PDF 期间收到了很多警告和错误。有没有更好的方法可以消除这些警告?

警告消息:在同一主题上下文中发现 ID 为“some_id”的重复元素。

我们正在使用氧气 14.1

4

1 回答 1

0

通常,当您在同一个 DITA 主题中有两个具有相同 ID 的元素时,就会出现像您这样的问题,例如:

    <row>
        <entry><ph id="1" audience="A">test1</ph><ph id="1" audience="B">test2</ph></entry>
    </row>

即使您的分析将删除其中一个元素和发布作品,根据 DITA 规范,在同一主题中有两个具有相同 ID 的元素是非法的,因此 Oxygen 和发布在报告问题时都是正确的。

DITA 1.3 规格:

https://www.oxygenxml.com/dita/1.3/specs/archSpec/base/id.html

  The DITA specification requires that all IDs be unique within the context of a topic.

如果您想拥有符合 DITA 标准的有效内容,您可以尝试重写您的内容,例如:

    <row>
        <entry><ph id="1"><ph audience="A">test1</ph><ph audience="B">test2</ph></ph></entry>
    </row>
于 2017-07-03T06:36:28.827 回答