> Check the "Associating Schema Grammar with instance document" section on > this page: > > http://xerces.apache.org/xerces-c/schema.html > I have already implemented this. My xml documents have this header:
<?xml version="1.0" encoding="UTF-8"?> <AtcissData xmlns="http://ast.dfs.de/atciss" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://ast.dfs.de/atciss atciss-data-source-A3.3-1.xsd" version=">=A3.3-1" timestamp="2007-08-13T12:00:00"> <!-- ... --> </AtcissData> with a schema definition starting with: <?xml version = '1.0' encoding = 'UTF-8'?> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" xmlns:xmime="http://www.w3.org/2005/05/xmlmime" xmlns="http://ast.dfs.de/atciss" targetNamespace="http://ast.dfs.de/atciss" > <!-- ... --> </xs:schema> The URI "http://ast.dfs.de/atciss" is no valid address, it is just a namespace. So the schema could not be loaded from there. Anyway, the target host does not have internet connection at all. Is there a way to define a path to the schema file perhaps by using "file:/path/to/schema" as namespace? Or is it possible to define the path to the file in the schmemaLocation attribute? > As well as: > > http://xerces.apache.org/xerces-c/program-others.html#GrammarCache > There it says: > Xerces-C++ 2.8.0 provides a new function to pre-parse the grammar ... Unfortunately I just have Xerces-C++ 2.7.0 available. Is there also a way to define the location of the schema in the source code? When parsing the xml file I get warning, that the elements (like AtcissData) are undefined. How can I find out, why it is impossible to load the schema? I put the schema file in the working directory and thought the parser would find it there. I do not know, if it is my schema file or the XMLSchema definition which cannot be found. Thanks, Sven
