Hi!

I have an XSL stream with an include statement like this:

<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
version="1.0">
<xsl:include href="Helper.xsl" />
<xsl:output method="text" encoding="UTF-8" indent="yes"/>

I have set up the Transformer like this:

        tFactory = TransformerFactory.newInstance();
        InputSource is = new InputSource(inputStream);
        SAXParser jaxpParser =
SAXParserFactory.newInstance().newSAXParser();
        XMLReader reader = jaxpParser.getXMLReader();
        reader.setEntityResolver(this);
        voTransformer = tFactory.newTransformer( new SAXSource(reader,is );

What I was expecting is that the reader asks my EntityResolver to get the
Helper.xsl File. But this did not happen. A quick look at the
sourc code revealed that the xalan StylesheetHanlder creates a new XMLReader
to parse the included entity. And this reader does not have the faintest
idea about my EntityResolver.

What can I do to force xalan to ask my EntityResolver?


Martin Kuball

Reply via email to