Hi David, David Kelvin <[EMAIL PROTECTED]> writes:
> 1. We use SAX2 and use a standard format W3C XML schema to ensure > that the data we process is valid. Is there an option to build a > 'cut-down' version of the Xerces library (DLL on Windows, the > equivalent on Linux) that just contains sufficient to satisfy > this requirement i.e. no DOM, XSLT, XPath etc. etc.? If so, > where are these documented? Since you are using XML Schema validation, you will need DOM which is used internally to load the schemas. The only part that you might be able to remove is SAX which is quite small and is not worth the trouble. Generally, on Windows optimized Xerces-C++ DLL is 1.8MB. I don't think these days it is considered "a lot" in any non-mobile or embedded environment. > 2. On a similar vein, is there a subset of the include files > needed by the application that wants to use Xerces just to > support SAX2 and schemas? I can't find in the documentation > (does't mean it isn't there - I just haven't yet found it) to > say the minimum required for each function. e.g. "xercesc/util", > "xercesc/sax2" & "xercesc/validators/schema" - or do I need the > whole "xercesc" directory and its sub-directories? I suppose > this comes down to - how much of the source distribution does > an application that uses specific functions of Xerces need > access to (assuming I don't need the whole source to build > Xerces itself)? Hm, there is no such documentation, AFAIK. I don't think many people worry about the amount of headers needed at build time. If you want to find the subset that is sufficient for your application, you will have to use the trail and error approach. That is, try to remove some directories/files and see if things still compile. I think you should be able to remove dom/, internal/, non-SAX2 parsers in parsers/, validators/, and xinclude/ in your case. Boris -- Boris Kolpackov, Code Synthesis Tools http://codesynthesis.com/~boris/blog Open source XML data binding for C++: http://codesynthesis.com/products/xsd Mobile/embedded validating XML parsing: http://codesynthesis.com/products/xsde
