summaryrefslogtreecommitdiff
path: root/xsd-examples/cxx/parser/mixin
diff options
context:
space:
mode:
Diffstat (limited to 'xsd-examples/cxx/parser/mixin')
-rw-r--r--xsd-examples/cxx/parser/mixin/README27
-rw-r--r--xsd-examples/cxx/parser/mixin/buildfile4
2 files changed, 23 insertions, 8 deletions
diff --git a/xsd-examples/cxx/parser/mixin/README b/xsd-examples/cxx/parser/mixin/README
index 343e379..20e5d53 100644
--- a/xsd-examples/cxx/parser/mixin/README
+++ b/xsd-examples/cxx/parser/mixin/README
@@ -20,15 +20,32 @@ schema.map
schema-pskel.hxx
schema-pskel.cxx
- Parser skeletons generated by XSD from schema.xsd and
- schema.map.
+ Parser skeletons generated by the XSD compiler from schema.xsd and
+ schema.map using the following command line:
+
+ xsd cxx-parser --type-map=schema.map schema.xsd
+
+ Or if using Expat instead of Xerces-C++ as the underlying XML parser:
+
+ xsd cxx-parser --xml-parser=expat --type-map=schema.map schema.xsd
driver.cxx
Parser implementations and a driver for the example. It
shows how to mix the implementation of the base parser
into the derived parser.
-To run the example on the sample XML instance document simply
-execute:
-$ ./driver instance.xml
+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++ -c schema-pskel.cxx
+c++ -c driver.cxx
+c++ -o driver driver.o schema-pskel.o -lxerces-c
+
+Or if using Expat as the underlying XML parser:
+
+c++ -o driver driver.o schema-pskel.o -lexpat
+
+To run the example on the sample XML instance document execute:
+
+./driver instance.xml
diff --git a/xsd-examples/cxx/parser/mixin/buildfile b/xsd-examples/cxx/parser/mixin/buildfile
index 4d4d751..7b6cee2 100644
--- a/xsd-examples/cxx/parser/mixin/buildfile
+++ b/xsd-examples/cxx/parser/mixin/buildfile
@@ -12,9 +12,7 @@ exe{driver}: xml{instance}: test.input = true
<{hxx ixx cxx}{schema-pskel}>: xsd{schema} map{schema} $xsd
{{
- diag xsd ($<[0]) # @@ TMP
-
- $xsd cxx-parser --std c++11 \
+ $xsd cxx-parser \
--generate-inline \
--skel-file-suffix -pskel \
--type-map $path($<[1]) \