You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by "Vries, Michiel de" <Mi...@nl.compuware.com> on 2001/03/08 11:06:20 UTC

External DTD's in case of translation with Xalan C++

Hi all,

Using version 1.0 of Xalan, I used to do something like this:

        XercesDOMSupport                theDOMSupport;
        XercesParserLiaison             theParserLiaison(theDOMSupport);

        UExternalEntityResolver         *resolver = new
UExternalEntityResolver(unibas);
        theParserLiaison.setEntityResolver(resolver);

        XPathSupportDefault             theXPathSupport(theDOMSupport);
        XSLTProcessorEnvSupportDefault  theXSLTProcessorEnvSupport;
        XObjectFactoryDefault           theXObjectFactory;
        XPathFactoryDefault             theXPathFactory;

        XSLTEngineImpl  theProcessor(
                        theParserLiaison,
                        theXPathSupport,
                        theXSLTProcessorEnvSupport,
                        theDOMSupport,
                        theXObjectFactory,
                        theXPathFactory);


Now in version 1.1 I do something like this:

	  XalanSourceTreeDOMSupport       theDOMSupport;
	  XalanSourceTreeParserLiaison    theParserLiaison(theDOMSupport);
        XSLTProcessorEnvSupportDefault  theXSLTProcessorEnvSupport;
        XObjectFactoryDefault           theXObjectFactory;
        XPathFactoryDefault             theXPathFactory;

        UExternalEntityResolver *resolver = new
UExternalEntityResolver(unibas);
        theParserLiaison.setEntityResolver(resolver);

        XSLTEngineImpl	theProcessor(
                                        theParserLiaison,
                                        theXSLTProcessorEnvSupport,
                                        theDOMSupport,
                                        theXObjectFactory,
                                        theXPathFactory);

My problem is that when transforming a XML document, which has a reference
to an external DTD (via the SYSTEM keyword), it does not use my
entityResolver anymore. Therefore it cannot find the DTD and thus gives an
error.

Does anyone got redirection of entities working in the Xalan 1.1 release?

Am I making a mistake somewhere?

Thanks for the help.

Groeten/Regards,

Michiel.
---
"Just because you're paranoid doesn't mean they're not after you"