Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

DTD prohibited on Notepad ++

Tags:

xml

notepad++

dtd

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!

like image 369
J L Avatar asked Mar 27 '26 18:03

J L


1 Answers

Plugins > Xml Tools > Options then "Prohibit DTD=FALSE" in the "MSXML Features" section:

screenshot of location of the option

Taken from this answer in Spanish

like image 195
LMC Avatar answered Mar 29 '26 11:03

LMC



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!