summaryrefslogtreecommitdiff
path: root/xsd-examples/cxx/tree/custom/wildcard
diff options
context:
space:
mode:
Diffstat (limited to 'xsd-examples/cxx/tree/custom/wildcard')
-rw-r--r--xsd-examples/cxx/tree/custom/wildcard/README24
-rw-r--r--xsd-examples/cxx/tree/custom/wildcard/buildfile4
2 files changed, 21 insertions, 7 deletions
diff --git a/xsd-examples/cxx/tree/custom/wildcard/README b/xsd-examples/cxx/tree/custom/wildcard/README
index 70eaea4..8b5b2f0 100644
--- a/xsd-examples/cxx/tree/custom/wildcard/README
+++ b/xsd-examples/cxx/tree/custom/wildcard/README
@@ -23,8 +23,16 @@ wildcard.cxx
C++ types that represent the given vocabulary, a set of parsing
functions that convert XML instance documents to a tree-like in-memory
object model, and a set of serialization functions that convert the
- object model back to XML. These are generated by XSD from wildcard.xsd
- with the --custom-type option in order to customize the data type.
+ object model back to XML.
+
+ These files are generated by the XSD compiler from wildcard.xsd using
+ the following command line:
+
+ xsd cxx-tree --generate-serialization --generate-ostream \
+ --custom-type data=/data_base \
+ --hxx-epilogue '#include "wildcard-custom.hxx"' wildcard.xsd
+
+ The --custom-type option is used to customize the data type.
wildcard-custom.hxx
Header file which defines our own data class by inheriting from the
@@ -40,6 +48,14 @@ driver.cxx
the data to STDERR, including the extra attribute. Finally, the driver
serializes the object model back to XML.
-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++ -c wildcard.cxx
+c++ -c wildcard-custom.cxx
+c++ -c driver.cxx
+c++ -o driver driver.o wildcard.o wildcard-custom.o -lxerces-c
+
+To run the example on the sample XML instance document execute:
-$ ./driver wildcard.xml
+./driver wildcard.xml
diff --git a/xsd-examples/cxx/tree/custom/wildcard/buildfile b/xsd-examples/cxx/tree/custom/wildcard/buildfile
index e386709..1bb5a8f 100644
--- a/xsd-examples/cxx/tree/custom/wildcard/buildfile
+++ b/xsd-examples/cxx/tree/custom/wildcard/buildfile
@@ -12,9 +12,7 @@ exe{driver}: xml{wildcard}: test.input = true
<{hxx ixx cxx}{wildcard}>: xsd{wildcard} $xsd
{{
- diag xsd ($<[0]) # @@ TMP
-
- $xsd cxx-tree --std c++11 \
+ $xsd cxx-tree \
--generate-inline \
--generate-serialization \
--generate-ostream \