问题描述
我正在使用VS Code和“ Red Hat支持的XML语言”。我指向的是DITA OT目录dita-ot-3.3.3\catalog-dita.xml
中的目录文件。我的DITA文件如下所示:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE task PUBLIC "-//oasis//DTD DITA Task//EN" "http://docs.oasis-open.org/dita/v1.1/OS/dtd/task.dtd">
<task>
<title>Running the converter</title>
<steps>
<step>
<cmd>Run the following command:</cmd>
</step>
</steps>
</task>
但是我收到类似以下错误:
Element type "task" must be declared.xml(MSG_ELEMENT_NOT_DECLARED)
因此,它正在读取内容,但无法正常工作。我使用了错误的目录文件吗?我的文件声明不正确吗?
顺便说一句:我有Oxygen XML Editor,如果需要高级功能,可以使用它。我希望在编写代码时偶尔使用VS Code,而无需启动Oxygen。