鉴于下面的 DTD 文件:
!ELEMENT hotels (address+)>
<!ELEMENT address (city,street,phone,hotelDetails)>
<!ELEMENT hotelDetails (hotel_code,hotel_rank,hotel_name)>
<!ELEMENT street (#PCDATA)>
<!ELEMENT city (#PCDATA)>
<!ELEMENT hotel_rank (#PCDATA)>
<!ELEMENT phone (#PCDATA)>
<!ELEMENT hotel_code (#PCDATA)>
<!ELEMENT hotel_name (#PCDATA)>
<!ELEMENT guests (id+)>
<!ELEMENT guestDetails (name,city,address,state)>
<!ELEMENT name (#PCDATA)>
<!ELEMENT city (#PCDATA)>
<!ELEMENT address (#PCDATA)>
<!ELEMENT state (#PCDATA)>
如您所见,我有两个不同的表:hotels
& guests
,其中两个表都有city
. 当我尝试保存文件时,XMLspy
我得到:
Element 'city' has already been declared.
有没有办法为两个表声明该字段?
问候
罗恩