diff options
author | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2014-07-23 15:21:29 +0200 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2014-07-23 15:21:29 +0200 |
commit | bada6666c70977a058755ccf232e7d67b24adeed (patch) | |
tree | 1e92d50cebce96abaf9bce19e36026c47f77b9ba /xsd/examples/cxx/tree/messaging | |
parent | eaf34adcbd8095bc6d1f3371b1227f654c7b19fc (diff) |
New upstream release
Diffstat (limited to 'xsd/examples/cxx/tree/messaging')
-rw-r--r-- | xsd/examples/cxx/tree/messaging/balance.xml | 1 | ||||
-rw-r--r-- | xsd/examples/cxx/tree/messaging/deposit.xml | 1 | ||||
-rw-r--r-- | xsd/examples/cxx/tree/messaging/dom-parse.cxx | 32 | ||||
-rw-r--r-- | xsd/examples/cxx/tree/messaging/dom-parse.hxx | 1 | ||||
-rw-r--r-- | xsd/examples/cxx/tree/messaging/dom-serialize.cxx | 27 | ||||
-rw-r--r-- | xsd/examples/cxx/tree/messaging/dom-serialize.hxx | 1 | ||||
-rw-r--r-- | xsd/examples/cxx/tree/messaging/driver.cxx | 1 | ||||
-rw-r--r-- | xsd/examples/cxx/tree/messaging/makefile | 13 | ||||
-rw-r--r-- | xsd/examples/cxx/tree/messaging/protocol.xsd | 1 | ||||
-rw-r--r-- | xsd/examples/cxx/tree/messaging/withdraw.xml | 1 |
10 files changed, 7 insertions, 72 deletions
diff --git a/xsd/examples/cxx/tree/messaging/balance.xml b/xsd/examples/cxx/tree/messaging/balance.xml index 57eeaed..83b9692 100644 --- a/xsd/examples/cxx/tree/messaging/balance.xml +++ b/xsd/examples/cxx/tree/messaging/balance.xml @@ -3,7 +3,6 @@ <!-- file : examples/cxx/tree/messaging/balance.xml -author : Boris Kolpackov <boris@codesynthesis.com> copyright : not copyrighted - public domain --> diff --git a/xsd/examples/cxx/tree/messaging/deposit.xml b/xsd/examples/cxx/tree/messaging/deposit.xml index 9da3c59..c59153d 100644 --- a/xsd/examples/cxx/tree/messaging/deposit.xml +++ b/xsd/examples/cxx/tree/messaging/deposit.xml @@ -3,7 +3,6 @@ <!-- file : examples/cxx/tree/messaging/deposit.xml -author : Boris Kolpackov <boris@codesynthesis.com> copyright : not copyrighted - public domain --> diff --git a/xsd/examples/cxx/tree/messaging/dom-parse.cxx b/xsd/examples/cxx/tree/messaging/dom-parse.cxx index e4bc6cc..61f9f4a 100644 --- a/xsd/examples/cxx/tree/messaging/dom-parse.cxx +++ b/xsd/examples/cxx/tree/messaging/dom-parse.cxx @@ -1,5 +1,4 @@ // file : examples/cxx/tree/messaging/dom-parse.cxx -// author : Boris Kolpackov <boris@codesynthesis.com> // copyright : not copyrighted - public domain #include "dom-parse.hxx" @@ -30,10 +29,6 @@ parse (std::istream& is, const std::string& id, bool validate) DOMImplementation* impl ( DOMImplementationRegistry::getDOMImplementation (ls_id)); -#if _XERCES_VERSION >= 30000 - - // Xerces-C++ 3.0.0 and later. - // xml::dom::auto_ptr<DOMLSParser> parser ( impl->createLSParser (DOMImplementationLS::MODE_SYNCHRONOUS, 0)); @@ -85,39 +80,12 @@ parse (std::istream& is, const std::string& id, bool validate) xml::dom::bits::error_handler_proxy<char> ehp (eh); conf->setParameter (XMLUni::fgDOMErrorHandler, &ehp); -#else // _XERCES_VERSION >= 30000 - - // Same as above but for Xerces-C++ 2 series. - // - xml::dom::auto_ptr<DOMBuilder> parser ( - impl->createDOMBuilder (DOMImplementationLS::MODE_SYNCHRONOUS, 0)); - - parser->setFeature (XMLUni::fgDOMComments, false); - parser->setFeature (XMLUni::fgDOMDatatypeNormalization, true); - parser->setFeature (XMLUni::fgDOMEntities, false); - parser->setFeature (XMLUni::fgDOMNamespaces, true); - parser->setFeature (XMLUni::fgDOMWhitespaceInElementContent, false); - parser->setFeature (XMLUni::fgDOMValidation, validate); - parser->setFeature (XMLUni::fgXercesSchema, validate); - parser->setFeature (XMLUni::fgXercesSchemaFullChecking, false); - parser->setFeature (XMLUni::fgXercesUserAdoptsDOMDocument, true); - - tree::error_handler<char> eh; - xml::dom::bits::error_handler_proxy<char> ehp (eh); - parser->setErrorHandler (&ehp); - -#endif // _XERCES_VERSION >= 30000 - // Prepare input stream. // xml::sax::std_input_source isrc (is, id); Wrapper4InputSource wrap (&isrc, false); -#if _XERCES_VERSION >= 30000 xml::dom::auto_ptr<DOMDocument> doc (parser->parse (&wrap)); -#else - xml::dom::auto_ptr<DOMDocument> doc (parser->parse (wrap)); -#endif eh.throw_if_failed<tree::parsing<char> > (); diff --git a/xsd/examples/cxx/tree/messaging/dom-parse.hxx b/xsd/examples/cxx/tree/messaging/dom-parse.hxx index 640b28a..6eccacd 100644 --- a/xsd/examples/cxx/tree/messaging/dom-parse.hxx +++ b/xsd/examples/cxx/tree/messaging/dom-parse.hxx @@ -1,5 +1,4 @@ // file : examples/cxx/tree/messaging/dom-parse.hxx -// author : Boris Kolpackov <boris@codesynthesis.com> // copyright : not copyrighted - public domain #ifndef DOM_PARSE diff --git a/xsd/examples/cxx/tree/messaging/dom-serialize.cxx b/xsd/examples/cxx/tree/messaging/dom-serialize.cxx index c0f4311..dbf3370 100644 --- a/xsd/examples/cxx/tree/messaging/dom-serialize.cxx +++ b/xsd/examples/cxx/tree/messaging/dom-serialize.cxx @@ -1,5 +1,4 @@ // file : examples/cxx/tree/messaging/dom-serialize.cxx -// author : Boris Kolpackov <boris@codesynthesis.com> // copyright : not copyrighted - public domain #include "dom-serialize.hxx" @@ -38,8 +37,6 @@ serialize (std::ostream& os, xml::dom::ostream_format_target oft (os); -#if _XERCES_VERSION >= 30000 - // Create a DOMSerializer. // xml::dom::auto_ptr<DOMLSSerializer> writer ( @@ -55,6 +52,7 @@ serialize (std::ostream& os, // conf->setParameter (XMLUni::fgDOMWRTDiscardDefaultContent, true); conf->setParameter (XMLUni::fgDOMWRTFormatPrettyPrint, true); + conf->setParameter (XMLUni::fgDOMWRTXercesPrettyPrint, false); xml::dom::auto_ptr<DOMLSOutput> out (impl->createLSOutput ()); out->setEncoding (xml::string (encoding).c_str ()); @@ -62,28 +60,5 @@ serialize (std::ostream& os, writer->write (&doc, out.get ()); -#else - - // Create a DOMWriter. - // - xml::dom::auto_ptr<DOMWriter> writer (impl->createDOMWriter ()); - - // Set error handler. - // - writer->setErrorHandler (&ehp); - - // Set encoding. - // - writer->setEncoding(xml::string (encoding).c_str ()); - - // Set some generally nice features. - // - writer->setFeature (XMLUni::fgDOMWRTDiscardDefaultContent, true); - writer->setFeature (XMLUni::fgDOMWRTFormatPrettyPrint, true); - - writer->writeNode (&oft, doc); - -#endif - eh.throw_if_failed<tree::serialization<char> > (); } diff --git a/xsd/examples/cxx/tree/messaging/dom-serialize.hxx b/xsd/examples/cxx/tree/messaging/dom-serialize.hxx index 1a7e855..f80e22b 100644 --- a/xsd/examples/cxx/tree/messaging/dom-serialize.hxx +++ b/xsd/examples/cxx/tree/messaging/dom-serialize.hxx @@ -1,5 +1,4 @@ // file : examples/cxx/tree/messaging/dom-serialize.hxx -// author : Boris Kolpackov <boris@codesynthesis.com> // copyright : not copyrighted - public domain #ifndef DOM_SERIALIZE diff --git a/xsd/examples/cxx/tree/messaging/driver.cxx b/xsd/examples/cxx/tree/messaging/driver.cxx index 4c36aa4..095e2cd 100644 --- a/xsd/examples/cxx/tree/messaging/driver.cxx +++ b/xsd/examples/cxx/tree/messaging/driver.cxx @@ -1,5 +1,4 @@ // file : examples/cxx/tree/messaging/driver.cxx -// author : Boris Kolpackov <boris@codesynthesis.com> // copyright : not copyrighted - public domain #include <memory> // std::auto_ptr diff --git a/xsd/examples/cxx/tree/messaging/makefile b/xsd/examples/cxx/tree/messaging/makefile index b7e0d0a..309147a 100644 --- a/xsd/examples/cxx/tree/messaging/makefile +++ b/xsd/examples/cxx/tree/messaging/makefile @@ -1,6 +1,5 @@ # file : examples/cxx/tree/messaging/makefile -# author : Boris Kolpackov <boris@codesynthesis.com> -# copyright : Copyright (c) 2005-2010 Code Synthesis Tools CC +# copyright : Copyright (c) 2005-2014 Code Synthesis Tools CC # license : GNU GPL v2 + exceptions; see accompanying LICENSE file include $(dir $(lastword $(MAKEFILE_LIST)))../../../../build/bootstrap.make @@ -29,7 +28,7 @@ $(call import,\ # $(driver): $(obj) $(xerces_c.l) -$(obj) $(dep): cpp_options := -I$(src_root)/libxsd +$(obj) $(dep): cpp_options := -I$(out_base) -I$(src_base) -I$(src_root)/libxsd $(obj) $(dep): $(xerces_c.l.cpp-options) genf := $(xsd:.xsd=.hxx) $(xsd:.xsd=.ixx) $(xsd:.xsd=.cxx) @@ -37,12 +36,12 @@ gen := $(addprefix $(out_base)/,$(genf)) $(gen): xsd := $(out_root)/xsd/xsd -$(gen): xsd_options := --root-element-all \ ---generate-element-type --generate-element-map --generate-serialization +$(gen): xsd_options += --root-element-all --generate-element-type \ +--generate-element-map --generate-serialization $(gen): $(out_root)/xsd/xsd -$(call include-dep,$(dep)) +$(call include-dep,$(dep),$(obj),$(gen)) # Convenience alias for default target. # @@ -83,7 +82,7 @@ $(dist): $(dist-common) $(dist-win): $(dist-common) $(call install-data,$(src_base)/README,$(dist_prefix)/$(path)/README.txt) - $(call message,,unix2dos $(dist_prefix)/$(path)/README.txt) + $(call message,,todos $(dist_prefix)/$(path)/README.txt) # Clean. diff --git a/xsd/examples/cxx/tree/messaging/protocol.xsd b/xsd/examples/cxx/tree/messaging/protocol.xsd index 3461133..b371ba7 100644 --- a/xsd/examples/cxx/tree/messaging/protocol.xsd +++ b/xsd/examples/cxx/tree/messaging/protocol.xsd @@ -3,7 +3,6 @@ <!-- file : examples/cxx/tree/messaging/protocol.xsd -author : Boris Kolpackov <boris@codesynthesis.com> copyright : not copyrighted - public domain --> diff --git a/xsd/examples/cxx/tree/messaging/withdraw.xml b/xsd/examples/cxx/tree/messaging/withdraw.xml index 16a7440..1f309f3 100644 --- a/xsd/examples/cxx/tree/messaging/withdraw.xml +++ b/xsd/examples/cxx/tree/messaging/withdraw.xml @@ -3,7 +3,6 @@ <!-- file : examples/cxx/tree/messaging/withdraw.xml -author : Boris Kolpackov <boris@codesynthesis.com> copyright : not copyrighted - public domain --> |