-2

I need some help, making sure I understand this and doing it right.

The element rit

1.1. The element rit has an attribute version that must have the value 1.0

1.2. The element rit has a required attribute date that has a text representing the date of feed.

1.3. The element rit can have 0 or more feed elements

1.4. The element rit’s last element is a required doc-copyright element. The copyright statement for your company.

<!ELEMENT rit (version, date, feed*, doc-copyright) >

<!ATTLIST ret version CDATA #FIXED "1.0">

<!ATTLIST ret date CDATA #REQUIRED >

Thank you.

Micheal
  • 23
  • 4

1 Answers1

0

If version and date are attributes, they shouldn't be in the content model of the rit element declaration (remove them from (version, date, feed*, doc-copyright)).

Don't forget to add element declarations for the date and doc-copyright elements.

Having multiple ATTLIST declarations for an element is ok, but in my opinion it's easier to read and maintain a single ATTLIST for an element.

Example of changes...

<!ELEMENT rit (feed*, doc-copyright)>

<!ATTLIST ret 
          version CDATA #FIXED    "1.0"
          date    CDATA #REQUIRED     >

<!ELEMENT  feed (#PCDATA)>
<!ELEMENT  doc-copyright (#PCDATA)>
Daniel Haley
  • 51,389
  • 6
  • 69
  • 95
  • @Micheal - You're very welcome. Please consider accepting this answer by clicking on the checkmark to the left of it. – Daniel Haley Nov 27 '19 at 23:21