diff options
Diffstat (limited to 'xsd-examples/cxx/tree/caching')
-rw-r--r-- | xsd-examples/cxx/tree/caching/README | 21 | ||||
-rw-r--r-- | xsd-examples/cxx/tree/caching/buildfile | 4 |
2 files changed, 19 insertions, 6 deletions
diff --git a/xsd-examples/cxx/tree/caching/README b/xsd-examples/cxx/tree/caching/README index 64dffb3..1672d6f 100644 --- a/xsd-examples/cxx/tree/caching/README +++ b/xsd-examples/cxx/tree/caching/README @@ -14,7 +14,12 @@ library.hxx library.cxx C++ types that represent the given vocabulary and a set of parsing functions that convert XML instance documents to a tree-like in-memory - object model. These are generated by XSD from library.xsd. + object model. + + These files are generated by the XSD compiler from library.xsd using + the following command line: + + xsd cxx-tree library.xsd driver.cxx Driver for the example. It first sets up the Xerces-C++ DOM parser @@ -24,6 +29,16 @@ driver.cxx the object model from this DOM document. On each iteration the driver prints a number of books in the object model to STDERR. -To run the example on the sample XML instance document simply execute: +To compile and link the example manually from the command line we can use +the following commands (replace 'c++' with your C++ compiler name): + +c++ -DXSD_CXX11 -c library.cxx +c++ -DXSD_CXX11 -c driver.cxx +c++ -o driver driver.o library.o -lxerces-c + +Note that we need to define the XSD_CXX11 preprocessor macro since the +source code includes libxsd headers directly. + +To run the example on the sample XML instance document execute: -$ ./driver library.xml library.xsd +./driver library.xml library.xsd diff --git a/xsd-examples/cxx/tree/caching/buildfile b/xsd-examples/cxx/tree/caching/buildfile index cb369b7..f1bcb10 100644 --- a/xsd-examples/cxx/tree/caching/buildfile +++ b/xsd-examples/cxx/tree/caching/buildfile @@ -12,9 +12,7 @@ exe{driver}: {xml xsd}{library}: test.input = true <{hxx ixx cxx}{library}>: xsd{library} $xsd {{ - diag xsd ($<[0]) # @@ TMP - - $xsd cxx-tree --std c++11 \ + $xsd cxx-tree \ --generate-inline \ --output-dir $out_base \ $path($<[0]) |