Hello out there, again one more try. Maybe i was sketchy explaining my problem b4. So, here it goes: I'm trying to validate a document while parsing it in an parser context created by origParserCtxt = xmlCreateIOParserCtxt(<snip/>); with an already opened filedescriptor. I've set xmlDoValidityCheckingDefaultValue = 1; I'm using an externalEntityLoader to fetch the DTD, set by xmlSetExternalEntityLoader(<snip/>); Works fine so far, but the externalEntityLoader fail to load the DTD. It's clear (thank you, Daniel) that i've to provide an base-URI, since there is none specified in an IOParserContext created with a filedescriptor and the DTD is linked by an RELATIV URI-reference (...SYSTEM "someDTD.dtd"). It's also clear (at least i guess so) that my externalEntityLoader has to compute the path to the DTD. The question is HOW can i provide the base URI in a way that the externalEntityLoader can acces it? The externalEntityLoader runs in a parserContext provided by it's signatur static xmlParserInputPtr myEntityLoader(const char *URL, const char *ID, xmlParserCtxtPtr ctxt) but that's NOT the context 'origParserCtxt' of the XML-Document (i guess that's by nature, it's his own context used to parse th DTD), so i CAN'T define the base URI in origParserCtxt->myDoc->URL (origParaserCtxt->myDoc in anyway is NULL before parsing). So, again the question: Is there a way in libxml to provide a base URL to a XML document so that an externalEntityLoader can access it? Mit freundlichen Gruessen - Kind regards Markus Henke ________________________Addressed by:________________________ ORDAT GmbH & Co. KG - Serversysteme/Neue Technologien Dipl.-Inf. (FH) Markus Henke Fon: +49 (641) 7941-0 Rathenaustr. 1 Fax: +49 (641) 7941-132 35394 Gießen mailto:markus henke ordat com See: http://www.ordat.com _____________________________________________________________ <<Markus Henke.vcf>>
Attachment:
Markus Henke.vcf
Description: Binary data