I need some guidance with a problem that requires validating XML against a very large XSD file.
I am making use of the CSTA XML API (without SOAP). The XSD's for the messages seems to be a very intricate set of files, including each other. All XSD's are "consolidated" into a large file csta.xsd (http://www.ecma-international.org/standards/ecma-323/csta/ed3/csta.xsd), some 250 odd XSD files.
erlsom:compile_xsd_file/1 takes about 3 - 4 minutes to process the main XSD file on my (lower end of a medium spec'd) notebook (2 GHz Quad Core, 4 Gb RAM). So my idea was to compile the XSD into the Erlang model and write the result into a function returning the model. This function is then saved to a file. This can be done once during the build process. The problem is that my notebook crashes when it starts writing the result to file (running out of memory). This leads me to think that I am obviously not following the the best way of doing this.
The problem is further complicated by the fact that I am using the Avaya specific CSTA API. Each XSD for a single message imports the entire csta.xsd. I can work out a plan around this once I have the basics right.
Please guide me and tell me the right way of handling this type of scenario.