在My XML中,我得到的错误是“根元素之后的文档中的标记必须是格式良好的”。

时间:2013-03-21 06:53:40

标签: xml-dtd

我已经编写了一个xslt,用于将xml文件转换为html文件,如果我取出DTD部分(将其注释掉),该文件正常工作。

以下是我的DTD。你能否告诉我为什么我会收到这个错误?我如何纠正它以及如何在我的xml中使用我的DTD而没有错误。

    <?xml version="1.0" encoding="UTF-8"?>
<!-- ===================================================================

     Name:           SMGHK DTD
     Project:         SMGHK

     Purpose:       A generic DTD for SMGHK Books.

     =================================================================== -->
<!-- ======================================================================= -->
<!--                       Character Entities                                -->
<!-- ======================================================================= -->
<!ENTITY % ISOamsa PUBLIC "ISO 8879:1986//ENTITIES Added Math Symbols: Arrow Relations//EN//XML" "isoamsa.ent">
<!ENTITY % ISOamsb PUBLIC "ISO 8879:1986//ENTITIES Added Math Symbols: Binary Operators//EN//XML" "isoamsb.ent">
<!ENTITY % ISOamsc PUBLIC "ISO 8879:1986//ENTITIES Added Math Symbols: Delimiters//EN//XML" "isoamsc.ent">
<!ENTITY % ISOamsn PUBLIC "ISO 8879:1986//ENTITIES Added Math Symbols: Negated Relations//EN//XML" "isoamsn.ent">
<!ENTITY % ISOamso PUBLIC "ISO 8879:1986//ENTITIES Added Math Symbols: Ordinary//EN//XML" "isoamso.ent">
<!ENTITY % ISOamsr PUBLIC "ISO 8879:1986//ENTITIES Added Math Symbols: Relations//EN//XML" "isoamsr.ent">
<!ENTITY % ISObox PUBLIC "ISO 8879:1986//ENTITIES Added Math Symbols: Relations//EN//XML" "isobox.ent">
<!ENTITY % ISOcyr1 PUBLIC "ISO 8879:1986//ENTITIES Russian Cyrillic//EN//XML" "isocyr1.ent">
<!ENTITY % ISOcyr2 PUBLIC "ISO 8879:1986//ENTITIES Non-Russian Cyrillic//EN//XML" "isocyr2.ent">
<!ENTITY % ISOdia PUBLIC "ISO 8879:1986//ENTITIES Non-Russian Cyrillic//EN//XML" "isodia.ent">
<!ENTITY % ISOgrk1 PUBLIC "ISO 8879:1986//ENTITIES Greek Letters//EN//XML" "isogrk1.ent">
<!ENTITY % ISOgrk2 PUBLIC "ISO 8879:1986//ENTITIES Monotoniko Greek//EN//XML" "isogrk2.ent">
<!ENTITY % ISOgrk3 PUBLIC "ISO 8879:1986//ENTITIES Greek Symbols//EN//XML" "isogrk3.ent">
<!ENTITY % ISOgrk4 PUBLIC "ISO 8879:1986//ENTITIES Alternative Greek Symbols//EN//XML" "isogrk4.ent">
<!ENTITY % ISOlat1 PUBLIC "ISO 8879:1986//ENTITIES Added Latin 1//EN//XML" "isolat1.ent">
<!ENTITY % ISOlat2 PUBLIC "ISO 8879:1986//ENTITIES Added Latin 2//EN//XML" "isolat2.ent">
<!ENTITY % ISOnum PUBLIC "ISO 8879:1986//ENTITIES Numeric and Special Graphic//EN//XML" "isonum.ent">
<!ENTITY % ISOpub PUBLIC "ISO 8879:1986//ENTITIES Publishing//EN//XML" "isopub.ent">
<!ENTITY % ISOtech PUBLIC "ISO 8879:1986//ENTITIES General Technical//EN//XML" "isotech.ent">
%ISOamsa;%ISOamsb;%ISOamsc;%ISOamsn;%ISOamso;%ISOamsr;%ISObox;%ISOcyr1;%ISOcyr2;%ISOdia;%ISOgrk1;%ISOgrk2;%ISOgrk3;%ISOgrk4;%ISOlat1;%ISOlat2;%ISOnum;%ISOpub;%ISOtech;
<!-- ============================================================ -->
<!--                    ENTITY DEFINITIONS  -->
<!-- ============================================================ -->
<!ENTITY % form.elements SYSTEM
           "forms.ent">
