You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@xerces.apache.org by bu...@apache.org on 2002/06/17 07:24:00 UTC

DO NOT REPLY [Bug 9907] New: - External entities cannot be referred properly

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=9907>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=9907

External entities cannot be referred properly

           Summary: External entities cannot be referred properly
           Product: Xerces-C++
           Version: 1.7.0
          Platform: PC
        OS/Version: Windows NT/2K
            Status: NEW
          Severity: Major
          Priority: Other
         Component: Validating Parser (DTD)
        AssignedTo: xerces-c-dev@xml.apache.org
        ReportedBy: arindam.chandra@ushacomm.co.in


I am encountering some problems in refering external entities from an xml 
file using Xerces C++ parser version 1.7.0. I am working with Windows NT. The 
problems are described below,-
 
In the refered.xml there is an element refered-elem. From the refering.xml I am 
referring to this element as 
                                                                                
  <pls>&refered-elem;</pls>
 
and I have declared this entity in testref.dtd (refered.xml refers to this DTD) 
as
                                                                                
     <!ENTITY refered-elem SYSTEM "refered.xml">
refered.xml and refering.xml are located under the same directory in the local 
file system. When I am running the Xerces java parser with these files I'm 
getting the expected output. But when I run the Xerces C++ parser through 
SAX2Count.cpp (provided as a sample with the downloaded parser), I am getting 
the following error,-
Fatal Error at file E:\Arindam\CPPTests\xerces-c-src1_7_0\xerces-c-src1_7_0
\Build\Win32\VC6\Release\refered.xml, line 2, char 2
  Message: Expected comment or CDATA

Seems that it can't recognize the document type definition <!DOCTYPE refered-
elem SYSTEM "testref1.dtd">. One point to note here is that we really don't 
need any DTD for refered.xml . If I remove this DOCTYPE line from refered.xml, 
it works fine with the java parser. But with the C++ parser it gives the 
following errors,-

Error at file E:\Arindam\CPPTests\xerces-c-src1_7_0\xerces-c-src1_7_0
\Build\Win32\VC6\Release\refered.xml, line 3, char 15
  Message: Unknown element 'refered-elem'


Error at file E:\Arindam\CPPTests\xerces-c-src1_7_0\xerces-c-src1_7_0
\Build\Win32\VC6\Release\refering.xml, line 17, char 27
  Message: Element 'refered-elem' is not valid for content model: '(#PCDATA)'

Seems that the parser is looking for a DTD for refered.xml.

---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org