Kelly Graus wrote:
Thanks for the reply. How can it possibly know the fully resolved system id if I don't tell it where the xml came from? It looks like all it does is assume that it's in the current working directory.
Any URIs for external entities are resolved relative to the containing entity. If Xerces-C is providing a system ID that is resolves to the current working directory, it's because the system ID of the containing entity is a file URI.
Is there any way to get the base URI? Looking through the mailing list archives, it doesn't seem like anyone knows how, if there is a way. Are there any plans to make use of something like the Xerces XMLEntityResolver?
Yes, we have an open defect to add support for XMLEntityResolver, and it will hopefully be in the next version of Xalan-C. However, you can also set the system ID of the base InputSource to whatever you want it to be, as long as the parser doesn't need that system ID to locate the entity.
Dave