diff options
Diffstat (limited to 'xsd-examples/cxx/tree/order/mixed')
-rw-r--r-- | xsd-examples/cxx/tree/order/mixed/README | 25 | ||||
-rw-r--r-- | xsd-examples/cxx/tree/order/mixed/buildfile | 4 |
2 files changed, 20 insertions, 9 deletions
diff --git a/xsd-examples/cxx/tree/order/mixed/README b/xsd-examples/cxx/tree/order/mixed/README index e66c1ad..bc209f6 100644 --- a/xsd-examples/cxx/tree/order/mixed/README +++ b/xsd-examples/cxx/tree/order/mixed/README @@ -25,10 +25,16 @@ text.xml text.hxx text.cxx C++ types that represent the given vocabulary as well as a set of - parsing and serialization functions. These are generated by XSD - from text.xsd. Note that the --ordered-type-mixed option is used - to indicate to the XSD compiler that all types with mixed content - should be automatically treated as ordered. + parsing and serialization functions. + + These files are generated by the XSD compiler from text.xsd using the + following command line: + + xsd cxx-tree --generate-serialization --ordered-type-mixed text.xsd + + Note that the --ordered-type-mixed option is used to indicate to the XSD + compiler that all types with mixed content should be automatically treated + as ordered. driver.cxx Driver for the example. It first calls one of the parsing functions @@ -40,6 +46,13 @@ driver.cxx text back to XML to verify that the content order is preserved in the output document. -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 text.cxx +c++ -c driver.cxx +c++ -o driver driver.o text.o -lxerces-c + +To run the example on the sample XML instance document execute: -$ ./driver text.xml +./driver text.xml diff --git a/xsd-examples/cxx/tree/order/mixed/buildfile b/xsd-examples/cxx/tree/order/mixed/buildfile index 149bca0..6bc21e2 100644 --- a/xsd-examples/cxx/tree/order/mixed/buildfile +++ b/xsd-examples/cxx/tree/order/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 \ --generate-serialization \ --ordered-type-mixed \ |