【发布时间】:2016-06-01 12:32:39
【问题描述】:
以下 xml sn-p 使用 Oxygen XML 编辑器从 Xerces 引擎产生以下错误:
意外元素“代码块”。父元素类型的内容 必须匹配 "(dl|div|lcInteractionBase2|lcTrueFalse2|lcSingleSelect2|lcMultipleSelect2|lcSequencing2|lcMatching2|lcHotspot2|lcOpenQuestion2|fig|imagemap|lcInteractionBase|lcTrueFalse|lcSingleSelect|lcMultipleSelect|lcSequencing|lcMatching|lcHotspot|lcOpenQuestion|image|lines|lq|note| lcInstructornote|lcInstructornote2|object|ol|p|pre|simpletable|sl|table|ul|boolean|cite|keyword|ph|b|i|line-through|overline|sup|sub|tt|u|q|term| text|tm|xref|state|data|sort-as|data-about|foreign|unknown|draft-comment|fn|indextermref|indexterm|required-cleanup)"。
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE learningContent PUBLIC "-//OASIS//DTD DITA Learning Content//EN" "learningContent.dtd">
<learningContent id="oc4j_learning_task1">
<title>Task 1</title>
<shortdesc></shortdesc>
<learningContentbody></learningContentbody>
<task id="oc4j_task1">
<title>Task 1</title>
<shortdesc/>
<taskbody>
<context>
<p><b>Requirements</b></p>
</context>
<steps>
<step>
<cmd>Login with sftp in the production server</cmd>
</step>
<step>
<cmd>Download the whole directory OC4J10 in your local directory</cmd>
</step>
<step>
<cmd>Make sure the system is using the same JDK (currently 1.6.0_45) from Oracle</cmd>
</step>
<step>
<cmd>Change the following files in /OC4J10/j2ee/home/config</cmd>
<substeps id="substeps_vty_xh4_dw">
<substep>
<cmd>application.xml</cmd>
<info>the file should point to the WAR (or expanded) files in your local
machine where the application modules are located as in following
example:
<codeblock>foo
</codeblock>
</info>
</substep>
</substeps>
</step>
</steps>
</taskbody>
</task>
</learningContent>
我试图放置一个像 div 这样的父元素(如错误所暗示的那样?),但它也不起作用。
【问题讨论】:
-
似乎 DITA 1.2 和 DITA 1.3 学习域 DTD 都不包含编程域模块,因此“learningContent”中的任何地方都不允许使用代码块。因此,当 Oxygen 报告验证错误时,它只是遵循规范。因此,例如,如果您查看 DITA 任务的 shell DTD:“DITA-OT\dtd\technicalContent\dtd\task.dtd”它在编程域(包含代码块或 codeph 等元素)内部引用,但学习 shell DTD “DITA-OT2.x\plugins\org.oasis-open.dita.v1_3\dtd\learning\dtd\learningContent.dtd”没有。
-
好吧,你可以把它作为答案:)