xml 的最后一行呢,相应的 dtd 应该是什么
XML文件
根名称college.it有两个子节点principal和teacher.i为此编写了相应的dtd,但是如果没有附加任何元素的单个文本行呢?如何编写相应的dtd该行是:
This college is ranked 7th in the university
XML file
root name college.it has two child nodes principal and teacher.i wrote a corresponding dtd for that but what about a single a text line with no element attach to it.how to write a corresponding dtd line for that.the line is:
This college is ranked 7th in the university
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果元素可以包含文本内容(空白除外),则它必须使用混合内容模型。例如:
混合内容模型不允许您添加任何进一步的限制。例如,您不能要求
principal
仅使用一次或位于teacher
之前。通常,混合内容用于类似文档的半结构化数据。将这些额外信息放入
元素中可能会更好吗?If an element can contain text content (other than whitespace) it must use the Mixed content model. eg.:
The Mixed content model doesn't allow you to add any further restrictions. For example you can't require that
principal
is used only once or comes beforeteacher
.Normally Mixed content is used for document-like semi-structured data. Might it be better to kick that extra information into a
<ranking>
element?