使用DTD验证时的元素顺序问题 [英] Element order issue when validating with DTD

查看:105
本文介绍了使用DTD验证时的元素顺序问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,


我正在尝试使用PHP 5对DTD验证我的XML文件,并且它会抛出元素顺序错误(见下文)。文件在FF中验证(一旦我在本地DTD部分中设置了使用的实体,但这是一个不适用于PHP的FF问题)。从一个更简单的DTD我知道DTD和XML中的元素顺序必须相同但我不知道错误1的原因是什么(一旦省略了可选元素,它看起来和我一样,甚至是顺序)。


另一个问题是嵌套构造似乎不会被libxml以某种方式识别出来。


有人可以帮助我吗?


谢谢


错误消息:

Hello,

I''m trying to validate my XML files against a DTD with PHP 5 and it spits out element order errors (see below). the files validate in FF (once I set the used entities in the local DTD part, but that''s a FF issue not applying to PHP). From a simpler DTD I know that element order must be the same in DTD and XML but I don''t know what the cause is for error 1 (once you leave out the optional elements, it looks the same to me, even the order).

the other issue is that the nested construct seems not to be recognized by libxml somehow.

can anyone help me here?

thanks

Error messages:

展开 | 选择 | 换行 | 行号

推荐答案

Heya,Dormilich。


DTD是什么样的?
Heya, Dormilich.

What''s the DTD look like?


这是DTD
that''s the DTD
展开 | 选择 | Wrap | < span class =codeLinkonclick =LineNumbers(this);>行号


为了防止Firefox疯了,我要继续将此主题移至XML论坛并让我们的XML专家权衡。
Just in case Firefox is being crazy, I''m going to go ahead and move this thread to the XML forum for a bit and have our XML experts weigh in.


这篇关于使用DTD验证时的元素顺序问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