dtd:
<?xml version="1.0" encoding="utf-8"?> <!element language (definition, tu, tuv, seg) > <!element definition > <!element tu > <!element tuv > <!element seg (#pcdata) > <!attlist tu id cdata #required > <!attlist tuv lang cdata #required >
xml:
<?xml version="1.0" encoding="utf-8"?> <!doctype language system "language.dtd"> <definition> # line seems problem <tu id="webpage-title-text"> <tuv lang="en"> <seg>demo cms</seg> </tuv> </tu> </definition>
the error message is:
document root element "definition", must match doctype root "language". [4]
my questions:
- what reason xml not considered valid against current dtd?
- what have missed in dtd?
- could recommend place take resource of learning how use dtds, schemas , etc.
change
<!doctype language system "language.dtd">
to
<!doctype definition system "language.dtd">
Comments
Post a Comment