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/exceptions.hxx>
65 #include <xsd/cxx/tree/elements.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/byte.hxx>
74 #include <xsd/cxx/tree/parsing/unsigned-byte.hxx>
75 #include <xsd/cxx/tree/parsing/short.hxx>
76 #include <xsd/cxx/tree/parsing/unsigned-short.hxx>
77 #include <xsd/cxx/tree/parsing/int.hxx>
78 #include <xsd/cxx/tree/parsing/unsigned-int.hxx>
79 #include <xsd/cxx/tree/parsing/long.hxx>
80 #include <xsd/cxx/tree/parsing/unsigned-long.hxx>
81 #include <xsd/cxx/tree/parsing/boolean.hxx>
82 #include <xsd/cxx/tree/parsing/float.hxx>
83 #include <xsd/cxx/tree/parsing/double.hxx>
84 #include <xsd/cxx/tree/parsing/decimal.hxx>
86 #include <xsd/cxx/xml/dom/serialization-header.hxx>
87 #include <xsd/cxx/tree/serialization.hxx>
88 #include <xsd/cxx/tree/serialization/byte.hxx>
89 #include <xsd/cxx/tree/serialization/unsigned-byte.hxx>
90 #include <xsd/cxx/tree/serialization/short.hxx>
91 #include <xsd/cxx/tree/serialization/unsigned-short.hxx>
92 #include <xsd/cxx/tree/serialization/int.hxx>
93 #include <xsd/cxx/tree/serialization/unsigned-int.hxx>
94 #include <xsd/cxx/tree/serialization/long.hxx>
95 #include <xsd/cxx/tree/serialization/unsigned-long.hxx>
96 #include <xsd/cxx/tree/serialization/boolean.hxx>
97 #include <xsd/cxx/tree/serialization/float.hxx>
98 #include <xsd/cxx/tree/serialization/double.hxx>
99 #include <xsd/cxx/tree/serialization/decimal.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/exceptions.hxx>
271 #include <xsd/cxx/tree/elements.hxx>
272 #include <xsd/cxx/tree/containers.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;
292 name (
const name_type& x);
295 name (::std::unique_ptr< name_type > p);
301 Tag_t (
const name_type&);
303 Tag_t (const ::xercesc::DOMElement& e,
304 ::xml_schema::flags f = 0,
305 ::xml_schema::container* c = 0);
308 ::xml_schema::flags f = 0,
309 ::xml_schema::container* c = 0);
312 _clone (::xml_schema::flags f = 0,
313 ::xml_schema::container* c = 0)
const;
316 operator= (
const Tag_t& x);
325 parse (::xsd::cxx::xml::dom::parser< char >&,
326 ::xml_schema::flags);
329 ::xsd::cxx::tree::one< name_type > name_;
337 typedef ::xml_schema::string type_type;
338 typedef ::xsd::cxx::tree::traits< type_type, char > type_traits;
347 type (
const type_type& x);
350 type (::std::unique_ptr< type_type > p);
354 typedef ::xml_schema::string filename_type;
355 typedef ::xsd::cxx::tree::traits< filename_type, char > filename_traits;
364 filename (
const filename_type& x);
367 filename (::std::unique_ptr< filename_type > p);
374 const filename_type&);
378 const filename_type&);
381 ::xml_schema::flags f = 0,
382 ::xml_schema::container* c = 0);
385 ::xml_schema::flags f = 0,
386 ::xml_schema::container* c = 0);
389 _clone (::xml_schema::flags f = 0,
390 ::xml_schema::container* c = 0)
const;
402 parse (::xsd::cxx::xml::dom::parser< char >&,
403 ::xml_schema::flags);
406 ::xsd::cxx::tree::one< type_type > type_;
407 ::xsd::cxx::tree::one< filename_type > filename_;
415 typedef ::xml_schema::string name_type;
416 typedef ::xsd::cxx::tree::traits< name_type, char > name_traits;
425 name (
const name_type& x);
428 name (::std::unique_ptr< name_type > p);
442 Field_t (const ::xml_schema::string&,
445 Field_t (const ::xercesc::DOMElement& e,
446 ::xml_schema::flags f = 0,
447 ::xml_schema::container* c = 0);
450 ::xml_schema::flags f = 0,
451 ::xml_schema::container* c = 0);
454 _clone (::xml_schema::flags f = 0,
455 ::xml_schema::container* c = 0)
const;
467 parse (::xsd::cxx::xml::dom::parser< char >&,
468 ::xml_schema::flags);
471 ::xsd::cxx::tree::one< name_type > name_;
480 typedef ::xsd::cxx::tree::sequence< field_type > field_sequence;
481 typedef field_sequence::iterator field_iterator;
482 typedef field_sequence::const_iterator field_const_iterator;
483 typedef ::xsd::cxx::tree::traits< field_type, char > field_traits;
485 const field_sequence&
492 field (
const field_sequence& s);
496 typedef ::xml_schema::string name_type;
497 typedef ::xsd::cxx::tree::traits< name_type, char > name_traits;
506 name (
const name_type& x);
509 name (::std::unique_ptr< name_type > p);
515 Form_t (
const name_type&);
517 Form_t (const ::xercesc::DOMElement& e,
518 ::xml_schema::flags f = 0,
519 ::xml_schema::container* c = 0);
522 ::xml_schema::flags f = 0,
523 ::xml_schema::container* c = 0);
526 _clone (::xml_schema::flags f = 0,
527 ::xml_schema::container* c = 0)
const;
530 operator= (
const Form_t& x);
539 parse (::xsd::cxx::xml::dom::parser< char >&,
540 ::xml_schema::flags);
543 field_sequence field_;
544 ::xsd::cxx::tree::one< name_type > name_;
553 typedef ::xsd::cxx::tree::sequence< tag_type > tag_sequence;
554 typedef tag_sequence::iterator tag_iterator;
555 typedef tag_sequence::const_iterator tag_const_iterator;
556 typedef ::xsd::cxx::tree::traits< tag_type, char > tag_traits;
565 tag (
const tag_sequence& s);
570 typedef ::xsd::cxx::tree::sequence< attachment_type > attachment_sequence;
571 typedef attachment_sequence::iterator attachment_iterator;
572 typedef attachment_sequence::const_iterator attachment_const_iterator;
573 typedef ::xsd::cxx::tree::traits< attachment_type, char > attachment_traits;
575 const attachment_sequence&
582 attachment (
const attachment_sequence& s);
587 typedef ::xsd::cxx::tree::optional< form_type > form_optional;
588 typedef ::xsd::cxx::tree::traits< form_type, char > form_traits;
600 form (
const form_optional& x);
603 form (::std::unique_ptr< form_type > p);
607 typedef ::xml_schema::string author_type;
608 typedef ::xsd::cxx::tree::traits< author_type, char > author_traits;
617 author (
const author_type& x);
620 author (::std::unique_ptr< author_type > p);
624 typedef ::xml_schema::string category_type;
625 typedef ::xsd::cxx::tree::traits< category_type, char > category_traits;
634 category (
const category_type& x);
637 category (::std::unique_ptr< category_type > p);
644 const category_type&);
647 ::xml_schema::flags f = 0,
648 ::xml_schema::container* c = 0);
651 ::xml_schema::flags f = 0,
652 ::xml_schema::container* c = 0);
655 _clone (::xml_schema::flags f = 0,
656 ::xml_schema::container* c = 0)
const;
668 parse (::xsd::cxx::xml::dom::parser< char >&,
669 ::xml_schema::flags);
673 attachment_sequence attachment_;
675 ::xsd::cxx::tree::one< author_type > author_;
676 ::xsd::cxx::tree::one< category_type > category_;
682 operator<< (::std::ostream&,
const Tag_t&);
688 operator<< (::std::ostream&,
const Field_t&);
691 operator<< (::std::ostream&,
const Form_t&);
694 operator<< (::std::ostream&,
const ECLEntry_t&);
698 #include <xercesc/sax/InputSource.hpp>
699 #include <xercesc/dom/DOMDocument.hpp>
700 #include <xercesc/dom/DOMErrorHandler.hpp>
705 ::std::unique_ptr< ::ECLEntry_t >
706 entry (const ::std::string& uri,
707 ::xml_schema::flags f = 0,
708 const ::xml_schema::properties& p = ::xml_schema::properties ());
710 ::std::unique_ptr< ::ECLEntry_t >
711 entry (const ::std::string& uri,
712 ::xml_schema::error_handler& eh,
713 ::xml_schema::flags f = 0,
714 const ::xml_schema::properties& p = ::xml_schema::properties ());
716 ::std::unique_ptr< ::ECLEntry_t >
717 entry (const ::std::string& uri,
718 ::xercesc::DOMErrorHandler& eh,
719 ::xml_schema::flags f = 0,
720 const ::xml_schema::properties& p = ::xml_schema::properties ());
725 ::std::unique_ptr< ::ECLEntry_t >
726 entry (::std::istream& is,
727 ::xml_schema::flags f = 0,
728 const ::xml_schema::properties& p = ::xml_schema::properties ());
730 ::std::unique_ptr< ::ECLEntry_t >
731 entry (::std::istream& is,
732 ::xml_schema::error_handler& eh,
733 ::xml_schema::flags f = 0,
734 const ::xml_schema::properties& p = ::xml_schema::properties ());
736 ::std::unique_ptr< ::ECLEntry_t >
737 entry (::std::istream& is,
738 ::xercesc::DOMErrorHandler& eh,
739 ::xml_schema::flags f = 0,
740 const ::xml_schema::properties& p = ::xml_schema::properties ());
742 ::std::unique_ptr< ::ECLEntry_t >
743 entry (::std::istream& is,
744 const ::std::string&
id,
745 ::xml_schema::flags f = 0,
746 const ::xml_schema::properties& p = ::xml_schema::properties ());
748 ::std::unique_ptr< ::ECLEntry_t >
749 entry (::std::istream& is,
750 const ::std::string&
id,
751 ::xml_schema::error_handler& eh,
752 ::xml_schema::flags f = 0,
753 const ::xml_schema::properties& p = ::xml_schema::properties ());
755 ::std::unique_ptr< ::ECLEntry_t >
756 entry (::std::istream& is,
757 const ::std::string&
id,
758 ::xercesc::DOMErrorHandler& eh,
759 ::xml_schema::flags f = 0,
760 const ::xml_schema::properties& p = ::xml_schema::properties ());
765 ::std::unique_ptr< ::ECLEntry_t >
766 entry (::xercesc::InputSource& is,
767 ::xml_schema::flags f = 0,
768 const ::xml_schema::properties& p = ::xml_schema::properties ());
770 ::std::unique_ptr< ::ECLEntry_t >
771 entry (::xercesc::InputSource& is,
772 ::xml_schema::error_handler& eh,
773 ::xml_schema::flags f = 0,
774 const ::xml_schema::properties& p = ::xml_schema::properties ());
776 ::std::unique_ptr< ::ECLEntry_t >
777 entry (::xercesc::InputSource& is,
778 ::xercesc::DOMErrorHandler& eh,
779 ::xml_schema::flags f = 0,
780 const ::xml_schema::properties& p = ::xml_schema::properties ());
785 ::std::unique_ptr< ::ECLEntry_t >
786 entry (const ::xercesc::DOMDocument& d,
787 ::xml_schema::flags f = 0,
788 const ::xml_schema::properties& p = ::xml_schema::properties ());
790 ::std::unique_ptr< ::ECLEntry_t >
791 entry (::xml_schema::dom::unique_ptr< ::xercesc::DOMDocument > d,
792 ::xml_schema::flags f = 0,
793 const ::xml_schema::properties& p = ::xml_schema::properties ());
797 #include <xercesc/dom/DOMDocument.hpp>
798 #include <xercesc/dom/DOMErrorHandler.hpp>
799 #include <xercesc/framework/XMLFormatter.hpp>
801 #include <xsd/cxx/xml/dom/auto-ptr.hxx>
807 entry (::std::ostream& os,
808 const ::ECLEntry_t& x,
809 const ::xml_schema::namespace_infomap& m = ::xml_schema::namespace_infomap (),
810 const ::std::string& e =
"UTF-8",
811 ::xml_schema::flags f = 0);
814 entry (::std::ostream& os,
815 const ::ECLEntry_t& x,
816 ::xml_schema::error_handler& eh,
817 const ::xml_schema::namespace_infomap& m = ::xml_schema::namespace_infomap (),
818 const ::std::string& e =
"UTF-8",
819 ::xml_schema::flags f = 0);
822 entry (::std::ostream& os,
823 const ::ECLEntry_t& x,
824 ::xercesc::DOMErrorHandler& eh,
825 const ::xml_schema::namespace_infomap& m = ::xml_schema::namespace_infomap (),
826 const ::std::string& e =
"UTF-8",
827 ::xml_schema::flags f = 0);
833 entry (::xercesc::XMLFormatTarget& ft,
834 const ::ECLEntry_t& x,
835 const ::xml_schema::namespace_infomap& m = ::xml_schema::namespace_infomap (),
836 const ::std::string& e =
"UTF-8",
837 ::xml_schema::flags f = 0);
840 entry (::xercesc::XMLFormatTarget& ft,
841 const ::ECLEntry_t& x,
842 ::xml_schema::error_handler& eh,
843 const ::xml_schema::namespace_infomap& m = ::xml_schema::namespace_infomap (),
844 const ::std::string& e =
"UTF-8",
845 ::xml_schema::flags f = 0);
848 entry (::xercesc::XMLFormatTarget& ft,
849 const ::ECLEntry_t& x,
850 ::xercesc::DOMErrorHandler& eh,
851 const ::xml_schema::namespace_infomap& m = ::xml_schema::namespace_infomap (),
852 const ::std::string& e =
"UTF-8",
853 ::xml_schema::flags f = 0);
859 entry (::xercesc::DOMDocument& d,
860 const ::ECLEntry_t& x,
861 ::xml_schema::flags f = 0);
866 ::xml_schema::dom::unique_ptr< ::xercesc::DOMDocument >
867 entry (const ::ECLEntry_t& x,
868 const ::xml_schema::namespace_infomap& m = ::xml_schema::namespace_infomap (),
869 ::xml_schema::flags f = 0);
872 operator<< (::xercesc::DOMElement&,
const Tag_t&);
875 operator<< (::xercesc::DOMElement&,
const Attachment_t&);
878 operator<< (::xercesc::DOMElement&,
const Field_t&);
881 operator<< (::xercesc::DOMElement&,
const Form_t&);
884 operator<< (::xercesc::DOMElement&,
const ECLEntry_t&);
886 #include <xsd/cxx/post.hxx>