Dear Michael,
Your document seems fine, in the sense that I copy-pasted parts of your
email to some files and could load it okay using Xerces 2.6. Could you
perhaps attach some sample files with which the error occurs?
Kind regards,
--Sander.
> -----Original Message-----
> From: Michael Hüttermann [mailto:michael@xxxxxxxxxxxxxxx]
> Sent: 15 January, 2004 8:11 PM
> To: xerces-j-user@xxxxxxxxxxxxxx
> Subject: Re: External entity: Fatal Error content must consist of
> well-formed character data or markup
>
>
> sorry, my mail client has broken my original mail a bit....once again:
>
>
> Hello.
>
> I'm very confused and need some help.
>
> I have a main xml document which consists of an external DTD
> reference.
> Additionally, a second XML file contains a XML snippet to be
> included into
> the first document via an external entity. The entity is defined in an
> internal subset inside the XML Document. The content of the
> two files are
> posted at the bottom. The main document is valid to the DTD,
> the smaller one
> is well-formed (I checked with an editor). So far everything
> is OK. But if I
> run my java application, xerces throws the following fatal error:
>
> Fatal Error: Parsing XML-Mask file '/C:/.../main.xml'
> Line 2
> The content of elements must consist of well-formed character data or
> markup.
>
> (comment: line 2 of main.xml consists of the DOCTYPE line).
>
> Any hint to solve that issue would be very appreciated.
>
> Michael
>
>
> main.xml
>
> <?xml version="1.0" encoding="iso-8859-1"?>
> <!DOCTYPE test SYSTEM "correct_path_to_dtd.dtd"
> [
> <!ENTITY snippet_to_be_included SYSTEM
> "correct_path_to_snippet.xml">
> ]>
> <test>
> <tag1>
> &snippet_to_be_included;
> <tag2>
> sldkfj
> </tag2>
> </tag1>
> </test>
>
> -----------
> snippet.xml
>
> <tag2>
> shshshsh
> </tag2>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: xerces-j-user-unsubscribe@xxxxxxxxxxxxxx
> For additional commands, e-mail: xerces-j-user-help@xxxxxxxxxxxxxx
>
>
|