Hi, Scott Cantor <canto...@osu.edu> writes:
> > Another simple way to achieve the same is setting the > > fgXercesSchemaExternalSchemaLocation and > > fgXercesSchemaExternalNoNameSpaceSchemaLocation parameters (or using > > setExternalSchemaLocation and setExternalNoNamespaceSchemaLocation > > methods if available). > > [...] > > But it's also important to note that naively using those options won't work > either, because (in what I've always considered a buggy "feature", though > it's probably to spec) those overrides only apply to the schema lookup > *within* the XML instance being validated, and NOT to any lookup of imported > schemas in the schemas you pull in. They only go one layer deep, in other > words. The other problem with this approach is that the resolution of the paths is relative to the document path unless they are absolute URI qualified with 'file://' or similar. > So a complete solution (in code) really has to register an EntityResolver > and fully hijack the whole mechanism in some brittle ways, unfortunately. If you are using a fairly-recent version of Xerces-C++ (i.e., 3.0.0 or later) then a much simpler and more robust solution is as described in the blog mentioned above. Boris -- Boris Kolpackov, Code Synthesis http://codesynthesis.com/~boris/blog Open-source XML data binding for C++ http://codesynthesis.com/products/xsd XML data binding for embedded systems http://codesynthesis.com/products/xsde Command line interface to C++ compiler http://codesynthesis.com/projects/cli --------------------------------------------------------------------- To unsubscribe, e-mail: c-dev-unsubscr...@xerces.apache.org For additional commands, e-mail: c-dev-h...@xerces.apache.org