summaryrefslogtreecommitdiff
path: root/xsd-examples/cxx/tree/mixed
diff options
context:
space:
mode:
Diffstat (limited to 'xsd-examples/cxx/tree/mixed')
-rw-r--r--xsd-examples/cxx/tree/mixed/README21
-rw-r--r--xsd-examples/cxx/tree/mixed/buildfile4
2 files changed, 19 insertions, 6 deletions
diff --git a/xsd-examples/cxx/tree/mixed/README b/xsd-examples/cxx/tree/mixed/README
index fc23faa..49ec809 100644
--- a/xsd-examples/cxx/tree/mixed/README
+++ b/xsd-examples/cxx/tree/mixed/README
@@ -32,7 +32,12 @@ text.hxx
text.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 text.xsd.
+ object model.
+
+ These files are generated by the XSD compiler from text.xsd using the
+ following command line:
+
+ xsd cxx-tree text.xsd
driver.cxx
Driver for the example. It first calls one of the parsing functions
@@ -40,6 +45,16 @@ driver.cxx
both the underlying DOM and statically-typed mapping to perform the
transformation.
-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 text.cxx
+c++ -DXSD_CXX11 -c driver.cxx
+c++ -o driver driver.o text.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 text.xml
+./driver text.xml
diff --git a/xsd-examples/cxx/tree/mixed/buildfile b/xsd-examples/cxx/tree/mixed/buildfile
index 4c1be8e..c91021a 100644
--- a/xsd-examples/cxx/tree/mixed/buildfile
+++ b/xsd-examples/cxx/tree/mixed/buildfile
@@ -12,9 +12,7 @@ exe{driver}: xml{text}: test.input = true
<{hxx ixx cxx}{text}>: xsd{text} $xsd
{{
- diag xsd ($<[0]) # @@ TMP
-
- $xsd cxx-tree --std c++11 \
+ $xsd cxx-tree \
--generate-inline \
--output-dir $out_base \
$path($<[0])