You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-users@xerces.apache.org by th...@bnpparibas.com on 2001/09/18 10:49:37 UTC
Réf. : RE: Support of SGML like includes in XMLfiles
You are right : you have the same problem as I have.
Parsing only a subpart of the xml document (log-body.xml) leads to this
malformed document error.
I don't understand why there is not backward compatibility for SGML like
include.
What is the replacement for this type of include ?
It can't be << XInclude >> (http://www.w3.org/TR/xinclude/) since it is
still a working draft, not a recommendation.
However at the time I will be forced to move to latest Xerces, I may try
XInclude for log4j in replacement of SGML include mechanism like this :
--------------------- log-header.xml
<?xml version="1.0" ?>
<log4j:eventSet
xmlns:log4j="http://jakarta.apache.org/log4j"
xmlns:xinclude="http://www.w3.org/2001/XInclude">
<xi:include href="log-body.xml"/>
</log4j:eventSet>
---------------------
Internet
HRoberts@twowaytv.co.uk - 09/17/2001 03:26 PM
Veuillez répondre à xerces-j-user@xml.apache.org
Pour : xerces-j-user
cc :
ccc :
Objet : RE: Support of SGML like includes in XML files
Thomas,
I think I'm having a similar problem, also through log4j. My external
entity
is not a well-formed document, which I understand is fine so long as the
whole document, after the external entity has been resolved, is
well-formed.
I get the error message, "The markup in the document following the root
element must be well-formed."
Did you manage to find a work-around for your problem?
Thanks, Howard.
-----Original Message-----
From: thomas.carrie@bnpparibas.com [mailto:thomas.carrie@bnpparibas.com]
Sent: Wednesday, September 12, 2001 1:47 PM
To: xerces-j-user@xml.apache.org
Subject: Support of SGML like includes in XML files
Hello,
I use an XML appender for log4j, it produces one file log-body.xml, this
file needs a header file to be valid (log-header.xml) that includes the
body. It looks like this :
------------- LOG-HEADER.XML
<?xml version="1.0" ?>
<!DOCTYPE log4j:eventSet SYSTEM "log4j.dtd" [<!ENTITY data SYSTEM
"log-body.xml">]>
<log4j:eventSet xmlns:log4j="http://jakarta.apache.org/log4j">
&data;
</log4j:eventSet>
------------- LOG-BODY.XML
<log4j:event category="com.bnpparibas.eqd.bomodel.generator.Main"
timestamp="1000290849790" priority="INFO" thread="Thread-1">
<log4j:message><![CDATA[Generator started !]]></log4j:message>
</log4j:event>
The problem is that Xerces 1.4.3 can't parse file LOG-HEADER.XML (using
SAX), it ends up with a NullPointerException wheras Xerces 1.1.3 parses
LOG-HEADER.XML successfully (including log-body.xml) !
[java] Processing style sheet transformation gen-error-log-handler.xsl
on log-header.
xml to output file tmpGenAntFile.xml
[java] null
[java] java.lang.NullPointerException
[java] at
org.apache.xerces.framework.XMLParser.parse(XMLParser.java:1094)
[java] at ExecXSLT.applyXSLOnStreams(ExecXSLT.java:153)
[java] at ExecXSLT.main(ExecXSLT.java:69)
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-user-help@xml.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-user-help@xml.apache.org
This message and any attachments (the "message") is
intended solely for the addressees and is confidential.
If you receive this message in error, please delete it and
immediately notify the sender. Any use not in accord with
its purpose, any dissemination or disclosure, either whole
or partial, is prohibited except formal approval. The internet
can not guarantee the integrity of this message.
BNP PARIBAS (and its subsidiaries) shall (will) not
therefore be liable for the message if modified.
---------------------------------------------
Ce message et toutes les pieces jointes (ci-apres le
"message") sont etablis a l'intention exclusive de ses
destinataires et sont confidentiels. Si vous recevez ce
message par erreur, merci de le detruire et d'en avertir
immediatement l'expediteur. Toute utilisation de ce
message non conforme a sa destination, toute diffusion
ou toute publication, totale ou partielle, est interdite, sauf
autorisation expresse. L'internet ne permettant pas
d'assurer l'integrite de ce message, BNP PARIBAS (et ses
filiales) decline(nt) toute responsabilite au titre de ce
message, dans l'hypothese ou il aurait ete modifie.
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-user-help@xml.apache.org