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=18464>. 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=18464 Xal-C 1.5 xsl:include causes SIGSEGV on stylesheet import from Xerces 2.2 [EMAIL PROTECTED] changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED ------- Additional Comments From [EMAIL PROTECTED] 2003-03-31 15:47 ------- Since the workaround is simple, I am marking this as FIXED. The fix (as hinted by David) is to set the systemID of the stylesheet so that the URI resolver has a base URI to work from. However, in coming from Xerces, the URI is apparently "lost" to Xalan. There is a function, "subject to change", in Xerces that will allow you to recover the base URI of nodes, however, and thus provides a fix. For the sample code below, add the call: ssInputSource->setSystemId( tStylesheet->getBaseURI()); just AFTER ssInputSource is created. If you do not do this, on Linux at least, Xalan dumps in the resolve method of XalanParsedURI. (See gdb stack below) ** extra note, in the example code below, the returned value of "result" will be invalid. To fix, un-const theReturnDocument and instead of result=theReturnDocument.get() call result=theReturnDocument.release(). I think. (gdb) where #0 0x40417d20 in xalanc_1_5::XalanParsedURI::resolve(xalanc_1_5::XalanParsedURI const&) () from /home/galen/xml-xalan/c/lib/libxalan-c1_5_0.so #1 0x40418023 in xalanc_1_5::XalanParsedURI::resolve(unsigned short const*, unsigned, unsigned short const*, unsigned) () from /home/galen/xml-xalan/c/lib/libxalan-c1_5_0.so #2 0x4040f2b5 in xalanc_1_5::URISupport::getURLStringFromString(unsigned short const*, unsigned, unsigned short const*, unsigned, xalanc_1_5::XalanDOMString&) () from /home/galen/xml-xalan/c/lib/libxalan-c1_5_0.so #3 0x40508fbc in xalanc_1_5::StylesheetConstructionContextDefault::getURLStringFromString(xalanc_1_5::XalanDOMString const&, xalanc_1_5::XalanDOMString const&) () from /home/galen/xml-xalan/c/lib/libxalan-c1_5_0.so #4 0x405285dd in xalanc_1_5::StylesheetHandler::processInclude(unsigned short const*, xercesc_2_2::AttributeList const&, xercesc_2_2::Locator const*) () from /home/galen/xml-xalan/c/lib/libxalan-c1_5_0.so #5 0x405261ca in xalanc_1_5::StylesheetHandler::processTopLevelElement(unsigned short const*, xercesc_2_2::AttributeList const&, int, xercesc_2_2::Locator const*, bool&, bool&) () from /home/galen/xml-xalan/c/lib/libxalan-c1_5_0.so #6 0x405255aa in xalanc_1_5::StylesheetHandler::startElement(unsigned short const*, xercesc_2_2::AttributeList&) () from /home/galen/xml-xalan/c/lib/libxalan-c1_5_0.so #7 0x40432ecb in xalanc_1_5::FormatterTreeWalker::startNode(xalanc_1_5::XalanNode const*) () from /home/galen/xml-xalan/c/lib/libxalan-c1_5_0.so #8 0x40432ffa in xalanc_1_5::FormatterTreeWalker::startNode(xalanc_1_5::XalanNode*) () from /home/galen/xml-xalan/c/lib/libxalan-c1_5_0.so #9 0x4041d159 in xalanc_1_5::TreeWalker::traverse(xalanc_1_5::XalanNode*) () from /home/galen/xml-xalan/c/lib/libxalan-c1_5_0.so #10 0x40547ffb in xalanc_1_5::XSLTEngineImpl::processStylesheet(xalanc_1_5::XSLTInputSource const&, xalanc_1_5::StylesheetConstructionContext&) () from /home/galen/xml-xalan/c/lib/libxalan-c1_5_0.so #11 0x40556c6e in xalanc_1_5::XalanCompiledStylesheetDefault::XalanCompiledStylesheetDefault(xalanc_1_5::XSLTInputSource const&, xalanc_1_5::XSLTEngineImpl&, xercesc_2_2::ErrorHandler*, xercesc_2_2::EntityResolver*) () from /home/galen/xml-xalan/c/lib/libxalan-c1_5_0.so #12 0x40559870 in xalanc_1_5::XalanTransformer::compileStylesheet(xalanc_1_5::XSLTInputSource const&, xalanc_1_5::XalanCompiledStylesheet const*&) () from /home/galen/xml-xalan/c/lib/libxalan-c1_5_0.so #13 0x0804d6fc in doXSLTstep(xercesc_2_2::DOMDocument*, xercesc_2_2::DOMDocument*, char*) (nsDataSource=0x808b450, tStylesheet=0x8078180, ssName=0xbffff901 "ECho2.xsl") at isgXslt.cpp:93 #14 0x0804b3bb in main (argc=5, argv=0xbffff7a4) at isg.cpp:204 #15 0x420158d4 in __libc_start_main () from /lib/i686/libc.so.6
