I'm not able to reproduce any crash, but I can't get the query to run.
The query imports the XMLSchema schema directly:

  import schema namespace xs = "http://www.w3.org/2001/XMLSchema"; at
"http://www.w3.org/2001/XMLSchema.xsd";;

and this doesn't seem to work:

</tmp/foo/conformance-dimensions/conf/CheckTaxonomy.xq>:42,1: static error 
[err:XQST0059]: "Fatal error in schema with system id 
http://www.w3.org/2001/XMLSchema.xsd, line 1, column 3.
markup declaration expected": target namespace not found for schema/module; 
raised at /home/ceej/zo/src/src/types/schema/LoadSchemaErrorHandler.cpp:88 

I don't know what's going on here, but I did try downloading
XMLSchema.xsd and putting it on Zorba's URI path so it would be loaded
locally. This led me to also download XMLSchema.dtd and datatypes.dtd
which are referenced by XMLSchema.xsd. With all those on the URI path, I
now get a bunch of warnings like

Warning at file 
file:///home/ceej/zo/src/build/URI_PATH/org/w3/www/2001/XMLSchema.xsd, line 
346, char 13
  Message: attribute 'id' has already been declared for element 'xs:field'

finally followed by an error:

</tmp/foo/conformance-dimensions/conf/CheckTaxonomy.xq>:42,1: static error 
[err:XQST0059]: "Error in schema with system id 
file:///home/ceej/zo/src/build/URI_PATH/org/w3/www/2001/XMLSchema.xsd, line 
177, column 47.
type 'http://www.w3.org/2001/XMLSchema:derivationControl' not found": target 
namespace not found for schema/module; raised at 
/home/ceej/zo/src/src/types/schema/LoadSchemaErrorHandler.cpp:68 

It kind of seems like Zorba has some idea of the contents of
XMLSchema.xsd built-in; is that correct? I'm afraid I don't know how to
debug this any further, but it doesn't immediately seem to indicate a
problem in URI resolution which is why I assume the bug was assigned to
me. Does anyone else know how schema-for-schema is "supposed" to work
with Zorba?

-- 
You received this bug notification because you are a member of Zorba
Coders, which is the registrant for Zorba.
https://bugs.launchpad.net/bugs/867156

Title:
  Import schema segfaults

Status in Zorba - The XQuery Processor:
  New

Bug description:
  Starting program: /Users/wcandillon/28msec/zorba/build/dist/bin/zorba -q 
CheckTaxonomy.xq -f
  Reading symbols for shared libraries 
++++++++............................................................... done
  Reading symbols for shared libraries . done
  Reading symbols for shared libraries ........ done
  Reading symbols for shared libraries ... done

  Program received signal EXC_BAD_ACCESS, Could not access memory.
  Reason: 13 at address: 0x0000000000000000
  0x00007fff87b4b062 in std::istream::sentry::sentry ()
  (gdb) where
  #0  0x00007fff87b4b062 in std::istream::sentry::sentry ()
  #1  0x00007fff87b4b553 in std::istream::read ()
  #2  0x000000010162168d in zorba::IstreamBinInputStream::readBytes ()
  #3  0x0000000103d921e3 in xercesc_2_8::XMLReader::refreshRawBuffer ()
  #4  0x0000000103d93b47 in xercesc_2_8::XMLReader::XMLReader ()
  #5  0x0000000103d93c39 in xercesc_2_8::XMLReader::XMLReader ()
  #6  0x0000000103d17eda in xercesc_2_8::ReaderMgr::createReader ()
  #7  0x0000000103cef908 in xercesc_2_8::IGXMLScanner::scanReset ()
  #8  0x0000000103cedc18 in xercesc_2_8::IGXMLScanner::scanDocument ()
  #9  0x0000000103c66998 in xercesc_2_8::AbstractDOMParser::parse ()
  #10 0x0000000103d58c77 in xercesc_2_8::TraverseSchema::preprocessImport ()
  #11 0x0000000103d57e72 in xercesc_2_8::TraverseSchema::preprocessChildren ()
  #12 0x0000000103d58690 in xercesc_2_8::TraverseSchema::preprocessSchema ()
  #13 0x0000000103d6d899 in xercesc_2_8::TraverseSchema::TraverseSchema ()
  #14 0x0000000103d6d972 in xercesc_2_8::TraverseSchema::TraverseSchema ()
  #15 0x0000000103d2eb5d in xercesc_2_8::SGXMLScanner::loadXMLSchemaGrammar ()
  #16 0x0000000103d2ee01 in xercesc_2_8::SGXMLScanner::loadGrammar ()
  #17 0x0000000103d9a0e5 in xercesc_2_8::XMLScanner::loadGrammar ()
  #18 0x0000000103d9a1a7 in xercesc_2_8::XMLScanner::loadGrammar ()
  #19 0x0000000103d2879a in xercesc_2_8::SAX2XMLReaderImpl::loadGrammar ()
  #20 0x0000000101614c4d in zorba::Schema::registerXSD ()
  #21 0x0000000100347e7a in zorba::TranslatorImpl::import_schema ()
  #22 0x0000000100290924 in zorba::TranslatorImpl::begin_visit ()
  #23 0x000000010019f6e0 in zorba::SchemaImport::accept ()
  #24 0x00000001001ab8ac in zorba::SIND_DeclList::accept ()
  #25 0x000000010019f52e in zorba::Prolog::accept ()
  #26 0x000000010019f21d in zorba::MainModule::accept ()
  #27 0x0000000100214d7d in zorba::translate_aux ()
  #28 0x00000001002148eb in zorba::translate ()
  #29 0x00000001005d87c6 in zorba::XQueryCompiler::normalize ()
  #30 0x00000001005d89c3 in zorba::XQueryCompiler::compile ()
  #31 0x00000001005da700 in zorba::XQueryCompiler::compile ()
  #32 0x000000010004ba8a in zorba::XQueryImpl::doCompile ()
  #33 0x000000010004c796 in zorba::XQueryImpl::compile ()
  #34 0x00000001000053e8 in compileAndExecute ()
  #35 0x0000000100009a87 in main ()

To manage notifications about this bug go to:
https://bugs.launchpad.net/zorba/+bug/867156/+subscriptions

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to     : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp

Reply via email to