<!ENTITY % table.elements SYSTEM
           "table.ent">
<!ENTITY % common.attrib " id
              ID
              #IMPLIED
       differentiation (grey | head | box | footnote) #IMPLIED
    columns CDATA #IMPLIED
    update-date CDATA #IMPLIED
    num CDATA #IMPLIED
         ">
<!ENTITY % block.elements "para | orderedlist | itemizedlist | unorderedlist | checklist | table | figure |
             simplelist | note | extract | box | maths | page">
<!-- "footnoteref", "footnote" and "ref" elements have been added to %inline.base on 06/21/2006 -->
<!ENTITY % inline.base "#PCDATA | endnoteref | xref | glossterm | endnote | phrase | quote | indexterm | content-style | footnoteref | footnote | ref | uri | case | casename | legal | break | page | c">
<!ENTITY % inline.elements "name | email | author | authorinitials | inlinegraphic | address | publishername | fib | page">
<!ENTITY % book-meta-model "product-number?, wms-number?, subject*, filing-instructions?, blurb?">
<!ENTITY % chapter-meta-model "author*, copyright?, pub-date?, subject*, contributor*, source*, rev-date?">
<!ENTITY % graphic-meta-model "text">
<!ENTITY % combined "endnoteref | xref | glossterm | endnote | phrase | quote | indexterm | content-style | footnoteref | footnote | ref | uri | case | casename | legal | name | email | author | authorinitials | inlinegraphic | address | publishername | fib | para | orderedlist | unorderedlist | itemizedlist | checklist | table | figure |
             simplelist | note | extract | box | break | page">
<!ENTITY % math-model "title?, subtitle?, equation+,
                         (para)*">
