I am new to XML and I am testing a simple XML with DTD validation on Notepad ++ using the XML tool plugin.
However, whenever I tried to validate the file I get DTD is prohibited. Please see below for a sample of what I was trying to run.
<?xml version="1.0"?>
<!DOCTYPE root[
DTD is prohibited. <---------------error message I get on Notepad ++
<!ELEMENT root (dept*, staff*)>
<!ELEMENT dept (#PCDATA)>
<!ELEMENT staff (staff | name)>
<!ELEMENT name (#PCDATA)>
<!ATTLIST dept id ID #REQUIRED>
<!ATTLIST staff id ID #REQUIRED dept IDREF #IMPLIED>
]>
<root>
<dept id="i1">it</dept>
<dept id="i2">law</dept>
<staff id="s3">
<name>steve</name>
</staff>
<staff id="s2" dept="i1">
<name>jerry</name>
</staff>
<staff id="s4" dept="i2">
<staff id="s5">
<name>peter</name>
</staff>
</staff>
</root>
Any help is appreciated, thanks!