根据XML写DTD的问题Down The Stream The Swans All Glide\x05Down the

根据XML写DTD的问题
Down The Stream The Swans All Glide
x05Down the stream the swans all glide;
x05It's quite the cheapest way to ride.
x05Their legs get wet,
x05Their tummies wetter.
x05I think after all
x05The bus is better.
Go North,South,East,and West,Young Man
x05Drake is going west,lads
x05So Tom is going East
x05But tiny Fred
x05just lies in bed.
x05The lazy little beast.
I Must Go Down To The Sea Again
I must go down to the sea again,
to the lonely sea and the sky;
I left my shoes and socks there -
I wonder if they're dry?
以上有两个层次的元素,我就是搞不清楚在DTD中是否要写两面对的声明
然后这是我写的DTD部分:
]>
xiabaobao51 1年前 已收到1个回答 举报

双胃淡 幼苗

共回答了21个问题采纳率:95.2% 举报

如果你定义两次,是无法通过的,因为你重复定义了,所以只需要定义一次即可.
另外,根据你写的xml文件,在左右都有,需要修改为如下:

1年前 追问

4

xiabaobao51 举报

可是这个xml里有一种是在quotable这个元素里的子元素 不是并列关系吧? I think after all The bus is better.

举报 双胃淡

如果不是并列关系的话,可以考虑,取不同的名字,这样就有区别了。

xiabaobao51 举报

我蛋疼了- -这是老师给的作业题目不能改xml部分的

举报 双胃淡

虽然不是并列关系,但是第一次回答里定义的方式是可以的。它们类型、名字都一样,应该没问题。别的也想不出什么办法了。
可能相似的问题
Copyright © 2024 YULUCN.COM - 雨露学习互助 - 17 q. 0.032 s. - webmaster@yulucn.com