|
Question: Can anyone tell me why a HTML file produced by an
Xalan-transformation isn’t being released. When I perform the
Transform more than once I get the following error; Error:
XalanFileOutputStreamOpenException: Error opening file:
…FileName.html.The system error code (errno) is 32. (, line -1, column
-1) It’s vital that I find an answer to the
question above and I’d appreciate any help you could give me. I’m using xalan 1.8 with Visual Studio 6
(latest service pack). I have an XML file and an XSLT file which I’m
trying to transform into an HTML file. In a simple application everything
works fine, namely the transformation produces the following result:
XalanTransformer.transform(...) Result = 0 even if I perform the transformation repeatedly. However when I try to implement the same in a web
server being developed, I’m experiencing problems. The first time I
perform the transformation, everything works fine and I get
XalanTransformer.transform(...) Result = 0 The next time I perform the transformation I get
XalanTransformer.transform(...) Result = -1 Error:
XalanFileOutputStreamOpenException: Error opening file:
…ClientP7.html.The system error code (errno) is 32. (, line -1, column
-1) Below is a snippit of the code I’m using
// PREPARE THE DOMNode TO BE USED AS AN XALANNode. NAME = parsedSource
XALAN_USING_XALAN(XercesDOMSupport)
XercesDOMSupport theDOMSupport;
XALAN_USING_XALAN(XercesParserLiaison)
XercesParserLiaison theParserLiaison;
// Change the char *srcXmlFileName to an XSLTInputSource
XALAN_USING_XALAN(XSLTInputSource)
XSLTInputSource inputSource(xmlFileName);
XALAN_USING_XALAN(XalanDOMString)
XALAN_USING_XALAN(XercesDOMWrapperParsedSource)
// Create the parsedSource
XercesDOMWrapperParsedSource parsedSource(primaryPostHandler->domFunctionality->outgoingDoc,
theParserLiaison, theDOMSupport, XalanDOMString(inputSource.getSystemId()));
// TRANSFORM THE FilledXMLDocument TO AN HTML DOCUMENT
XALAN_USING_XALAN(XalanTransformer)
XalanTransformer theXalanTransformer;
theXalanTransformer.setStylesheetParam(XalanDOMString("authType"),
XalanDOMString(fullAuthType));
theXalanTransformer.setStylesheetParam(XalanDOMString("postURL"),
XalanDOMString(fullReconnectURL));
int theResult = theXalanTransformer.transform(parsedSource, xsltFileName,
htmlFileName); I don’t call:
XalanTransformer::terminate(); because I’ll be doing more transformations,
rather I call it when the application finishes. Regards, Mike Bleahen |
