DTD problem: '(' seems to be missing
This should cover W3C XML Schema, Relax NG and DTD related problems.
-
- Posts: 26
- Joined: Wed Aug 24, 2005 10:47 am
DTD problem: '(' seems to be missing
Hello,
I get the following error message when I validate the DTD:
SystemID: /home/muewi/Clark3/quellen/synAnnot_B11varFullVersion.dtd
Position: 15:1
Beschreibung: F A '(' character or an element type is required in the declaration of element type "apostille".
<!ELEMENT apostille ((#PCDATA | ref)+)>
<!ATTLIST apostille
id ID #IMPLIED
n CDATA #IMPLIED
>
Maybe I'm just too stupid - I just can't see what I did wrong here.
Thanks,
Frank
I get the following error message when I validate the DTD:
SystemID: /home/muewi/Clark3/quellen/synAnnot_B11varFullVersion.dtd
Position: 15:1
Beschreibung: F A '(' character or an element type is required in the declaration of element type "apostille".
<!ELEMENT apostille ((#PCDATA | ref)+)>
<!ATTLIST apostille
id ID #IMPLIED
n CDATA #IMPLIED
>
Maybe I'm just too stupid - I just can't see what I did wrong here.
Thanks,
Frank
-
- Site Admin
- Posts: 2095
- Joined: Thu Jan 09, 2003 2:58 pm
Hi Frank,
DTDs are very restrictive with the use of PCDATA. You can use that only to specify elements that contain only text as in
<!ELEMENT x (#PCDATA)>
or to specify that an element can contain mixed content and in that case PCDATA must appear in a choice model with the elements that can be contained in that element and with a zero or more number of ocurances for the choice model, as in
<!ELEMENT x (#PCDATA|x|y|z)*>
In your case you can only do:
<!ELEMENT apostille (#PCDATA | ref)*>
If you need more consider XML Schema or Relax NG.
Best regards,
George
DTDs are very restrictive with the use of PCDATA. You can use that only to specify elements that contain only text as in
<!ELEMENT x (#PCDATA)>
or to specify that an element can contain mixed content and in that case PCDATA must appear in a choice model with the elements that can be contained in that element and with a zero or more number of ocurances for the choice model, as in
<!ELEMENT x (#PCDATA|x|y|z)*>
In your case you can only do:
<!ELEMENT apostille (#PCDATA | ref)*>
If you need more consider XML Schema or Relax NG.
Best regards,
George
-
- Posts: 26
- Joined: Wed Aug 24, 2005 10:47 am
Hi George,
thanks for your help!
Of course, I should have known that; I've read it several times. But the funny thing is: I exported the DTD containing this declaration from another XML-editor, where this DTD is valid. There are even other rules, like:
<!ELEMENT clauseCat ((#PCDATA),comment?,apostille?)>
and
<!ELEMENT div (head*,
(((#PCDATA|unclear_start|unclear_end|pb|pause|interject|poem|p|s|q)+,
((unclear_start|pb)?,(div,unclear_end?))*)|((unclear_start|pb)?,
(div,unclear_end?))+),comment?,apostille?)>
Best regards,
Frank
thanks for your help!
Of course, I should have known that; I've read it several times. But the funny thing is: I exported the DTD containing this declaration from another XML-editor, where this DTD is valid. There are even other rules, like:
<!ELEMENT clauseCat ((#PCDATA),comment?,apostille?)>
and
<!ELEMENT div (head*,
(((#PCDATA|unclear_start|unclear_end|pb|pause|interject|poem|p|s|q)+,
((unclear_start|pb)?,(div,unclear_end?))*)|((unclear_start|pb)?,
(div,unclear_end?))+),comment?,apostille?)>
Best regards,
Frank
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ Artificial Intelligence (AI Positron Assistant add-on)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service