45 #ifndef XSD_CXX_TREE_USE_CHAR
46 #define XSD_CXX_TREE_USE_CHAR
54 #include <xsd/cxx/config.hxx>
56 #if(XSD_INT_VERSION != 4000000L)
57 #error XSD runtime version mismatch
60 #include <xsd/cxx/pre.hxx>
62 #include <xsd/cxx/xml/char-utf8.hxx>
64 #include <xsd/cxx/tree/elements.hxx>
65 #include <xsd/cxx/tree/exceptions.hxx>
66 #include <xsd/cxx/tree/types.hxx>
68 #include <xsd/cxx/xml/error-handler.hxx>
70 #include <xsd/cxx/xml/dom/auto-ptr.hxx>
72 #include <xsd/cxx/tree/parsing.hxx>
73 #include <xsd/cxx/tree/parsing/boolean.hxx>
74 #include <xsd/cxx/tree/parsing/byte.hxx>
75 #include <xsd/cxx/tree/parsing/decimal.hxx>
76 #include <xsd/cxx/tree/parsing/double.hxx>
77 #include <xsd/cxx/tree/parsing/float.hxx>
78 #include <xsd/cxx/tree/parsing/int.hxx>
79 #include <xsd/cxx/tree/parsing/long.hxx>
80 #include <xsd/cxx/tree/parsing/short.hxx>
81 #include <xsd/cxx/tree/parsing/unsigned-byte.hxx>
82 #include <xsd/cxx/tree/parsing/unsigned-int.hxx>
83 #include <xsd/cxx/tree/parsing/unsigned-long.hxx>
84 #include <xsd/cxx/tree/parsing/unsigned-short.hxx>
86 #include <xsd/cxx/tree/serialization.hxx>
87 #include <xsd/cxx/tree/serialization/boolean.hxx>
88 #include <xsd/cxx/tree/serialization/byte.hxx>
89 #include <xsd/cxx/tree/serialization/decimal.hxx>
90 #include <xsd/cxx/tree/serialization/double.hxx>
91 #include <xsd/cxx/tree/serialization/float.hxx>
92 #include <xsd/cxx/tree/serialization/int.hxx>
93 #include <xsd/cxx/tree/serialization/long.hxx>
94 #include <xsd/cxx/tree/serialization/short.hxx>
95 #include <xsd/cxx/tree/serialization/unsigned-byte.hxx>
96 #include <xsd/cxx/tree/serialization/unsigned-int.hxx>
97 #include <xsd/cxx/tree/serialization/unsigned-long.hxx>
98 #include <xsd/cxx/tree/serialization/unsigned-short.hxx>
99 #include <xsd/cxx/xml/dom/serialization-header.hxx>
101 #include <xsd/cxx/tree/std-ostream-operators.hxx>
107 typedef ::xsd::cxx::tree::type type;
108 typedef ::xsd::cxx::tree::simple_type<char, type> simple_type;
109 typedef ::xsd::cxx::tree::type container;
113 typedef signed char byte;
114 typedef unsigned char unsigned_byte;
118 typedef short short_;
119 typedef unsigned short unsigned_short;
124 typedef unsigned int unsigned_int;
128 typedef long long long_;
129 typedef unsigned long long unsigned_long;
133 typedef long long integer;
134 typedef long long non_positive_integer;
135 typedef unsigned long long non_negative_integer;
136 typedef unsigned long long positive_integer;
137 typedef long long negative_integer;
141 typedef bool boolean;
145 typedef float float_;
146 typedef double double_;
147 typedef double decimal;
151 typedef ::xsd::cxx::tree::string<char, simple_type> string;
152 typedef ::xsd::cxx::tree::normalized_string<char, string> normalized_string;
153 typedef ::xsd::cxx::tree::token<char, normalized_string> token;
154 typedef ::xsd::cxx::tree::name<char, token> name;
155 typedef ::xsd::cxx::tree::nmtoken<char, token> nmtoken;
156 typedef ::xsd::cxx::tree::nmtokens<char, simple_type, nmtoken> nmtokens;
157 typedef ::xsd::cxx::tree::ncname<char, name> ncname;
158 typedef ::xsd::cxx::tree::language<char, token> language;
162 typedef ::xsd::cxx::tree::id<char, ncname> id;
163 typedef ::xsd::cxx::tree::idref<char, ncname, type> idref;
164 typedef ::xsd::cxx::tree::idrefs<char, simple_type, idref> idrefs;
168 typedef ::xsd::cxx::tree::uri<char, simple_type> uri;
172 typedef ::xsd::cxx::tree::qname<char, simple_type, uri, ncname> qname;
176 typedef ::xsd::cxx::tree::buffer<char> buffer;
177 typedef ::xsd::cxx::tree::base64_binary<char, simple_type> base64_binary;
178 typedef ::xsd::cxx::tree::hex_binary<char, simple_type> hex_binary;
182 typedef ::xsd::cxx::tree::time_zone time_zone;
183 typedef ::xsd::cxx::tree::date<char, simple_type> date;
184 typedef ::xsd::cxx::tree::date_time<char, simple_type> date_time;
185 typedef ::xsd::cxx::tree::duration<char, simple_type> duration;
186 typedef ::xsd::cxx::tree::gday<char, simple_type> gday;
187 typedef ::xsd::cxx::tree::gmonth<char, simple_type> gmonth;
188 typedef ::xsd::cxx::tree::gmonth_day<char, simple_type> gmonth_day;
189 typedef ::xsd::cxx::tree::gyear<char, simple_type> gyear;
190 typedef ::xsd::cxx::tree::gyear_month<char, simple_type> gyear_month;
191 typedef ::xsd::cxx::tree::time<char, simple_type> time;
195 typedef ::xsd::cxx::tree::entity<char, ncname> entity;
196 typedef ::xsd::cxx::tree::entities<char, simple_type, entity> entities;
198 typedef ::xsd::cxx::tree::content_order content_order;
202 typedef ::xsd::cxx::xml::dom::namespace_info<char> namespace_info;
203 typedef ::xsd::cxx::xml::dom::namespace_infomap<char> namespace_infomap;
204 typedef ::xsd::cxx::tree::list_stream<char> list_stream;
205 typedef ::xsd::cxx::tree::as_double<double_> as_double;
206 typedef ::xsd::cxx::tree::as_decimal<decimal> as_decimal;
207 typedef ::xsd::cxx::tree::facet facet;
211 typedef ::xsd::cxx::tree::flags flags;
212 typedef ::xsd::cxx::tree::properties<char> properties;
216 typedef ::xsd::cxx::tree::severity severity;
217 typedef ::xsd::cxx::tree::error<char> error;
218 typedef ::xsd::cxx::tree::diagnostics<char> diagnostics;
222 typedef ::xsd::cxx::tree::exception<char> exception;
223 typedef ::xsd::cxx::tree::bounds<char> bounds;
224 typedef ::xsd::cxx::tree::duplicate_id<char> duplicate_id;
225 typedef ::xsd::cxx::tree::parsing<char> parsing;
226 typedef ::xsd::cxx::tree::expected_element<char> expected_element;
227 typedef ::xsd::cxx::tree::unexpected_element<char> unexpected_element;
228 typedef ::xsd::cxx::tree::expected_attribute<char> expected_attribute;
229 typedef ::xsd::cxx::tree::unexpected_enumerator<char> unexpected_enumerator;
230 typedef ::xsd::cxx::tree::expected_text_content<char> expected_text_content;
231 typedef ::xsd::cxx::tree::no_prefix_mapping<char> no_prefix_mapping;
232 typedef ::xsd::cxx::tree::serialization<char> serialization;
236 typedef ::xsd::cxx::xml::error_handler<char> error_handler;
244 using ::xsd::cxx::xml::dom::unique_ptr;
246 #ifndef XSD_CXX_TREE_TREE_NODE_KEY__XML_SCHEMA
247 #define XSD_CXX_TREE_TREE_NODE_KEY__XML_SCHEMA
250 const XMLCh*
const tree_node_key = ::xsd::cxx::tree::user_data_keys::node;
268 #include <xsd/cxx/xml/char-utf8.hxx>
270 #include <xsd/cxx/tree/containers.hxx>
271 #include <xsd/cxx/tree/elements.hxx>
272 #include <xsd/cxx/tree/exceptions.hxx>
273 #include <xsd/cxx/tree/list.hxx>
275 #include <xsd/cxx/xml/dom/parsing-header.hxx>
277 class Tag_t :
public ::xml_schema::type
282 typedef ::xml_schema::string name_type;
283 typedef ::xsd::cxx::tree::traits<name_type, char> name_traits;
285 const name_type& name()
const;
289 void name(
const name_type& x);
291 void name(::std::unique_ptr<name_type> p);
297 Tag_t(
const name_type&);
299 Tag_t(const ::xercesc::DOMElement& e,
300 ::xml_schema::flags f = 0,
301 ::xml_schema::container* c = 0);
303 Tag_t(
const Tag_t& x, ::xml_schema::flags f = 0, ::xml_schema::container* c = 0);
305 virtual Tag_t* _clone(::xml_schema::flags f = 0,
306 ::xml_schema::container* c = 0)
const;
315 void parse(::xsd::cxx::xml::dom::parser<char>&, ::xml_schema::flags);
318 ::xsd::cxx::tree::one<name_type> name_;
326 typedef ::xml_schema::string type_type;
327 typedef ::xsd::cxx::tree::traits<type_type, char> type_traits;
329 const type_type& type()
const;
333 void type(
const type_type& x);
335 void type(::std::unique_ptr<type_type> p);
339 typedef ::xml_schema::string filename_type;
340 typedef ::xsd::cxx::tree::traits<filename_type, char> filename_traits;
342 const filename_type& filename()
const;
344 filename_type& filename();
346 void filename(
const filename_type& x);
348 void filename(::std::unique_ptr<filename_type> p);
358 const filename_type&);
361 ::xml_schema::flags f = 0,
362 ::xml_schema::container* c = 0);
365 ::xml_schema::flags f = 0,
366 ::xml_schema::container* c = 0);
369 ::xml_schema::container* c = 0)
const;
378 void parse(::xsd::cxx::xml::dom::parser<char>&, ::xml_schema::flags);
381 ::xsd::cxx::tree::one<type_type> type_;
382 ::xsd::cxx::tree::one<filename_type> filename_;
390 typedef ::xml_schema::string name_type;
391 typedef ::xsd::cxx::tree::traits<name_type, char> name_traits;
393 const name_type& name()
const;
397 void name(
const name_type& x);
399 void name(::std::unique_ptr<name_type> p);
407 Field_t(
const char*,
const name_type&);
409 Field_t(const ::std::string&,
const name_type&);
411 Field_t(const ::xml_schema::string&,
const name_type&);
413 Field_t(const ::xercesc::DOMElement& e,
414 ::xml_schema::flags f = 0,
415 ::xml_schema::container* c = 0);
417 Field_t(
const Field_t& x, ::xml_schema::flags f = 0, ::xml_schema::container* c = 0);
419 virtual Field_t* _clone(::xml_schema::flags f = 0,
420 ::xml_schema::container* c = 0)
const;
429 void parse(::xsd::cxx::xml::dom::parser<char>&, ::xml_schema::flags);
432 ::xsd::cxx::tree::one<name_type> name_;
441 typedef ::xsd::cxx::tree::sequence<field_type> field_sequence;
442 typedef field_sequence::iterator field_iterator;
443 typedef field_sequence::const_iterator field_const_iterator;
444 typedef ::xsd::cxx::tree::traits<field_type, char> field_traits;
446 const field_sequence& field()
const;
448 field_sequence& field();
450 void field(
const field_sequence& s);
454 typedef ::xml_schema::string name_type;
455 typedef ::xsd::cxx::tree::traits<name_type, char> name_traits;
457 const name_type& name()
const;
461 void name(
const name_type& x);
463 void name(::std::unique_ptr<name_type> p);
471 Form_t(const ::xercesc::DOMElement& e,
472 ::xml_schema::flags f = 0,
473 ::xml_schema::container* c = 0);
475 Form_t(
const Form_t& x, ::xml_schema::flags f = 0, ::xml_schema::container* c = 0);
477 virtual Form_t* _clone(::xml_schema::flags f = 0,
478 ::xml_schema::container* c = 0)
const;
487 void parse(::xsd::cxx::xml::dom::parser<char>&, ::xml_schema::flags);
490 field_sequence field_;
491 ::xsd::cxx::tree::one<name_type> name_;
500 typedef ::xsd::cxx::tree::sequence<tag_type> tag_sequence;
501 typedef tag_sequence::iterator tag_iterator;
502 typedef tag_sequence::const_iterator tag_const_iterator;
503 typedef ::xsd::cxx::tree::traits<tag_type, char> tag_traits;
505 const tag_sequence& tag()
const;
509 void tag(
const tag_sequence& s);
514 typedef ::xsd::cxx::tree::sequence<attachment_type> attachment_sequence;
515 typedef attachment_sequence::iterator attachment_iterator;
516 typedef attachment_sequence::const_iterator attachment_const_iterator;
517 typedef ::xsd::cxx::tree::traits<attachment_type, char> attachment_traits;
519 const attachment_sequence& attachment()
const;
521 attachment_sequence& attachment();
523 void attachment(
const attachment_sequence& s);
528 typedef ::xsd::cxx::tree::optional<form_type> form_optional;
529 typedef ::xsd::cxx::tree::traits<form_type, char> form_traits;
531 const form_optional& form()
const;
533 form_optional& form();
537 void form(
const form_optional& x);
539 void form(::std::unique_ptr<form_type> p);
543 typedef ::xml_schema::string author_type;
544 typedef ::xsd::cxx::tree::traits<author_type, char> author_traits;
546 const author_type& author()
const;
548 author_type& author();
550 void author(
const author_type& x);
552 void author(::std::unique_ptr<author_type> p);
556 typedef ::xml_schema::string category_type;
557 typedef ::xsd::cxx::tree::traits<category_type, char> category_traits;
559 const category_type& category()
const;
561 category_type& category();
563 void category(
const category_type& x);
565 void category(::std::unique_ptr<category_type> p);
571 ECLEntry_t(
const author_type&,
const category_type&);
574 ::xml_schema::flags f = 0,
575 ::xml_schema::container* c = 0);
578 ::xml_schema::flags f = 0,
579 ::xml_schema::container* c = 0);
581 virtual ECLEntry_t* _clone(::xml_schema::flags f = 0,
582 ::xml_schema::container* c = 0)
const;
591 void parse(::xsd::cxx::xml::dom::parser<char>&, ::xml_schema::flags);
595 attachment_sequence attachment_;
597 ::xsd::cxx::tree::one<author_type> author_;
598 ::xsd::cxx::tree::one<category_type> category_;
603 ::std::ostream& operator<<(::std::ostream&,
const Tag_t&);
605 ::std::ostream& operator<<(::std::ostream&,
const Attachment_t&);
607 ::std::ostream& operator<<(::std::ostream&,
const Field_t&);
609 ::std::ostream& operator<<(::std::ostream&,
const Form_t&);
611 ::std::ostream& operator<<(::std::ostream&,
const ECLEntry_t&);
615 #include <xercesc/dom/DOMDocument.hpp>
616 #include <xercesc/dom/DOMErrorHandler.hpp>
617 #include <xercesc/sax/InputSource.hpp>
622 ::std::unique_ptr< ::ECLEntry_t> entry(
623 const ::std::string& uri,
624 ::xml_schema::flags f = 0,
625 const ::xml_schema::properties& p = ::xml_schema::properties());
627 ::std::unique_ptr< ::ECLEntry_t> entry(
628 const ::std::string& uri,
629 ::xml_schema::error_handler& eh,
630 ::xml_schema::flags f = 0,
631 const ::xml_schema::properties& p = ::xml_schema::properties());
633 ::std::unique_ptr< ::ECLEntry_t> entry(
634 const ::std::string& uri,
635 ::xercesc::DOMErrorHandler& eh,
636 ::xml_schema::flags f = 0,
637 const ::xml_schema::properties& p = ::xml_schema::properties());
642 ::std::unique_ptr< ::ECLEntry_t> entry(
644 ::xml_schema::flags f = 0,
645 const ::xml_schema::properties& p = ::xml_schema::properties());
647 ::std::unique_ptr< ::ECLEntry_t> entry(
649 ::xml_schema::error_handler& eh,
650 ::xml_schema::flags f = 0,
651 const ::xml_schema::properties& p = ::xml_schema::properties());
653 ::std::unique_ptr< ::ECLEntry_t> entry(
655 ::xercesc::DOMErrorHandler& eh,
656 ::xml_schema::flags f = 0,
657 const ::xml_schema::properties& p = ::xml_schema::properties());
659 ::std::unique_ptr< ::ECLEntry_t> entry(
661 const ::std::string&
id,
662 ::xml_schema::flags f = 0,
663 const ::xml_schema::properties& p = ::xml_schema::properties());
665 ::std::unique_ptr< ::ECLEntry_t> entry(
667 const ::std::string&
id,
668 ::xml_schema::error_handler& eh,
669 ::xml_schema::flags f = 0,
670 const ::xml_schema::properties& p = ::xml_schema::properties());
672 ::std::unique_ptr< ::ECLEntry_t> entry(
674 const ::std::string&
id,
675 ::xercesc::DOMErrorHandler& eh,
676 ::xml_schema::flags f = 0,
677 const ::xml_schema::properties& p = ::xml_schema::properties());
682 ::std::unique_ptr< ::ECLEntry_t> entry(
683 ::xercesc::InputSource& is,
684 ::xml_schema::flags f = 0,
685 const ::xml_schema::properties& p = ::xml_schema::properties());
687 ::std::unique_ptr< ::ECLEntry_t> entry(
688 ::xercesc::InputSource& is,
689 ::xml_schema::error_handler& eh,
690 ::xml_schema::flags f = 0,
691 const ::xml_schema::properties& p = ::xml_schema::properties());
693 ::std::unique_ptr< ::ECLEntry_t> entry(
694 ::xercesc::InputSource& is,
695 ::xercesc::DOMErrorHandler& eh,
696 ::xml_schema::flags f = 0,
697 const ::xml_schema::properties& p = ::xml_schema::properties());
702 ::std::unique_ptr< ::ECLEntry_t> entry(
703 const ::xercesc::DOMDocument& d,
704 ::xml_schema::flags f = 0,
705 const ::xml_schema::properties& p = ::xml_schema::properties());
707 ::std::unique_ptr< ::ECLEntry_t> entry(
708 ::xml_schema::dom::unique_ptr< ::xercesc::DOMDocument> d,
709 ::xml_schema::flags f = 0,
710 const ::xml_schema::properties& p = ::xml_schema::properties());
714 #include <xercesc/dom/DOMDocument.hpp>
715 #include <xercesc/dom/DOMErrorHandler.hpp>
716 #include <xercesc/framework/XMLFormatter.hpp>
718 #include <xsd/cxx/xml/dom/auto-ptr.hxx>
723 void entry(::std::ostream& os,
724 const ::ECLEntry_t& x,
725 const ::xml_schema::namespace_infomap& m = ::xml_schema::namespace_infomap(),
726 const ::std::string& e =
"UTF-8",
727 ::xml_schema::flags f = 0);
729 void entry(::std::ostream& os,
730 const ::ECLEntry_t& x,
731 ::xml_schema::error_handler& eh,
732 const ::xml_schema::namespace_infomap& m = ::xml_schema::namespace_infomap(),
733 const ::std::string& e =
"UTF-8",
734 ::xml_schema::flags f = 0);
736 void entry(::std::ostream& os,
737 const ::ECLEntry_t& x,
738 ::xercesc::DOMErrorHandler& eh,
739 const ::xml_schema::namespace_infomap& m = ::xml_schema::namespace_infomap(),
740 const ::std::string& e =
"UTF-8",
741 ::xml_schema::flags f = 0);
746 void entry(::xercesc::XMLFormatTarget& ft,
747 const ::ECLEntry_t& x,
748 const ::xml_schema::namespace_infomap& m = ::xml_schema::namespace_infomap(),
749 const ::std::string& e =
"UTF-8",
750 ::xml_schema::flags f = 0);
752 void entry(::xercesc::XMLFormatTarget& ft,
753 const ::ECLEntry_t& x,
754 ::xml_schema::error_handler& eh,
755 const ::xml_schema::namespace_infomap& m = ::xml_schema::namespace_infomap(),
756 const ::std::string& e =
"UTF-8",
757 ::xml_schema::flags f = 0);
759 void entry(::xercesc::XMLFormatTarget& ft,
760 const ::ECLEntry_t& x,
761 ::xercesc::DOMErrorHandler& eh,
762 const ::xml_schema::namespace_infomap& m = ::xml_schema::namespace_infomap(),
763 const ::std::string& e =
"UTF-8",
764 ::xml_schema::flags f = 0);
769 void entry(::xercesc::DOMDocument& d, const ::ECLEntry_t& x, ::xml_schema::flags f = 0);
774 ::xml_schema::dom::unique_ptr< ::xercesc::DOMDocument> entry(
775 const ::ECLEntry_t& x,
776 const ::xml_schema::namespace_infomap& m = ::xml_schema::namespace_infomap(),
777 ::xml_schema::flags f = 0);
779 void operator<<(::xercesc::DOMElement&,
const Tag_t&);
781 void operator<<(::xercesc::DOMElement&,
const Attachment_t&);
783 void operator<<(::xercesc::DOMElement&,
const Field_t&);
785 void operator<<(::xercesc::DOMElement&,
const Form_t&);
787 void operator<<(::xercesc::DOMElement&,
const ECLEntry_t&);
789 #include <xsd/cxx/post.hxx>