J Napoli wrote:
Hi,

While testing XQilla with Xerces-C 2.8.0 I was getting XML parse exceptions trying to run the basic examples. Looking into the code I noticed that XQilla by default passes an empty string (where val != NULL && XMLString::stringLen(val) == 0) to XMLScanner::setExternalSchemaLocation and setExternalNoNamespaceSchemaLocation. This seems to trick the scanner into thinking there is an external schema to parse. SGMLScanner::resolveSchemaGrammar then throws a parse exception because it tries to parse a URL constructed by concatenating the current working directory with the empty string.

Is this an XQilla or Xerces problem? Should Xerces ignore 0-length strings here?
I don't think we've ever defined the semantics of the API, so we should do that. We'll have to support ignoring a 0-length string, since there's no way to "unset" it if we don't, unless we fix the code. However, I do think it would be better to use a null pointer to indicate no location, rather than a null pointer or a 0-length string.

Dave

Reply via email to