Hi, I want to report some bugs I've found in xerces-c. I DID try to use bugzilla, but I never received an email back with a password for entering bugs. I used the code from release 2.1.0.
1) Our XML and XSD documents are created on demand by an ISAPI. Typically an XML document starts like this: <?xml version="1.0" encoding="UTF-8" ?> <wfs:FeatureCollection xmlns:wfs="http://www.my-namespace.com/wfs" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.my-namespace.com/wfs http://www.my-host.com/isapi.dll?request=DescribeFeatureType&service=WFS&version=1.0.0&typename=MyType"> When the XML document is parsed with schema validation, the parser tries and fails to load the XSD document referenced in the xsi:schemaLocation attribute. The problem lies in the '&' entities in the URL. The parser properly converts the '&' entities into '&' characters, but it inserts a 0xFFFF character immediately before the '&' as a flag for some other purpose. But when the URL is being opened the 0xFFFF character is still there and the resource can't be found. I fixed this bug in XMLScanner2.cpp: void XMLScanner::normalizeURI(const XMLCh* const systemURI, XMLBuffer& normalizedURI) { const XMLCh* pszSrc = systemURI; normalizedURI.reset(); while (*pszSrc) { if ((*(pszSrc) == chPercent) && (*(pszSrc+1) == chDigit_2) && (*(pszSrc+2) == chDigit_0)) { pszSrc += 3; normalizedURI.append(chSpace); } else if (*pszSrc == 0xFFFF) { // added MS pszSrc++; // added MS } // added MS else { normalizedURI.append(*pszSrc); pszSrc++; } } } 2) Since the XSD documents are dynamic, I need to extract information from the SchemaGrammar object in order to interpret the XML document correctly. For example: I need access to DecimalDatatypeValidator::getFractionDigits() in order to decide whether to implement this type as double or long. But 'getFractionDigits()' is private, so I can't access it. I can't think of any good reason why accessor methods like these should be private, so please make them all public. 3) QName's copy constructor is implemented incorrectly: QName(const QName* const qname); should be QName(const QName& qname); instead. At the moment there's a compiler-generated copy constructor that obviously doesn't do the right thing. Also the comparison operator bool operator==(const QName&); should be declared const: bool operator==(const QName&) const; Bye, Martin Sch�fer --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
