|
I'm using the DOM Parser with an external schema and have run
into a minor problem. The XSD file has a space as part of the path to the
filename. This is being used on Windows 2000 and XP systems, and the xsd
file will be installed along with the application in something along the lines
of c:\program files\program\bin\file.xsd.
Assuming file.xsd is in the location pointed to by the schema
location:
The following code snippet results in success:
===============================================================
XMLPlatformUtils::Initialize();
XercesDOMParser parser; parser.setValidationScheme( XercesDOMParser::Val_Always
);
parser.setDoNamespaces( true ); parser.setDoSchema( true ); parser.setValidationSchemaFullChecking( true ); parser.setValidationConstraintFatal( true ); parser.setExternalSchemaLocation(http://www.company.com c:\program\bin\file.xsd); MyErrorReporter errHandler; parser.setErrorHandler( &errHandler ); parser.parse( XMLFileName ); ===============================================================
while the following code snippet results in a parsing error:
=============================================================== XMLPlatformUtils::Initialize();
XercesDOMParser parser; parser.setValidationScheme( XercesDOMParser::Val_Always
); parser.setDoNamespaces( true ); parser.setDoSchema( true ); parser.setValidationSchemaFullChecking( true ); parser.setValidationConstraintFatal( true ); parser.setExternalSchemaLocation(http://www.company.com c:\program files\program\bin\file.xsd); MyErrorReporter errHandler;
parser.setErrorHandler( &errHandler ); parser.parse( XMLFileName ); ===============================================================
The only difference is that the path name that fails has a space in
it. I have tried substituting &sp;   and %20 for the space as
well as putting either single or double quotes around the path, all without
finding a solution. Any additional recomendations would be
appreciated. Given the nature of this project, we can't dictate that the
application be installed to a path without spaces, as c:\program files is pretty
standard for Windows applications.
Thanks for any assistance,
Geoffrey Reynolds |
