DTD prohibited on Notepad ++
Asked Answered
F

1

11

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!

Fortyniner answered 22/6, 2022 at 12:10 Comment(0)
T
15

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

Terminology answered 23/6, 2022 at 12:51 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.