QUOTE(fsloke @ 1 Jul, 2008 - 06:30 PM)

CODE
<!ELEMENT message (recipient, text, originator, create_date?)>
<!ATTLIST message
id ID #REQUIRED
gateway_id CDATA #REQUIRED
status CDATA "U"
encoding CDATA "7"
priority CDATA "N"
ref_no CDATA #IMPLIED
status_report CDATA #IMPLIED
flash_sms CDATA #IMPLIED
src_port CDATA #IMPLIED
dst_port CDATA #IMPLIED >
<!ELEMENT recipient (#PCDATA)>
<!ELEMENT text (#PCDATA)>
<!ELEMENT originator (#PCDATA)>
<!ELEMENT create_date (#PCDATA)>
How the xml sheet will look like?
in my opinion:
<message>
<recipient>12</recipient>
<text>Hello</text>
<originator>13</originator>
<create_date>2088-12-16</create_date>
</message>
What meanning of ATTLIST?
Thank you
ATTLIST specifies what attributes go with a specified element. The above XML tree will not validate against the aforementioned DTD as some required attributes have not been specified for the message element.
Instead of <message>, it should be
<message id="something" gateway_id="something" ...>
<recipient>12</recipient>
.
.
</message>