You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by bu...@apache.org on 2002/05/15 23:20:16 UTC

DO NOT REPLY [Bug 9133] New: - Either XSLTResultTarget or XalanTransformer Returning Error

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=9133>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=9133

Either XSLTResultTarget or XalanTransformer Returning Error

           Summary: Either XSLTResultTarget or XalanTransformer Returning
                    Error
           Product: XalanC
           Version: 1.3.x
          Platform: PC
        OS/Version: Windows 9x
            Status: NEW
          Severity: Blocker
          Priority: Other
         Component: XalanC
        AssignedTo: xalan-dev@xml.apache.org
        ReportedBy: yuris@precise.com


The following (Visual) C++ code works fine in Windows NT, 2K and XP but 
returns an error 6 in Win98 at the line "if (theRequestTransformer.transform
(*glbParsedSource, compiledRequestStylesheet, theDOMResultTarget) != 0)	{
", where theRequestTransformer is an instance of a XalanTransformer. What does 
error 6 mean? I've found several files with errors listed (error 6 could be 
NO_DATA_ALLOWED_ERR, XALAN_XPATH_API_ERROR_CANNOT_REINITIALIZE or something 
else), but I'm not sure which it is.

int XSLTLayer::TransformRequestXml(LPCSTR szOldRequestStr, LPSTR 
&szNewRequestStr) {
	assert(compiledRequestStylesheet != NULL);

  	CFile f;
	CFileException e;
	CString strFile;
	TCHAR szError[300 * sizeof(TCHAR)];
	XalanParsedSource *glbParsedSource = NULL;

	SaveToFile(szOldRequestStr, m_strarrReqFileNames[0]);
	strFile = m_strarrReqFileNames[0]; 

	if (theRequestTransformer.parseSource((LPCTSTR) strFile, 
glbParsedSource) !=0 ) {
		wsprintf (szError, CGetLocaleData::GetResString
(IDS_PXML_XSLTLAYER_FAILED_PARSE_REQ_FILE_TEMPLATE), strFile, 
theRequestTransformer.getLastError());

	  	throw ServiceUnavailable(_T(""), szError);

		return 0;
	} 

	strFile = m_strarrReqFileNames[1]; 
	
	XSLTResultTarget theDOMResultTarget((LPCSTR) strFile);

	if (compiledRequestStylesheet == NULL)
		AfxMessageBox("compiledRequestStylesheet == NULL");

	if (glbParsedSource == NULL)
		AfxMessageBox("glbParsedSource == NULL");

	if (theRequestTransformer.transform(*glbParsedSource, 
compiledRequestStylesheet, theDOMResultTarget) != 0)	{
		_stprintf (szError, CGetLocaleData::GetResString
(IDS_PXML_XSLTLAYER_FAILED_PARSE_REQ_FILE_TEMPLATE), strFile, 
theRequestTransformer.getLastError());

		CString strTemp;
		strTemp.Format("szError = %s", szError);
		AfxMessageBox(strTemp);

//	  	throw ServiceUnavailable(_T(""), szError);

		return 0;
	}