I am trying to invoke XalanTransformer.transform from a function in a 
transparent
manner (i.e. calling the same overloaded version -
transform(XSLTInputSource, XSLTInputSource, XSLTResultTarget)
irrespective of the original source of the primary document).

I know whether the original input was built from a Xerces DOM or not. If it was,
then I actually have a XercesDOMWrapperParsedSource. In order to
preserve the transparency, I am then attempting to construct an
XSLTInputSource for the primary document by doing (in effect):

new XSLTInputSource ( XercesDOMWrapperParsedSource::getDocument ).

This builds an XSLTInputSource for me ok (I check getNode and it is
OK), but I still get the error message:

Fatal Error at (file <unknown>, line 0, column 0): An exception occurred! 
Type:RuntimeException, Message:The primary document entity could not be opened. 
Id={null}

Now I know I can do thing by calling the version of transform that
takes a XalanParsedSource as a first parameter, but I would like to
know why this method doesn't work. if I can't use it, then my code
becomes much more spaghetti-like.
-- 
Colin Paul Adams
Preston Lancashire

Reply via email to