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);
641 typedef ::xml_schema::string subject_type;
642 typedef ::xsd::cxx::tree::optional< subject_type > subject_optional;
643 typedef ::xsd::cxx::tree::traits< subject_type, char > subject_traits;
645 const subject_optional&
652 subject (
const subject_type& x);
655 subject (
const subject_optional& x);
658 subject (::std::unique_ptr< subject_type > p);
665 const category_type&);
668 ::xml_schema::flags f = 0,
669 ::xml_schema::container* c = 0);
672 ::xml_schema::flags f = 0,
673 ::xml_schema::container* c = 0);
676 _clone (::xml_schema::flags f = 0,
677 ::xml_schema::container* c = 0)
const;
689 parse (::xsd::cxx::xml::dom::parser< char >&,
690 ::xml_schema::flags);
694 attachment_sequence attachment_;
696 ::xsd::cxx::tree::one< author_type > author_;
697 ::xsd::cxx::tree::one< category_type > category_;
698 subject_optional subject_;
704 operator<< (::std::ostream&,
const Tag_t&);
710 operator<< (::std::ostream&,
const Field_t&);
713 operator<< (::std::ostream&,
const Form_t&);
716 operator<< (::std::ostream&,
const ECLEntry_t&);
720 #include <xercesc/sax/InputSource.hpp>
721 #include <xercesc/dom/DOMDocument.hpp>
722 #include <xercesc/dom/DOMErrorHandler.hpp>
727 ::std::unique_ptr< ::ECLEntry_t >
728 entry (const ::std::string& uri,
729 ::xml_schema::flags f = 0,
730 const ::xml_schema::properties& p = ::xml_schema::properties ());
732 ::std::unique_ptr< ::ECLEntry_t >
733 entry (const ::std::string& uri,
734 ::xml_schema::error_handler& eh,
735 ::xml_schema::flags f = 0,
736 const ::xml_schema::properties& p = ::xml_schema::properties ());
738 ::std::unique_ptr< ::ECLEntry_t >
739 entry (const ::std::string& uri,
740 ::xercesc::DOMErrorHandler& eh,
741 ::xml_schema::flags f = 0,
742 const ::xml_schema::properties& p = ::xml_schema::properties ());
747 ::std::unique_ptr< ::ECLEntry_t >
748 entry (::std::istream& is,
749 ::xml_schema::flags f = 0,
750 const ::xml_schema::properties& p = ::xml_schema::properties ());
752 ::std::unique_ptr< ::ECLEntry_t >
753 entry (::std::istream& is,
754 ::xml_schema::error_handler& eh,
755 ::xml_schema::flags f = 0,
756 const ::xml_schema::properties& p = ::xml_schema::properties ());
758 ::std::unique_ptr< ::ECLEntry_t >
759 entry (::std::istream& is,
760 ::xercesc::DOMErrorHandler& eh,
761 ::xml_schema::flags f = 0,
762 const ::xml_schema::properties& p = ::xml_schema::properties ());
764 ::std::unique_ptr< ::ECLEntry_t >
765 entry (::std::istream& is,
766 const ::std::string&
id,
767 ::xml_schema::flags f = 0,
768 const ::xml_schema::properties& p = ::xml_schema::properties ());
770 ::std::unique_ptr< ::ECLEntry_t >
771 entry (::std::istream& is,
772 const ::std::string&
id,
773 ::xml_schema::error_handler& eh,
774 ::xml_schema::flags f = 0,
775 const ::xml_schema::properties& p = ::xml_schema::properties ());
777 ::std::unique_ptr< ::ECLEntry_t >
778 entry (::std::istream& is,
779 const ::std::string&
id,
780 ::xercesc::DOMErrorHandler& eh,
781 ::xml_schema::flags f = 0,
782 const ::xml_schema::properties& p = ::xml_schema::properties ());
787 ::std::unique_ptr< ::ECLEntry_t >
788 entry (::xercesc::InputSource& is,
789 ::xml_schema::flags f = 0,
790 const ::xml_schema::properties& p = ::xml_schema::properties ());
792 ::std::unique_ptr< ::ECLEntry_t >
793 entry (::xercesc::InputSource& is,
794 ::xml_schema::error_handler& eh,
795 ::xml_schema::flags f = 0,
796 const ::xml_schema::properties& p = ::xml_schema::properties ());
798 ::std::unique_ptr< ::ECLEntry_t >
799 entry (::xercesc::InputSource& is,
800 ::xercesc::DOMErrorHandler& eh,
801 ::xml_schema::flags f = 0,
802 const ::xml_schema::properties& p = ::xml_schema::properties ());
807 ::std::unique_ptr< ::ECLEntry_t >
808 entry (const ::xercesc::DOMDocument& d,
809 ::xml_schema::flags f = 0,
810 const ::xml_schema::properties& p = ::xml_schema::properties ());
812 ::std::unique_ptr< ::ECLEntry_t >
813 entry (::xml_schema::dom::unique_ptr< ::xercesc::DOMDocument > d,
814 ::xml_schema::flags f = 0,
815 const ::xml_schema::properties& p = ::xml_schema::properties ());
819 #include <xercesc/dom/DOMDocument.hpp>
820 #include <xercesc/dom/DOMErrorHandler.hpp>
821 #include <xercesc/framework/XMLFormatter.hpp>
823 #include <xsd/cxx/xml/dom/auto-ptr.hxx>
829 entry (::std::ostream& os,
830 const ::ECLEntry_t& x,
831 const ::xml_schema::namespace_infomap& m = ::xml_schema::namespace_infomap (),
832 const ::std::string& e =
"UTF-8",
833 ::xml_schema::flags f = 0);
836 entry (::std::ostream& os,
837 const ::ECLEntry_t& x,
838 ::xml_schema::error_handler& eh,
839 const ::xml_schema::namespace_infomap& m = ::xml_schema::namespace_infomap (),
840 const ::std::string& e =
"UTF-8",
841 ::xml_schema::flags f = 0);
844 entry (::std::ostream& os,
845 const ::ECLEntry_t& x,
846 ::xercesc::DOMErrorHandler& eh,
847 const ::xml_schema::namespace_infomap& m = ::xml_schema::namespace_infomap (),
848 const ::std::string& e =
"UTF-8",
849 ::xml_schema::flags f = 0);
855 entry (::xercesc::XMLFormatTarget& ft,
856 const ::ECLEntry_t& x,
857 const ::xml_schema::namespace_infomap& m = ::xml_schema::namespace_infomap (),
858 const ::std::string& e =
"UTF-8",
859 ::xml_schema::flags f = 0);
862 entry (::xercesc::XMLFormatTarget& ft,
863 const ::ECLEntry_t& x,
864 ::xml_schema::error_handler& eh,
865 const ::xml_schema::namespace_infomap& m = ::xml_schema::namespace_infomap (),
866 const ::std::string& e =
"UTF-8",
867 ::xml_schema::flags f = 0);
870 entry (::xercesc::XMLFormatTarget& ft,
871 const ::ECLEntry_t& x,
872 ::xercesc::DOMErrorHandler& eh,
873 const ::xml_schema::namespace_infomap& m = ::xml_schema::namespace_infomap (),
874 const ::std::string& e =
"UTF-8",
875 ::xml_schema::flags f = 0);
881 entry (::xercesc::DOMDocument& d,
882 const ::ECLEntry_t& x,
883 ::xml_schema::flags f = 0);
888 ::xml_schema::dom::unique_ptr< ::xercesc::DOMDocument >
889 entry (const ::ECLEntry_t& x,
890 const ::xml_schema::namespace_infomap& m = ::xml_schema::namespace_infomap (),
891 ::xml_schema::flags f = 0);
894 operator<< (::xercesc::DOMElement&,
const Tag_t&);
897 operator<< (::xercesc::DOMElement&,
const Attachment_t&);
900 operator<< (::xercesc::DOMElement&,
const Field_t&);
903 operator<< (::xercesc::DOMElement&,
const Form_t&);
906 operator<< (::xercesc::DOMElement&,
const ECLEntry_t&);
908 #include <xsd/cxx/post.hxx>