J
Jiri Netolicky
Hi and happy new year to all.
I have a problem with including external entities
with namespace.
I have this master xml wrapper file:
<?xml version="1.0" ?>
<!DOCTYPE log4j:eventSet SYSTEM "log4j.dtd"
[<!ENTITY data SYSTEM "log.xml">]>
<log4j:eventSet version="1.2"
xmlns:log4j="http://jakarta.apache.org/log4j/">
&data;
</log4j:eventSet>
and file "log.xml" looks like this:
<log4j:event logger="cz.web.ContextListener"
timestamp="1136214913389" level="INFO" thread="ScannerThread">
<log4j:message><![CDATA[Destroying context]]></log4j:message>
<log4j:NDC><![CDATA[WebModule]]></log4j:NDC>
</log4j:event>
<log4j:event logger="cz.sap.SapFacade"
timestamp="1136214913391" level="INFO" thread="ScannerThread">
<log4j:message><![CDATA[Cleaning up]]></log4j:message>
<log4j:NDC><![CDATA[WebModule]]></log4j:NDC>
</log4j:event>
When I manualy replace "&data;" with the content of "log.xml"
the validation "xmllint -valid -noout" is OK. But when I try
to include "log.xml" as external entitity, validator reports
error:
log.xml:1: namespace error : Namespace prefix log4j on event is not defined
Also I have tried to remove namespaces from master xml, log.xml
and log4j.dtd and then the validation (with external entity) is OK.
What is the right syntax to namespace defined in master document
will be known during parsing external entity?
Thanks, Netolish
I have a problem with including external entities
with namespace.
I have this master xml wrapper file:
<?xml version="1.0" ?>
<!DOCTYPE log4j:eventSet SYSTEM "log4j.dtd"
[<!ENTITY data SYSTEM "log.xml">]>
<log4j:eventSet version="1.2"
xmlns:log4j="http://jakarta.apache.org/log4j/">
&data;
</log4j:eventSet>
and file "log.xml" looks like this:
<log4j:event logger="cz.web.ContextListener"
timestamp="1136214913389" level="INFO" thread="ScannerThread">
<log4j:message><![CDATA[Destroying context]]></log4j:message>
<log4j:NDC><![CDATA[WebModule]]></log4j:NDC>
</log4j:event>
<log4j:event logger="cz.sap.SapFacade"
timestamp="1136214913391" level="INFO" thread="ScannerThread">
<log4j:message><![CDATA[Cleaning up]]></log4j:message>
<log4j:NDC><![CDATA[WebModule]]></log4j:NDC>
</log4j:event>
When I manualy replace "&data;" with the content of "log.xml"
the validation "xmllint -valid -noout" is OK. But when I try
to include "log.xml" as external entitity, validator reports
error:
log.xml:1: namespace error : Namespace prefix log4j on event is not defined
Also I have tried to remove namespaces from master xml, log.xml
and log4j.dtd and then the validation (with external entity) is OK.
What is the right syntax to namespace defined in master document
will be known during parsing external entity?
Thanks, Netolish