[xsd-users] compiling WXXM schema
Boris Kolpackov
boris at codesynthesis.com
Thu Jun 28 09:51:36 EDT 2012
Hi Daniel,
Gavrila, Daniel <D.Gavrila at gematronik.com> writes:
> I'm in the evaluation phase of XSD product and looks very impressive.
Thank you.
> $ xsd cxx-tree --output-dir gen ...
>
> gen\units.hxx: error: unable to open in write mode
Probably because there is no 'gen' directory in the current directory.
> I 've tried to compile also the GML schema in this environment Windows
> 7/MinGW, gcc 4.7 with the help of makefile from the archive gml-3.2.1-
> split-code and I got in the linking phase this error:
>
> gen\gml\PassThroughOperationPropertyType.o: file not recognized: Memory
> exhausted collect2.exe: error: ld returned 1 exit status
I did some web searches and this error appears to be caused by linker
running out of memory. This thread has some suggestions:
http://sourceforge.net/mailarchive/message.php?msg_id=28251694
In particular, increasing the amount of RAM (either by installing more
or by closing some applications) seems to work.
I tried to compile your schema on my Linux box. Here is what I did:
1. Copy wxxm schema to the gml-3.2.1-split-code so that we have
wxxm/wx/*.xsd and wxxm/avwx/*.xsd.
2. Create wxxm/wx and wxxm/avwx directories in the gen directory.
3. Create wxxm.options file in gml-3.2.1-split-code with the
following content:
--polymorphic-type-all
--location-map http://schemas.opengis.net/gml/3.2.1/gml.xsd=../../gml/3.2.1/gml.xsd
--include-regex %../../gml/3.2.1/(.+)%../../gml/$1%
--namespace-map http://www.opengis.net/gml/3.2=gml32
--namespace-map http://www.eurocontrol.int/wx/1.1=wx11
--namespace-map http://www.eurocontrol.int/avwx/1.1=avwx11
--extern-xml-schema xml-schema.xsd
4. cd to wxxm/wx directory and run the XSD compiler like this:
xsd cxx-tree --options-file ../../common.options --options-file ../../wxxm.options --output-dir ../../gen/wxxm/wx units.xsd
5. cd to the gen/wxxm/wx directory (there we should have units.?xx files)
and run the C++ compiler like this:
g++ -I../.. -c units.cxx
I also tried to compile other schema files in wx and avwx, but they seem
to depend on yet other schemas.
Boris
More information about the xsd-users
mailing list