summaryrefslogtreecommitdiff
path: root/xsd/examples/cxx/tree/custom/comments
diff options
context:
space:
mode:
Diffstat (limited to 'xsd/examples/cxx/tree/custom/comments')
-rw-r--r--xsd/examples/cxx/tree/custom/comments/dom-parse.cxx36
-rw-r--r--xsd/examples/cxx/tree/custom/comments/dom-parse.hxx1
-rw-r--r--xsd/examples/cxx/tree/custom/comments/driver.cxx1
-rw-r--r--xsd/examples/cxx/tree/custom/comments/makefile14
-rw-r--r--xsd/examples/cxx/tree/custom/comments/people.xml1
-rw-r--r--xsd/examples/cxx/tree/custom/comments/people.xsd1
-rw-r--r--xsd/examples/cxx/tree/custom/comments/xml-schema-custom.cxx1
-rw-r--r--xsd/examples/cxx/tree/custom/comments/xml-schema-custom.hxx1
8 files changed, 8 insertions, 48 deletions
diff --git a/xsd/examples/cxx/tree/custom/comments/dom-parse.cxx b/xsd/examples/cxx/tree/custom/comments/dom-parse.cxx
index 1ba62e5..9999f67 100644
--- a/xsd/examples/cxx/tree/custom/comments/dom-parse.cxx
+++ b/xsd/examples/cxx/tree/custom/comments/dom-parse.cxx
@@ -1,5 +1,4 @@
// file : examples/cxx/tree/custom/comments/dom-parse.cxx
-// author : Boris Kolpackov <boris@codesynthesis.com>
// copyright : not copyrighted - public domain
#include "dom-parse.hxx"
@@ -30,18 +29,14 @@ 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));
DOMConfiguration* conf (parser->getDomConfig ());
- // Discard comment nodes in the document.
+ // Preserve comment nodes in the document.
//
- conf->setParameter (XMLUni::fgDOMComments, false);
+ conf->setParameter (XMLUni::fgDOMComments, true);
// Enable datatype normalization.
//
@@ -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/custom/comments/dom-parse.hxx b/xsd/examples/cxx/tree/custom/comments/dom-parse.hxx
index 05bfa2e..fea46d0 100644
--- a/xsd/examples/cxx/tree/custom/comments/dom-parse.hxx
+++ b/xsd/examples/cxx/tree/custom/comments/dom-parse.hxx
@@ -1,5 +1,4 @@
// file : examples/cxx/tree/custom/comments/dom-parse.hxx
-// author : Boris Kolpackov <boris@codesynthesis.com>
// copyright : not copyrighted - public domain
#ifndef DOM_PARSE
diff --git a/xsd/examples/cxx/tree/custom/comments/driver.cxx b/xsd/examples/cxx/tree/custom/comments/driver.cxx
index 4ce2573..39b16f7 100644
--- a/xsd/examples/cxx/tree/custom/comments/driver.cxx
+++ b/xsd/examples/cxx/tree/custom/comments/driver.cxx
@@ -1,5 +1,4 @@
// file : examples/cxx/tree/custom/commens/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/custom/comments/makefile b/xsd/examples/cxx/tree/custom/comments/makefile
index de265a1..eebb75e 100644
--- a/xsd/examples/cxx/tree/custom/comments/makefile
+++ b/xsd/examples/cxx/tree/custom/comments/makefile
@@ -1,6 +1,5 @@
# file : examples/cxx/tree/custom/comments/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
@@ -28,7 +27,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)
# Header file for XML Schema namespace.
@@ -37,7 +36,7 @@ $(out_base)/xml-schema.hxx: $(out_root)/xsd/xsd
$(call message,xsd $(src_base)/xml-schema.xsd,\
$(out_root)/xsd/xsd cxx-tree --output-dir $(out_base) --generate-xml-schema \
--generate-serialization --custom-type anyType=/type_base \
---hxx-epilogue '\#include "xml-schema-custom.hxx"' xml-schema.xsd)
+--hxx-epilogue '#include "xml-schema-custom.hxx"' xml-schema.xsd)
#
#
@@ -45,15 +44,14 @@ genf := $(xsd:.xsd=.hxx) $(xsd:.xsd=.ixx) $(xsd:.xsd=.cxx)
gen := $(addprefix $(out_base)/,$(genf))
$(gen): xsd := $(out_root)/xsd/xsd
-
-$(gen): xsd_options := \
+$(gen): xsd_options += \
--generate-inline \
--generate-serialization \
--extern-xml-schema xml-schema.xsd
$(gen): $(out_root)/xsd/xsd
-$(call include-dep,$(dep))
+$(call include-dep,$(dep),$(obj),$(gen))
# Convenience alias for default target.
#
@@ -90,7 +88,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/custom/comments/people.xml b/xsd/examples/cxx/tree/custom/comments/people.xml
index b6a44e5..55c08a1 100644
--- a/xsd/examples/cxx/tree/custom/comments/people.xml
+++ b/xsd/examples/cxx/tree/custom/comments/people.xml
@@ -3,7 +3,6 @@
<!--
file : examples/cxx/tree/custom/comments/people.xml
-author : Boris Kolpackov <boris@codesynthesis.com>
copyright : not copyrighted - public domain
-->
diff --git a/xsd/examples/cxx/tree/custom/comments/people.xsd b/xsd/examples/cxx/tree/custom/comments/people.xsd
index 2f40754..e70dd2a 100644
--- a/xsd/examples/cxx/tree/custom/comments/people.xsd
+++ b/xsd/examples/cxx/tree/custom/comments/people.xsd
@@ -3,7 +3,6 @@
<!--
file : examples/cxx/tree/custom/comments/people.xsd
-author : Boris Kolpackov <boris@codesynthesis.com>
copyright : not copyrighted - public domain
-->
diff --git a/xsd/examples/cxx/tree/custom/comments/xml-schema-custom.cxx b/xsd/examples/cxx/tree/custom/comments/xml-schema-custom.cxx
index d86d6af..67937d1 100644
--- a/xsd/examples/cxx/tree/custom/comments/xml-schema-custom.cxx
+++ b/xsd/examples/cxx/tree/custom/comments/xml-schema-custom.cxx
@@ -1,5 +1,4 @@
// file : examples/cxx/tree/custom/comments/xml-schema-custom.cxx
-// author : Boris Kolpackov <boris@codesynthesis.com>
// copyright : not copyrighted - public domain
// Include xml-schema.hxx instead of xml-schema-custom.hxx here.
diff --git a/xsd/examples/cxx/tree/custom/comments/xml-schema-custom.hxx b/xsd/examples/cxx/tree/custom/comments/xml-schema-custom.hxx
index 821d0dd..0442a44 100644
--- a/xsd/examples/cxx/tree/custom/comments/xml-schema-custom.hxx
+++ b/xsd/examples/cxx/tree/custom/comments/xml-schema-custom.hxx
@@ -1,5 +1,4 @@
// file : examples/cxx/tree/custom/comments/xml-schema-custom.hxx
-// author : Boris Kolpackov <boris@codesynthesis.com>
// copyright : not copyrighted - public domain
// Do not include this file directly, use xml-schema.hxx instead. This