<!-- ============================================================ -->
<!--                    BOOK ELEMENTS  -->
<!-- ============================================================ -->
<!ELEMENT book ((page?, title, subtitle?), book-meta?, frontmatter, body, backmatter?)>
<!ATTLIST book
%common.attrib; 
pubid CDATA #IMPLIED
label CDATA #IMPLIED
type (chb | tre) #REQUIRED
interest-code CDATA #IMPLIED
interest-description CDATA #IMPLIED
>
<!ELEMENT book-meta (%book-meta-model;)>
<!ELEMENT frontmatter (page | figure | seriesinfo | bookinfo | journalinfo | toc | glossary | chapter | part)*>
<!ELEMENT body (chapter | part | page)*>
<!ELEMENT backmatter (glossary | bibliography | chapter | part | appendix | toa | index | page)*>
<!-- "title" and "edition" elements have been added to "bookinfo" element on 06/22/2006 -->
<!ELEMENT bookinfo (title?, (authors? | editor? | contribution? | graphic? | publisherinfo? | copyright? | contactinfo? | legalnotice? | catalogrecord? | isbn? | printinfo? | edition? | otherinfo | page)*)>
<!ATTLIST bookinfo
%common.attrib; 
>
<!ELEMENT journalinfo (journtitlepage?, journinfopage?)>
<!ATTLIST journalinfo
%common.attrib; 
>
<!ELEMENT journtitlepage (title?, subtitle?, (volume? | issue? | issuedate?)*)>
<!ATTLIST journtitlepage
%common.attrib; 
>
<!ELEMENT volume (#PCDATA)>
<!ATTLIST volume
%common.attrib; 
>
<!ELEMENT issue (#PCDATA)>
<!ATTLIST issue
%common.attrib; 
>
<!ELEMENT issuedate (day | month | year)*>
<!ATTLIST issuedate
%common.attrib; 
>
<!ELEMENT journinfopage (title?, (authors? | editors? | editorial? | contribution? | graphic? | publisherinfo? | copyright? | contactinfo? | legalnotice? | catalogrecord? | issn? | printinfo? | otherinfo)*)>
<!ATTLIST journinfopage
%common.attrib; 
>
<!ELEMENT editors (para? | editor)+>
<!ATTLIST editors
%common.attrib; 
>
<!ELEMENT editorial (title?, editors)>
<!ATTLIST editorial
%common.attrib; 
>
<!ELEMENT seriesinfo ((page?, title, subtitle?)?, editor?, issn?, pubhistory, (%block.elements;)*)>
<!ATTLIST seriesinfo
%common.attrib; 
>
<!ELEMENT printinfo (%block.elements;)*>
<!ATTLIST printinfo
%common.attrib; 
>
<!-- "edition" element has been created on 06/21/2006 -->
<!ELEMENT edition (#PCDATA)>
<!ATTLIST edition
%common.attrib; 
>
<!ELEMENT publisherinfo (para+)>
<!ATTLIST publisherinfo
%common.attrib; 
>
<!ELEMENT pubtitle (#PCDATA | endnoteref | xref | glossterm | endnote | phrase | quote | indexterm | content-style | footnoteref | footnote | ref | uri | case | casename | legal | break | name | email | author | authorinitials | inlinegraphic | address | publishername | fib | page)*>
<!ATTLIST pubtitle
%common.attrib; 
>
<!ELEMENT issn (#PCDATA)>
<!ATTLIST issn
%common.attrib; 
>
<!ELEMENT publishername (#PCDATA)>
<!ATTLIST publishername
%common.attrib; 
>
<!-- "title" element has been added to "pubhistory" element on 06/24/2006 -->
<!ELEMENT pubhistory (title?, (para? | publist)*)>
<!ATTLIST pubhistory
%common.attrib; 
>
<!ELEMENT publist (publication)+>
<!ATTLIST publist
%common.attrib; 
>
<!ELEMENT legalnotice (%block.elements;)+>
<!ATTLIST legalnotice
%common.attrib; 
>
<!ELEMENT copyright (para)+>
<!ATTLIST copyright
%common.attrib; 
>
<!ELEMENT otherinfo (title?, (%block.elements;)*)>
<!ATTLIST otherinfo
%common.attrib; 
>
<!ELEMENT catalogrecord (catalog)+>
<!ATTLIST catalogrecord
%common.attrib; 
>
<!ELEMENT catalog (address, para)+>
<!ATTLIST catalog
%common.attrib; 
>
<!ELEMENT publication (#PCDATA | pubtitle | author | edition)*>
<!ATTLIST publication
%common.attrib; 
>
<!ELEMENT isbn (#PCDATA)>
<!ATTLIST isbn
%common.attrib; 
>
<!ELEMENT editor (type?, (address? | name)*, affiliation?)>
<!ATTLIST editor
%common.attrib; 
>
<!ELEMENT type (#PCDATA)>
<!ATTLIST type
%common.attrib; 
>
<!ELEMENT affiliation (#PCDATA)>
<!ATTLIST affiliation
%common.attrib; 
>
<!ELEMENT contribution (label, contributor+)>
<!ATTLIST contribution
%common.attrib; 
>
<!ELEMENT label (#PCDATA)>
<!ATTLIST label
%common.attrib; 
>
<!ELEMENT contributor (role, name)+>
<!ATTLIST contributor
%common.attrib; 
>
<!ELEMENT role (#PCDATA)>
<!ATTLIST role
%common.attrib; 
>
<!ELEMENT case (#PCDATA | casename | content-style | break)*>
<!ATTLIST case
%common.attrib; 
type (reply | versus) #IMPLIED
>
<!ELEMENT casename (#PCDATA | content-style | break | pgs | page)*>
<!ATTLIST casename
%common.attrib; 
>
<!ELEMENT legal (#PCDATA | l-title | l-num | l-name | l-date | l-item | content-style)*>
<!ATTLIST legal
%common.attrib; 
type (USC | IRC | Pub-L | Statute | CFR | Secur-Act | Secur-Rel | Exch-Act | Exch-Rel | Exch-Rule | Regul | St-Code | Unif-Act | Rest | Fed-App | Fed-Bankr | Fed-Civ) #REQUIRED
>
<!ELEMENT l-title (#PCDATA | content-style)*>
<!ATTLIST l-title
%common.attrib; 
>
<!ELEMENT l-num (#PCDATA | content-style)*>
<!ATTLIST l-num
%common.attrib; 
>
<!ELEMENT l-name (#PCDATA | content-style)*>
<!ATTLIST l-name
%common.attrib; 
>
<!ELEMENT l-date (#PCDATA | content-style)*>
<!ATTLIST l-date
%common.attrib; 
>
<!ELEMENT l-item (#PCDATA | content-style)*>
<!ATTLIST l-item
%common.attrib; 
>
<!ELEMENT name (#PCDATA | honorific | firstname | middlename | surname)*>
<!ATTLIST name
%common.attrib; 
>
<!-- "orgname" element has been created on 06/21/2006 -->
<!ELEMENT orgname (#PCDATA | footnoteref | footnote)*>
<!ATTLIST orgname
%common.attrib; 
>
<!-- "title" element has been added to "contactinfo" element on 06/22/2006 -->
<!ELEMENT contactinfo (title?, para+)>
<!ATTLIST contactinfo
%common.attrib; 
>
<!ELEMENT authors (author)+>
<!ATTLIST authors
%common.attrib; 
>
<!ELEMENT toc (page | title | subtitle | toc-frontitem | toc-part | toc-backitem)*>
<!ATTLIST toc
%common.attrib; 
>
<!ELEMENT toc-frontitem (toc-title, toc-pg?, otherinfo*, author*)>
<!ATTLIST toc-frontitem
%common.attrib; 
num CDATA #IMPLIED
linkend IDREF #IMPLIED
endterm CDATA #IMPLIED
>
<!ELEMENT toc-backitem (toc-title, toc-pg?, otherinfo*, author*)>
<!ATTLIST toc-backitem
%common.attrib; 
num CDATA #IMPLIED
linkend IDREF #IMPLIED
endterm CDATA #IMPLIED
>
<!ELEMENT toc-part (title?, subtitle?, (toc-div | page)*)>
<!ATTLIST toc-part
%common.attrib; 
>
<!ELEMENT toc-div (title?, subtitle?, (toc-item | page)*)>
<!ATTLIST toc-div
%common.attrib; 
>
<!ELEMENT toc-item (toc-title?, toc-pg?, otherinfo*, author*, (toc-subitem | page)*)>
<!ATTLIST toc-item
%common.attrib; 
num CDATA #IMPLIED
linkend IDREF #IMPLIED
endterm CDATA #IMPLIED
>
<!ELEMENT toc-subitem (toc-title, toc-pg?, otherinfo*, author*, (toc-subitem | page)*)>
<!ATTLIST toc-subitem
%common.attrib; 
num CDATA #IMPLIED
linkend IDREF #IMPLIED
endterm CDATA #IMPLIED
level (1 | 2 | 3 | 4 | 5 | 6) #IMPLIED
>
<!ELEMENT toc-title (#PCDATA | content-style | xref | c)*>
<!ATTLIST toc-title
%common.attrib; 
>
<!ELEMENT toc-pg (#PCDATA | content-style | xref)*>
<!ATTLIST toc-pg
%common.attrib; 
>
<!-- TABLE OF AUTHORITIES (LIST OF CASES) -->
<!ELEMENT toa (pgs | title | subtitle | para | toa-section | page)*>
<!ATTLIST toa
%common.attrib; 
>
<!ELEMENT toa-section (title | subtitle | toa-div | page)*>
<!ATTLIST toa-section
%common.attrib; 
type CDATA #IMPLIED
>
<!ELEMENT toa-div (pgs | title | subtitle | toa-div | toa-entry | page)*>
<!ATTLIST toa-div
%common.attrib; 
level (div1 | div2 | div3 | div4 | div5) #REQUIRED
>
<!--ELEMENT toa-entry (primary-entry+, (secondary-entry | tertiary-entry)*)-->
<!ELEMENT toa-entry (primary-entry)>
<!ATTLIST toa-entry
%common.attrib; 
>
<!ELEMENT primary-entry (entry-name, pgs?, secondary-entry*)>
<!ATTLIST primary-entry
%common.attrib; 
>
<!ELEMENT secondary-entry (entry-name, pgs?, tertiary-entry*)>
<!ATTLIST secondary-entry
%common.attrib; 
>
<!ELEMENT tertiary-entry (entry-name, pgs?)>
<!ATTLIST tertiary-entry
%common.attrib; 
>
<!ELEMENT entry-name (#PCDATA | xref | content-style | unorderedlist | extract)*>
<!ATTLIST entry-name
%common.attrib; 
>
<!ELEMENT pgs (#PCDATA | pg)*>
<!ATTLIST pgs
%common.attrib; 
>
<!ELEMENT pg (#PCDATA | xref | content-style)*>
<!ATTLIST pg
%common.attrib; 
>
<!ELEMENT chapter (title | subtitle | chapter-meta | biography | toc | introduction | %block.elements; | forms | section | endnotes | bibliography | qandaset | appendix | exhibits | exhibit | letter | toa)*>
<!-- "aboutauthor" and "abbreviations" attribute values have been added to "type" attribute on 06/22/2006 -->
<!ATTLIST chapter
%common.attrib; 
type (cdinfo | acknowledgement | glossary | dedication | preface | aboutauthor | abbreviations | tabchap) #IMPLIED
level CDATA #IMPLIED
num CDATA #IMPLIED
interest-code CDATA #IMPLIED
interest-description CDATA #IMPLIED
>
<!ELEMENT chapter-meta (%chapter-meta-model;)>
<!ELEMENT glossary ((title, subtitle?)?, (%block.elements;)*, (glossdiv? | glossentry+))>
<!ATTLIST glossary
%common.attrib; 
>
<!ELEMENT biography ((title, subtitle?)?, (%block.elements;)*)>
<!ELEMENT bibliography ((title, subtitle?)?, (%block.elements;)*, (bibliodiv? | biblioentry+))>
<!ATTLIST bibliography
%common.attrib; 
>
<!ELEMENT bibliodiv ((title, subtitle?)?, (%block.elements;)*, (biblioentry)+)>
<!ATTLIST bibliodiv
%common.attrib; 
>
<!ELEMENT biblioentry (#PCDATA | endnoteref | xref | glossterm | endnote | phrase | quote | indexterm | content-style | name | email | author | authorinitials | inlinegraphic | address | publishername | fib | title | subtitle | citetitle | date | publisher | pagenums | uri | edition | volume | issue | page)*>
<!ATTLIST biblioentry
%common.attrib; 
>
<!ELEMENT citetitle (#PCDATA)>
<!ELEMENT date (day | month | year)*>
<!ELEMENT blank-date (para)>
<!ELEMENT pub-date (day | month | year)*>
<!ELEMENT rev-date (day | month | year)*>
<!ELEMENT day (#PCDATA)>
<!ELEMENT month (#PCDATA)>
<!ELEMENT year (#PCDATA)>
<!ELEMENT publisher (publishername, address*)>
<!ELEMENT pagenums (#PCDATA)>
<!-- "uri" element has been created on 06/22/2006 -->
<!ELEMENT uri (#PCDATA | content-style)*>
<!ATTLIST uri
%common.attrib; 
href CDATA #IMPLIED
>
<!ELEMENT glossdiv ((title, subtitle?)?, (%block.elements;)*, (glossentry)+)>
<!ATTLIST glossdiv
%common.attrib; 
>
<!ELEMENT glossentry (glossterm, (indexterm)*, (glosssee | glossdef+))>
<!ATTLIST glossentry
%common.attrib; 
>
<!ELEMENT glossterm (#PCDATA | endnoteref | xref | glossterm | endnote | phrase | quote | indexterm | content-style | footnoteref | footnote | ref | uri | case | casename | legal | break | name | email | author | authorinitials | inlinegraphic | address | publishername | fib | page)*>
<!ATTLIST glossterm
%common.attrib; 
linkend IDREF #IMPLIED
>
<!ELEMENT glosssee (#PCDATA | endnoteref | xref | glossterm | endnote | phrase | quote | indexterm | content-style | footnoteref | footnote | ref | uri | case | casename | legal | break | name | email | author | authorinitials | inlinegraphic | address | publishername | fib | page)*>
<!ATTLIST glosssee
%common.attrib; 
>
<!ELEMENT glossseealso (#PCDATA | endnoteref | xref | glossterm | endnote | phrase | quote | indexterm | content-style | footnoteref | footnote | ref | uri | case | casename | legal | break | name | email | author | authorinitials | inlinegraphic | address | publishername | fib | page)*>
<!ATTLIST glossseealso
%common.attrib; 
>
<!ELEMENT glossdef ((%block.elements;)+, glossseealso*)>
<!ATTLIST glossdef
%common.attrib; 
>
<!ELEMENT appendix (page?, title, subtitle?, (toc | %block.elements; | forms | section | exhibits | exhibit)*)>
<!ATTLIST appendix
     num CDATA #IMPLIED
     differentiation CDATA #IMPLIED
%common.attrib; 
>
<!ELEMENT index (title | subtitle | indexdiv | page)+>
<!ATTLIST index
%common.attrib; 
>
<!ELEMENT indexdiv (title, (indexentry | page)+)>
<!ATTLIST indexdiv
%common.attrib; 
>
<!ELEMENT indexentry (primaryie+, (secondaryie | tertiaryie | page)*)>
<!ATTLIST indexentry
%common.attrib; 
>
<!ELEMENT primaryie (#PCDATA | content-style | xref)*>
<!ATTLIST primaryie
%common.attrib; 
>
<!ELEMENT secondaryie (#PCDATA | content-style | xref)*>
<!ATTLIST secondaryie
%common.attrib; 
>
<!ELEMENT tertiaryie (#PCDATA | content-style | xref)*>
<!ATTLIST tertiaryie
%common.attrib; 
level (1 | 2 | 3 | 4) #IMPLIED
>
<!ELEMENT part ((title, subtitle?), (appendix | chapter | toc | index | glossary | bibliography | page)+)>
<!ATTLIST part
%common.attrib; 
>
<!ELEMENT section (title, subtitle?, (%block.elements; | forms | section)*)>
<!ATTLIST section
%common.attrib; 
type CDATA #IMPLIED
level (sect1 | sect2 | sect3 | sect4 | sect5 | sect6 | sect7 | sect8 | sect9 | sect10) #IMPLIED
number-type (arabic | lower.alpha | upper.alpha | lower.roman | upper.roman | manual | unnumbered) #IMPLIED
num CDATA #IMPLIED
>
<!ELEMENT box (title?, subtitle?, (%block.elements; | forms)*, (section)*)>
<!ATTLIST box
%common.attrib; 
border (border | none) "border"
>
<!ELEMENT subject (#PCDATA)>
<!ELEMENT source (para)*>
<!ELEMENT exhibits (exhibit+)>
<!ELEMENT exhibit (page?, exhibit-meta, blank-date?, head1?, head2?, (endorsement | policy | schedule | letter | other | page)*)>
<!ATTLIST exhibit
%common.attrib; 
type CDATA #IMPLIED
>
<!ELEMENT exhibit-meta (form-num?, title, subtitle?)>
<!ATTLIST exhibit-meta
%common.attrib; 
>
<!ELEMENT form-num (%inline.base;)*>
<!ELEMENT head1 (#PCDATA)>
<!ELEMENT head2 (#PCDATA)>
<!ELEMENT head3 (#PCDATA)>
<!ELEMENT endorsement ((title? | head1? | head2?)*, (figure | form | page)+)>
<!ATTLIST endorsement
%common.attrib; 
type CDATA #IMPLIED
>
<!ELEMENT letter (head1?, head2?, head3?, (to | via | subject | date | letter-info | %block.elements; | section)*, from?, (form)*)>
<!ATTLIST letter
%common.attrib; 
>
<!ELEMENT to (%combined;)*>
<!ATTLIST to
%common.attrib; 
>
<!ELEMENT via (%combined;)*>
<!ATTLIST via
%common.attrib; 
>
<!ELEMENT from (%combined;)*>
<!ATTLIST from
%common.attrib; 
>
<!ELEMENT letter-info (%combined;)*>
<!ATTLIST letter-info
%common.attrib; 
>
<!ELEMENT schedule ((title? | head1?)*, (figure | form | page)+)>
<!ATTLIST schedule
%common.attrib; 
type CDATA #IMPLIED
>
<!ELEMENT policy ((title? | head1? | head2?)*, (figure | form | page)+)>
<!ATTLIST policy
%common.attrib; 
>
<!ELEMENT other ((title? | head1? | head2?)*, (figure | form | page)+)>
<!ATTLIST other
%common.attrib; 
>
<!ELEMENT product-number (#PCDATA | content-style)*>
<!ATTLIST product-number
%common.attrib; 
>
<!ELEMENT wms-number (#PCDATA | content-style)*>
<!ATTLIST wms-number
%common.attrib; 
>
<!ELEMENT filing-instructions ((title? | edition? | subtitle?)*, (%block.elements;)*)>
<!ATTLIST filing-instructions
%common.attrib; 
>
<!ELEMENT blurb (title | edition | authors | %block.elements;)*>
<!ATTLIST blurb
%common.attrib; 
>
<!ELEMENT photo-credit (#PCDATA | content-style)*>
<!ATTLIST photo-credit
%common.attrib; 
>
<!ELEMENT introduction ((title, subtitle?)?, (%block.elements; | forms)*)>
<!ATTLIST introduction
%common.attrib; 
>
<!ELEMENT endnotes EMPTY>
<!ATTLIST endnotes
%common.attrib; 
>
<!ELEMENT text (#PCDATA)>
<!ATTLIST text
%common.attrib; 
>
<!ELEMENT maths (%math-model;)>
<!ATTLIST maths
%common.attrib; 
position (fixed | float | margin) #IMPLIED
>
<!ELEMENT equation (para | figure)*>
<!ATTLIST equation
%common.attrib; 
number (numbered | nonumber) #IMPLIED
eqn-num CDATA #IMPLIED
href CDATA #IMPLIED
display (inline | block) #REQUIRED
width CDATA #IMPLIED
height CDATA #IMPLIED
>
<!ELEMENT break (#PCDATA | content-style)*>
<!ATTLIST break
%common.attrib; 
>
<!ELEMENT page (#PCDATA | content-style)*>
<!ATTLIST page
num CDATA #IMPLIED
>

<!-- ============================================================ -->
<!--                    BLOCK ELEMENTS  -->
<!-- ============================================================ -->
%form.elements;

感谢。

1 个答案:

答案 0 :(得分:0)

无法确定为什么会收到错误消息,因为在您的问题中,您没有引用错误消息,并且您没有告诉您要调用的处理器或方式。因此,您获得的任何答案都必然会基于证据不足而进行猜测。

您展示的文档使用DTD语法。它不是XML文档,它不应该以XML声明开头。从您的描述中听起来好像您要求XML解析器将其解析为XML文档;不要那样做。