The patch has been integrated in the xerces-cvs by Alberto Massari now.
HolgeR
Heinz-Detlev Koch schrieb:
Holger,
I must have missed your bug report when searching the bugzilla data
base. I guess I've been looking explicitly for "relative path" and was
too narrow-minded to read reports about relative URLs :-o
Anyway, the patch works nicely. We have a fairly large test set that
deals with external entities and none of these tests failed anymore
after making the proposed modifications.
Therefore, I recommend that bug #27898 should be accepted (it's status
is still "new") and that your patch should be integrated into the
"official" sources.
Thanks for pointing me to the bug report and your patch.
Heinz-Detlev
Holger Flörke wrote:
I have posted a bug report and a solution on this topic (Bug #27898)
at the 24th of march this year. Nobody of the xerces people commented
it yet. :^(
HolgeR
Joanne Bogart schrieb:
Hi,
I noticed the same thing some time ago, but just assumed it was my
misunderstanding of how entity references were supposed to work and
didn't consult the XML spec. Because of the directory structure in
which the different physical files composing my documents are stored,
I was able to come up with an easy work-around. However, I agree that
Xerces behavior is not in accord with the section you cite.
best regards,
Joanne
Hi all,
I was toying with the idea of replacing the XML parser in one of our
products with xerces-c 2.5.0 when I came across the following
problem while running our regression tests:
A document /tmp/x1.xml uses an external DTD x1.dtd that resides in a
subdirectory /tmp/x1d. The document references an external entity
e1. The content of /tmp/x1.xml is:
<!DOCTYPE x1 SYSTEM "x1d/x1.dtd">
<x1>&e1;</x1>
The entity e1 is declared in the DTD (in /tmp/x1d/x1.dtd) with a
relative pathname like this:
<!ELEMENT x1 ANY>
<!ENTITY e1 SYSTEM "e1.txt">
The replacement text of the entity is contained in the file e1.txt
in the same subdirectory as the DTD (i.e. /tmp/x1d/e1.txt).
When trying to parse the document /tmp/x1.xml (using a SAX2 parser),
xerces throws a runtime exception, telling me that it cannot open
the external entity /tmp/e1.txt.
Obviously, the pathname for the external entity is constructed by
merging the location of the xml document instance with the relative
pathname from the definition of the external entity.
According to section 4.2.2 of the XML spec, the relative pathname of
the external entity should be relative to the location of the
external entity in which the entity declaration occurs, so the
correct path would be /tmp/x1d/e1.txt.
I'm a bit reluctant to post a bug report about this issue because it
seems to be such an obvious case. Am I missing something?
I would appreciate any comments or suggestions. Thank you.
Heinz-Detlev
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
--
holger floerke d o c t r o n i c
email [EMAIL PROTECTED] information publishing + retrieval
phone +49 2222 9292 90 http://www.doctronic.de
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]