Hello,

i have tried to implement this szenario: a dtd using another dtd which
is referenced by a parameter entity.

Ok, perhaps its better to create a simple example:
1. document.dtd:

<!ENTITY % prolog SYSTEM "prolog.dtd">
&header;
<!ENTITY % main SYSTEM "main.dtd">
&main;
<!ELEMENT document (prolog, main);

2. prolog.dtd:
<!ELEMENT prolog (#PCDATA)>

3. main.dtd
<!ELEMENT main (#PCDATA)>

4. example.xml
<?xml version="1.0"?>
<!DOCTYPE document SYSTEM "document.dtd">
<document>
  <prolog>text</prolog>
  <main>text</main>
</document>

This is a very short example, but demonstrate what i mean. If you want
to validate example.xml you get following error:

[Fatal Error] descriptionfile.dtd:5:1: The markup declarations contained
or pointed to by the document type declaration must be well-formed.
org.xml.sax.SAXException: Stopping after fatal error: The markup
declarations contained or pointed to by the document type declaration
must be well-formed.
  at
org.apache.xerces.framework.XMLParser.reportError(XMLParser.java:1228)
  at
org.apache.xerces.framework.XMLDTDScanner.reportFatalXMLError(XMLDTDScanner.java:651)

  at
org.apache.xerces.framework.XMLDTDScanner.scanDecls(XMLDTDScanner.java:1524)

  at
org.apache.xerces.framework.XMLDocumentScanner.scanDoctypeDecl(XMLDocumentScanner.java:2203)

  at
org.apache.xerces.framework.XMLDocumentScanner.access$000(XMLDocumentScanner.java:86)

  at
org.apache.xerces.framework.XMLDocumentScanner$PrologDispatcher.dispatch(XMLDocumentScanner.java:887)

  at
org.apache.xerces.framework.XMLDocumentScanner.parseSome(XMLDocumentScanner.java:381)

  at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:1081)
  at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:1122)
  at sax.SAXCount.print(SAXCount.java:158)
  at sax.SAXCount.main(SAXCount.java:392)

Has anybody a idea whats wrong? I use Xerces 1.4.1 - and theoretical it
must be possible to split a dtd.



--
* Homepage: www.webis-world.de
* mailto        : [EMAIL PROTECTED]
* ICQ           : #57313947



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to