Oh I forgot you would also add the <!ENTITY dummyroot> to the dummy.dtd

-Shawn


>From: "Shawn Wilson" <[EMAIL PROTECTED]>
>Reply-To: [EMAIL PROTECTED]
>To: [EMAIL PROTECTED]
>Subject: Re: Check error in scan DTD--Description my question in detail--S 
>orry
>Date: Thu, 05 Jul 2001 23:25:19 -0700
>
>You should be able to accomplish this as follows:
>
>=== dummy.xml ===
><?xml version="1.0" encoding="ISO-8859-1"?>
><!DOCTYPE dummyroot SYSTEM "dummy.dtd">
><dummyroot/>
>
>
>=== dummy.dtd ===
><!ENTITY % thedtd SYSTEM
>   "the-real-dtd.dtd">
>%thedtd;
>
>That may or may not be the exact syntax, but it should be close.
>
>
>-Shawn
>
>===============================
>| Shawn A. Wilson             |
>| http://www.shawn-wilson.com |
>| [EMAIL PROTECTED]      |
>===============================
>
>
>
>>From: LiChao(�) <[EMAIL PROTECTED]>
>>Reply-To: [EMAIL PROTECTED]
>>To: "'[EMAIL PROTECTED]'" <[EMAIL PROTECTED]>
>>Subject: Re: Check error in scan DTD--Description my question in detail--S
>>orry
>>Date: Fri, 6 Jul 2001 13:52:39 +0800
>>
>>I feel so sorry...
>>If I don't know the root of the DTD,I couldn't have built the temporary 
>>XML
>>file at all.
>>As I had wrote
>><!DOCTYPE DOC SYSTEM "theMysteryDTDFile.dtd" >
>>then *DOC* must be the root element!
>>
>>But how could I finish my aim if I even don't know the root? How to parse 
>>a
>>DTD when I know nothing about it?
>>
>>-----ԭʼ�ʼ�-----
>>������: LiChao(�) [mailto:[EMAIL PROTECTED]]
>>����ʱ��: 2001��7��6�� 13:31
>>�ռ���: '[EMAIL PROTECTED]'
>>����: Re: Check error in scan DTD--Description my question in detail
>>
>>
>>
>>Hi,jas
>>
>>Maybe I hadn't descripted my question clearly.
>>
>>I have a DTD file. I don't know the content of the file. I don't know 
>>which
>>is the root of the DTD. Now I want to use xerces to check the syntax of 
>>the
>>file.In order to use the SAXParser as Jas suggested,I built a temporary 
>>XML
>>file as the following:
>>
>><?xml version="1.0" ?>
>><!DOCTYPE DOC SYSTEM "theMysteryDTDFile.dtd" >
>>
>>Because I know nothing about the DTD except its file name, I can't build a
>>complete XML file.
>>
>>Everything works well and I have parsed the DTD as I hoped.But new 
>>question
>>arises...
>>
>>Is there any trick to filtrate the err message of "The main XML document
>>cannot be empty"?
>>
>>Thanks a lot.
>>
>>Super
>>
>> > 2) Jas' answer has solved my question perfectly, but it brings another
>> > question: How to filte the err message of "The main XML document cannot
>>be
>>
>> > empty"? The XML file is a temp file used to parse DTD, and I don't know
>> > anything of the DTD(even the root!!), so I can't build a complete XML
>>file
>>
>> > except an file only contains the prolog.
>> >
>> > My temp XML file is like this:
>> > <?xml version="1.0" encoding="gb2312"?>
>> > <!DOCTYPE DOC SYSTEM "f:\xml_file\doc.dtd" >
>>
>>simply add the tag <DOC/> after that.
>>
>>The error message told you that you have a blank document (you just
>>had the XML Declaration and the Doctype, but no xml tags. That's an
>>error.
>>
>><?xml version="1.0" encoding="gb2312"?>
>><!DOCTYPE DOC SYSTEM "f:\xml_file\doc.dtd" >
>><DOC/>
>>
>>The FAQ isn't really going to help with these kinds of questions. I
>>would get a basic book on XML to start.
>>
>>jas.
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: [EMAIL PROTECTED]
>>For additional commands, e-mail: [EMAIL PROTECTED]
>>
>
>_________________________________________________________________
>Get your FREE download of MSN Explorer at http://explorer.msn.com
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>

_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com


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

Reply via email to