-3

When I validate my DTD file, I get this error --> Attribute type must be declared for element type profile. How should I edit my DTD file to remove this error?

External DTD

!ELEMENT profile ANY

XML file

<profile type="jpeg">C:\Users\username\Desktop\image3.jpg</profile>

XSL file

<td rowspan="6" align="left" style="color:#C0C0C0;"> <img src="{profile}" />

I had to remove the tags just for it to display on Stack Overflow.

Aniket V
  • 3,183
  • 2
  • 15
  • 27

1 Answers1

1

Declare attributes in the DTD as:

<!ELEMENT  profile       (#PCDATA)*                 >
<!ATTLIST  profile
             type        CDATA            #IMPLIED  >
Joel M. Lamsen
  • 7,143
  • 1
  • 12
  • 14