thesaint
10-22-2008, 07:35 AM
Hi all,
I'm new to XML so I hope you guys can bear with me if the questions are simple.
I'm trying to put in an image source in XML-DTD. Below are the codings that I have input(I have simplified the codes to my error instead of putting the whole chunk in). But when I tried validating at http://validator.w3.org/check I'm getting errors.
I know that when I input <img src> it is an xhtml, however that is not what I want. I only want it kept within XML-DTD.
Please advise or can someone illustrate via another example?
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE information [
<!ELEMENT information (biography+, jobtype)>
<!ELEMENT biography (images)>
<!ELEMENT images (#PCDATA)>
<!ATTLIST images img src CDATA #REQUIRED>
...
]>
<information>
<biography>
<images src>
<img src="pictures/doctor/doctor4.jpg" />
</images src>
.....
</biography>
</information>
I'm new to XML so I hope you guys can bear with me if the questions are simple.
I'm trying to put in an image source in XML-DTD. Below are the codings that I have input(I have simplified the codes to my error instead of putting the whole chunk in). But when I tried validating at http://validator.w3.org/check I'm getting errors.
I know that when I input <img src> it is an xhtml, however that is not what I want. I only want it kept within XML-DTD.
Please advise or can someone illustrate via another example?
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE information [
<!ELEMENT information (biography+, jobtype)>
<!ELEMENT biography (images)>
<!ELEMENT images (#PCDATA)>
<!ATTLIST images img src CDATA #REQUIRED>
...
]>
<information>
<biography>
<images src>
<img src="pictures/doctor/doctor4.jpg" />
</images src>
.....
</biography>
</information>