39 #include <xsd/cxx/pre.hxx>
41 #include "otsdaq-utilities/ECLWriter/ECL.hxx"
46 const Tag_t::name_type& Tag_t::
49 return this->name_.get ();
52 Tag_t::name_type& Tag_t::
55 return this->name_.get ();
59 name (
const name_type& x)
65 name (::std::unique_ptr< name_type > x)
67 this->name_.set (std::move (x));
74 const Attachment_t::type_type& Attachment_t::
77 return this->type_.get ();
80 Attachment_t::type_type& Attachment_t::
83 return this->type_.get ();
87 type (
const type_type& x)
93 type (::std::unique_ptr< type_type > x)
95 this->type_.set (std::move (x));
98 const Attachment_t::filename_type& Attachment_t::
101 return this->filename_.get ();
104 Attachment_t::filename_type& Attachment_t::
107 return this->filename_.get ();
111 filename (
const filename_type& x)
113 this->filename_.set (x);
117 filename (::std::unique_ptr< filename_type > x)
119 this->filename_.set (std::move (x));
126 const Field_t::name_type& Field_t::
129 return this->name_.get ();
132 Field_t::name_type& Field_t::
135 return this->name_.get ();
139 name (
const name_type& x)
145 name (::std::unique_ptr< name_type > x)
147 this->name_.set (std::move (x));
154 const Form_t::field_sequence& Form_t::
160 Form_t::field_sequence& Form_t::
167 field (
const field_sequence& s)
172 const Form_t::name_type& Form_t::
175 return this->name_.get ();
178 Form_t::name_type& Form_t::
181 return this->name_.get ();
185 name (
const name_type& x)
191 name (::std::unique_ptr< name_type > x)
193 this->name_.set (std::move (x));
200 const ECLEntry_t::tag_sequence& ECLEntry_t::
206 ECLEntry_t::tag_sequence& ECLEntry_t::
213 tag (
const tag_sequence& s)
218 const ECLEntry_t::attachment_sequence& ECLEntry_t::
221 return this->attachment_;
224 ECLEntry_t::attachment_sequence& ECLEntry_t::
227 return this->attachment_;
231 attachment (
const attachment_sequence& s)
233 this->attachment_ = s;
236 const ECLEntry_t::form_optional& ECLEntry_t::
242 ECLEntry_t::form_optional& ECLEntry_t::
249 form (
const form_type& x)
255 form (
const form_optional& x)
261 form (::std::unique_ptr< form_type > x)
263 this->form_.set (std::move (x));
266 const ECLEntry_t::author_type& ECLEntry_t::
269 return this->author_.get ();
272 ECLEntry_t::author_type& ECLEntry_t::
275 return this->author_.get ();
279 author (
const author_type& x)
281 this->author_.set (x);
285 author (::std::unique_ptr< author_type > x)
287 this->author_.set (std::move (x));
290 const ECLEntry_t::category_type& ECLEntry_t::
293 return this->category_.get ();
296 ECLEntry_t::category_type& ECLEntry_t::
299 return this->category_.get ();
303 category (
const category_type& x)
305 this->category_.set (x);
309 category (::std::unique_ptr< category_type > x)
311 this->category_.set (std::move (x));
314 const ECLEntry_t::subject_optional& ECLEntry_t::
317 return this->subject_;
320 ECLEntry_t::subject_optional& ECLEntry_t::
323 return this->subject_;
327 subject (
const subject_type& x)
329 this->subject_.set (x);
333 subject (
const subject_optional& x)
339 subject (::std::unique_ptr< subject_type > x)
341 this->subject_.set (std::move (x));
345 #include <xsd/cxx/xml/dom/parsing-source.hxx>
352 : ::xml_schema::type (),
358 Tag_t (
const name_type& name)
359 : ::xml_schema::type (),
365 Tag_t (
const Tag_t& x,
366 ::xml_schema::flags f,
367 ::xml_schema::container* c)
368 : ::xml_schema::type (x, f, c),
369 name_ (x.name_, f, this)
374 Tag_t (const ::xercesc::DOMElement& e,
375 ::xml_schema::flags f,
376 ::xml_schema::container* c)
377 : ::xml_schema::type (e, f | ::xml_schema::flags::base, c),
380 if ((f & ::xml_schema::flags::base) == 0)
382 ::xsd::cxx::xml::dom::parser< char > p (e,
false,
false,
true);
388 parse (::xsd::cxx::xml::dom::parser< char >& p,
389 ::xml_schema::flags f)
391 while (p.more_attributes ())
393 const ::xercesc::DOMAttr& i (p.next_attribute ());
394 const ::xsd::cxx::xml::qualified_name< char > n (
395 ::xsd::cxx::xml::dom::name< char > (i));
397 if (n.name () ==
"name" && n.namespace_ ().empty ())
399 this->name_.set (name_traits::create (i, f,
this));
404 if (!name_.present ())
406 throw ::xsd::cxx::tree::expected_attribute< char > (
413 _clone (::xml_schema::flags f,
414 ::xml_schema::container* c)
const
416 return new class Tag_t (*
this, f, c);
420 operator= (
const Tag_t& x)
424 static_cast< ::xml_schema::type&
> (*this) = x;
425 this->name_ = x.name_;
441 : ::xml_schema::base64_binary (),
448 Attachment_t (
const type_type& type,
449 const filename_type& filename)
450 : ::xml_schema::base64_binary (),
452 filename_ (filename, this)
457 Attachment_t (const ::xml_schema::base64_binary& _xsd_base64_binary_base,
458 const type_type& type,
459 const filename_type& filename)
460 : ::xml_schema::base64_binary (_xsd_base64_binary_base),
462 filename_ (filename, this)
468 ::xml_schema::flags f,
469 ::xml_schema::container* c)
470 : ::xml_schema::base64_binary (x, f, c),
471 type_ (x.type_, f, this),
472 filename_ (x.filename_, f, this)
477 Attachment_t (const ::xercesc::DOMElement& e,
478 ::xml_schema::flags f,
479 ::xml_schema::container* c)
480 : ::xml_schema::base64_binary (e, f | ::xml_schema::flags::base, c),
484 if ((f & ::xml_schema::flags::base) == 0)
486 ::xsd::cxx::xml::dom::parser< char > p (e,
false,
false,
true);
492 parse (::xsd::cxx::xml::dom::parser< char >& p,
493 ::xml_schema::flags f)
495 while (p.more_attributes ())
497 const ::xercesc::DOMAttr& i (p.next_attribute ());
498 const ::xsd::cxx::xml::qualified_name< char > n (
499 ::xsd::cxx::xml::dom::name< char > (i));
501 if (n.name () ==
"type" && n.namespace_ ().empty ())
503 this->type_.set (type_traits::create (i, f,
this));
507 if (n.name () ==
"filename" && n.namespace_ ().empty ())
509 this->filename_.set (filename_traits::create (i, f,
this));
514 if (!type_.present ())
516 throw ::xsd::cxx::tree::expected_attribute< char > (
521 if (!filename_.present ())
523 throw ::xsd::cxx::tree::expected_attribute< char > (
530 _clone (::xml_schema::flags f,
531 ::xml_schema::container* c)
const
541 static_cast< ::xml_schema::base64_binary&
> (*this) = x;
542 this->type_ = x.type_;
543 this->filename_ = x.filename_;
559 : ::xml_schema::string (),
565 Field_t (
const name_type& name)
566 : ::xml_schema::string (),
572 Field_t (
const char* _xsd_string_base,
573 const name_type& name)
574 : ::xml_schema::string (_xsd_string_base),
580 Field_t (const ::std::string& _xsd_string_base,
581 const name_type& name)
582 : ::xml_schema::string (_xsd_string_base),
588 Field_t (const ::xml_schema::string& _xsd_string_base,
589 const name_type& name)
590 : ::xml_schema::string (_xsd_string_base),
597 ::xml_schema::flags f,
598 ::xml_schema::container* c)
599 : ::xml_schema::string (x, f, c),
600 name_ (x.name_, f, this)
605 Field_t (const ::xercesc::DOMElement& e,
606 ::xml_schema::flags f,
607 ::xml_schema::container* c)
608 : ::xml_schema::string (e, f | ::xml_schema::flags::base, c),
611 if ((f & ::xml_schema::flags::base) == 0)
613 ::xsd::cxx::xml::dom::parser< char > p (e,
false,
false,
true);
619 parse (::xsd::cxx::xml::dom::parser< char >& p,
620 ::xml_schema::flags f)
622 while (p.more_attributes ())
624 const ::xercesc::DOMAttr& i (p.next_attribute ());
625 const ::xsd::cxx::xml::qualified_name< char > n (
626 ::xsd::cxx::xml::dom::name< char > (i));
628 if (n.name () ==
"name" && n.namespace_ ().empty ())
630 this->name_.set (name_traits::create (i, f,
this));
635 if (!name_.present ())
637 throw ::xsd::cxx::tree::expected_attribute< char > (
644 _clone (::xml_schema::flags f,
645 ::xml_schema::container* c)
const
647 return new class Field_t (*
this, f, c);
655 static_cast< ::xml_schema::string&
> (*this) = x;
656 this->name_ = x.name_;
672 : ::xml_schema::type (),
679 Form_t (
const name_type& name)
680 : ::xml_schema::type (),
688 ::xml_schema::flags f,
689 ::xml_schema::container* c)
690 : ::xml_schema::type (x, f, c),
691 field_ (x.field_, f, this),
692 name_ (x.name_, f, this)
697 Form_t (const ::xercesc::DOMElement& e,
698 ::xml_schema::flags f,
699 ::xml_schema::container* c)
700 : ::xml_schema::type (e, f | ::xml_schema::flags::base, c),
704 if ((f & ::xml_schema::flags::base) == 0)
706 ::xsd::cxx::xml::dom::parser< char > p (e,
true,
false,
true);
712 parse (::xsd::cxx::xml::dom::parser< char >& p,
713 ::xml_schema::flags f)
715 for (; p.more_content (); p.next_content (
false))
717 const ::xercesc::DOMElement& i (p.cur_element ());
718 const ::xsd::cxx::xml::qualified_name< char > n (
719 ::xsd::cxx::xml::dom::name< char > (i));
723 if (n.name () ==
"field" && n.namespace_ ().empty ())
725 ::std::unique_ptr< field_type > r (
726 field_traits::create (i, f,
this));
728 this->field_.push_back (::std::move (r));
735 while (p.more_attributes ())
737 const ::xercesc::DOMAttr& i (p.next_attribute ());
738 const ::xsd::cxx::xml::qualified_name< char > n (
739 ::xsd::cxx::xml::dom::name< char > (i));
741 if (n.name () ==
"name" && n.namespace_ ().empty ())
743 this->name_.set (name_traits::create (i, f,
this));
748 if (!name_.present ())
750 throw ::xsd::cxx::tree::expected_attribute< char > (
757 _clone (::xml_schema::flags f,
758 ::xml_schema::container* c)
const
760 return new class Form_t (*
this, f, c);
764 operator= (
const Form_t& x)
768 static_cast< ::xml_schema::type&
> (*this) = x;
769 this->field_ = x.field_;
770 this->name_ = x.name_;
786 : ::xml_schema::type (),
797 ECLEntry_t (
const author_type& author,
798 const category_type& category)
799 : ::xml_schema::type (),
803 author_ (author, this),
804 category_ (category, this),
811 ::xml_schema::flags f,
812 ::xml_schema::container* c)
813 : ::xml_schema::type (x, f, c),
814 tag_ (x.tag_, f, this),
815 attachment_ (x.attachment_, f, this),
816 form_ (x.form_, f, this),
817 author_ (x.author_, f, this),
818 category_ (x.category_, f, this),
819 subject_ (x.subject_, f, this)
824 ECLEntry_t (const ::xercesc::DOMElement& e,
825 ::xml_schema::flags f,
826 ::xml_schema::container* c)
827 : ::xml_schema::type (e, f | ::xml_schema::flags::base, c),
835 if ((f & ::xml_schema::flags::base) == 0)
837 ::xsd::cxx::xml::dom::parser< char > p (e,
true,
false,
true);
843 parse (::xsd::cxx::xml::dom::parser< char >& p,
844 ::xml_schema::flags f)
846 for (; p.more_content (); p.next_content (
false))
848 const ::xercesc::DOMElement& i (p.cur_element ());
849 const ::xsd::cxx::xml::qualified_name< char > n (
850 ::xsd::cxx::xml::dom::name< char > (i));
854 if (n.name () ==
"tag" && n.namespace_ ().empty ())
856 ::std::unique_ptr< tag_type > r (
857 tag_traits::create (i, f,
this));
859 this->tag_.push_back (::std::move (r));
865 if (n.name () ==
"attachment" && n.namespace_ ().empty ())
867 ::std::unique_ptr< attachment_type > r (
868 attachment_traits::create (i, f,
this));
870 this->attachment_.push_back (::std::move (r));
876 if (n.name () ==
"form" && n.namespace_ ().empty ())
878 ::std::unique_ptr< form_type > r (
879 form_traits::create (i, f,
this));
883 this->form_.set (::std::move (r));
891 while (p.more_attributes ())
893 const ::xercesc::DOMAttr& i (p.next_attribute ());
894 const ::xsd::cxx::xml::qualified_name< char > n (
895 ::xsd::cxx::xml::dom::name< char > (i));
897 if (n.name () ==
"author" && n.namespace_ ().empty ())
899 this->author_.set (author_traits::create (i, f,
this));
903 if (n.name () ==
"category" && n.namespace_ ().empty ())
905 this->category_.set (category_traits::create (i, f,
this));
909 if (n.name () ==
"subject" && n.namespace_ ().empty ())
911 this->subject_.set (subject_traits::create (i, f,
this));
916 if (!author_.present ())
918 throw ::xsd::cxx::tree::expected_attribute< char > (
923 if (!category_.present ())
925 throw ::xsd::cxx::tree::expected_attribute< char > (
932 _clone (::xml_schema::flags f,
933 ::xml_schema::container* c)
const
943 static_cast< ::xml_schema::type&
> (*this) = x;
945 this->attachment_ = x.attachment_;
946 this->form_ = x.form_;
947 this->author_ = x.author_;
948 this->category_ = x.category_;
949 this->subject_ = x.subject_;
963 operator<< (::std::ostream& o,
const Tag_t& i)
965 o << ::std::endl <<
"name: " << i.name ();
972 o << static_cast< const ::xml_schema::base64_binary& > (i);
974 o << ::std::endl <<
"type: " << i.type ();
975 o << ::std::endl <<
"filename: " << i.filename ();
980 operator<< (::std::ostream& o,
const Field_t& i)
982 o << static_cast< const ::xml_schema::string& > (i);
984 o << ::std::endl <<
"name: " << i.name ();
989 operator<< (::std::ostream& o,
const Form_t& i)
991 for (Form_t::field_const_iterator
992 b (i.field ().begin ()), e (i.field ().end ());
995 o << ::std::endl <<
"field: " << *b;
998 o << ::std::endl <<
"name: " << i.name ();
1003 operator<< (::std::ostream& o,
const ECLEntry_t& i)
1005 for (ECLEntry_t::tag_const_iterator
1006 b (i.tag ().begin ()), e (i.tag ().end ());
1009 o << ::std::endl <<
"tag: " << *b;
1012 for (ECLEntry_t::attachment_const_iterator
1013 b (i.attachment ().begin ()), e (i.attachment ().end ());
1016 o << ::std::endl <<
"attachment: " << *b;
1021 o << ::std::endl <<
"form: " << *i.form ();
1024 o << ::std::endl <<
"author: " << i.author ();
1025 o << ::std::endl <<
"category: " << i.category ();
1028 o << ::std::endl <<
"subject: " << *i.subject ();
1035 #include <xsd/cxx/xml/sax/std-input-source.hxx>
1036 #include <xsd/cxx/tree/error-handler.hxx>
1038 ::std::unique_ptr< ::ECLEntry_t >
1039 entry (const ::std::string& u,
1040 ::xml_schema::flags f,
1041 const ::xml_schema::properties& p)
1043 ::xsd::cxx::xml::auto_initializer i (
1044 (f & ::xml_schema::flags::dont_initialize) == 0,
1045 (f & ::xml_schema::flags::keep_dom) == 0);
1047 ::xsd::cxx::tree::error_handler< char > h;
1049 ::xml_schema::dom::unique_ptr< ::xercesc::DOMDocument > d (
1050 ::xsd::cxx::xml::dom::parse< char > (
1053 h.throw_if_failed< ::xsd::cxx::tree::parsing< char > > ();
1055 return ::std::unique_ptr< ::ECLEntry_t > (
1057 std::move (d), f | ::xml_schema::flags::own_dom, p));
1060 ::std::unique_ptr< ::ECLEntry_t >
1061 entry (const ::std::string& u,
1062 ::xml_schema::error_handler& h,
1063 ::xml_schema::flags f,
1064 const ::xml_schema::properties& p)
1066 ::xsd::cxx::xml::auto_initializer i (
1067 (f & ::xml_schema::flags::dont_initialize) == 0,
1068 (f & ::xml_schema::flags::keep_dom) == 0);
1070 ::xml_schema::dom::unique_ptr< ::xercesc::DOMDocument > d (
1071 ::xsd::cxx::xml::dom::parse< char > (
1075 throw ::xsd::cxx::tree::parsing< char > ();
1077 return ::std::unique_ptr< ::ECLEntry_t > (
1079 std::move (d), f | ::xml_schema::flags::own_dom, p));
1082 ::std::unique_ptr< ::ECLEntry_t >
1083 entry (const ::std::string& u,
1084 ::xercesc::DOMErrorHandler& h,
1085 ::xml_schema::flags f,
1086 const ::xml_schema::properties& p)
1088 ::xml_schema::dom::unique_ptr< ::xercesc::DOMDocument > d (
1089 ::xsd::cxx::xml::dom::parse< char > (
1093 throw ::xsd::cxx::tree::parsing< char > ();
1095 return ::std::unique_ptr< ::ECLEntry_t > (
1097 std::move (d), f | ::xml_schema::flags::own_dom, p));
1100 ::std::unique_ptr< ::ECLEntry_t >
1101 entry (::std::istream& is,
1102 ::xml_schema::flags f,
1103 const ::xml_schema::properties& p)
1105 ::xsd::cxx::xml::auto_initializer i (
1106 (f & ::xml_schema::flags::dont_initialize) == 0,
1107 (f & ::xml_schema::flags::keep_dom) == 0);
1109 ::xsd::cxx::xml::sax::std_input_source isrc (is);
1110 return ::entry (isrc, f, p);
1113 ::std::unique_ptr< ::ECLEntry_t >
1114 entry (::std::istream& is,
1115 ::xml_schema::error_handler& h,
1116 ::xml_schema::flags f,
1117 const ::xml_schema::properties& p)
1119 ::xsd::cxx::xml::auto_initializer i (
1120 (f & ::xml_schema::flags::dont_initialize) == 0,
1121 (f & ::xml_schema::flags::keep_dom) == 0);
1123 ::xsd::cxx::xml::sax::std_input_source isrc (is);
1124 return ::entry (isrc, h, f, p);
1127 ::std::unique_ptr< ::ECLEntry_t >
1128 entry (::std::istream& is,
1129 ::xercesc::DOMErrorHandler& h,
1130 ::xml_schema::flags f,
1131 const ::xml_schema::properties& p)
1133 ::xsd::cxx::xml::sax::std_input_source isrc (is);
1134 return ::entry (isrc, h, f, p);
1137 ::std::unique_ptr< ::ECLEntry_t >
1138 entry (::std::istream& is,
1139 const ::std::string& sid,
1140 ::xml_schema::flags f,
1141 const ::xml_schema::properties& p)
1143 ::xsd::cxx::xml::auto_initializer i (
1144 (f & ::xml_schema::flags::dont_initialize) == 0,
1145 (f & ::xml_schema::flags::keep_dom) == 0);
1147 ::xsd::cxx::xml::sax::std_input_source isrc (is, sid);
1148 return ::entry (isrc, f, p);
1151 ::std::unique_ptr< ::ECLEntry_t >
1152 entry (::std::istream& is,
1153 const ::std::string& sid,
1154 ::xml_schema::error_handler& h,
1155 ::xml_schema::flags f,
1156 const ::xml_schema::properties& p)
1158 ::xsd::cxx::xml::auto_initializer i (
1159 (f & ::xml_schema::flags::dont_initialize) == 0,
1160 (f & ::xml_schema::flags::keep_dom) == 0);
1162 ::xsd::cxx::xml::sax::std_input_source isrc (is, sid);
1163 return ::entry (isrc, h, f, p);
1166 ::std::unique_ptr< ::ECLEntry_t >
1167 entry (::std::istream& is,
1168 const ::std::string& sid,
1169 ::xercesc::DOMErrorHandler& h,
1170 ::xml_schema::flags f,
1171 const ::xml_schema::properties& p)
1173 ::xsd::cxx::xml::sax::std_input_source isrc (is, sid);
1174 return ::entry (isrc, h, f, p);
1177 ::std::unique_ptr< ::ECLEntry_t >
1178 entry (::xercesc::InputSource& i,
1179 ::xml_schema::flags f,
1180 const ::xml_schema::properties& p)
1182 ::xsd::cxx::tree::error_handler< char > h;
1184 ::xml_schema::dom::unique_ptr< ::xercesc::DOMDocument > d (
1185 ::xsd::cxx::xml::dom::parse< char > (
1188 h.throw_if_failed< ::xsd::cxx::tree::parsing< char > > ();
1190 return ::std::unique_ptr< ::ECLEntry_t > (
1192 std::move (d), f | ::xml_schema::flags::own_dom, p));
1195 ::std::unique_ptr< ::ECLEntry_t >
1196 entry (::xercesc::InputSource& i,
1197 ::xml_schema::error_handler& h,
1198 ::xml_schema::flags f,
1199 const ::xml_schema::properties& p)
1201 ::xml_schema::dom::unique_ptr< ::xercesc::DOMDocument > d (
1202 ::xsd::cxx::xml::dom::parse< char > (
1206 throw ::xsd::cxx::tree::parsing< char > ();
1208 return ::std::unique_ptr< ::ECLEntry_t > (
1210 std::move (d), f | ::xml_schema::flags::own_dom, p));
1213 ::std::unique_ptr< ::ECLEntry_t >
1214 entry (::xercesc::InputSource& i,
1215 ::xercesc::DOMErrorHandler& h,
1216 ::xml_schema::flags f,
1217 const ::xml_schema::properties& p)
1219 ::xml_schema::dom::unique_ptr< ::xercesc::DOMDocument > d (
1220 ::xsd::cxx::xml::dom::parse< char > (
1224 throw ::xsd::cxx::tree::parsing< char > ();
1226 return ::std::unique_ptr< ::ECLEntry_t > (
1228 std::move (d), f | ::xml_schema::flags::own_dom, p));
1231 ::std::unique_ptr< ::ECLEntry_t >
1232 entry (const ::xercesc::DOMDocument& doc,
1233 ::xml_schema::flags f,
1234 const ::xml_schema::properties& p)
1236 if (f & ::xml_schema::flags::keep_dom)
1238 ::xml_schema::dom::unique_ptr< ::xercesc::DOMDocument > d (
1239 static_cast< ::xercesc::DOMDocument* > (doc.cloneNode (
true)));
1241 return ::std::unique_ptr< ::ECLEntry_t > (
1243 std::move (d), f | ::xml_schema::flags::own_dom, p));
1246 const ::xercesc::DOMElement& e (*doc.getDocumentElement ());
1247 const ::xsd::cxx::xml::qualified_name< char > n (
1248 ::xsd::cxx::xml::dom::name< char > (e));
1250 if (n.name () ==
"entry" &&
1251 n.namespace_ () ==
"")
1253 ::std::unique_ptr< ::ECLEntry_t > r (
1254 ::xsd::cxx::tree::traits< ::ECLEntry_t, char >::create (
1259 throw ::xsd::cxx::tree::unexpected_element < char > (
1266 ::std::unique_ptr< ::ECLEntry_t >
1267 entry (::xml_schema::dom::unique_ptr< ::xercesc::DOMDocument > d,
1268 ::xml_schema::flags f,
1269 const ::xml_schema::properties&)
1271 ::xml_schema::dom::unique_ptr< ::xercesc::DOMDocument > c (
1272 ((f & ::xml_schema::flags::keep_dom) &&
1273 !(f & ::xml_schema::flags::own_dom))
1274 ? static_cast< ::xercesc::DOMDocument* > (d->cloneNode (
true))
1277 ::xercesc::DOMDocument& doc (c.get () ? *c : *d);
1278 const ::xercesc::DOMElement& e (*doc.getDocumentElement ());
1280 const ::xsd::cxx::xml::qualified_name< char > n (
1281 ::xsd::cxx::xml::dom::name< char > (e));
1283 if (f & ::xml_schema::flags::keep_dom)
1284 doc.setUserData (::xml_schema::dom::tree_node_key,
1285 (c.get () ? &c : &d),
1288 if (n.name () ==
"entry" &&
1289 n.namespace_ () ==
"")
1291 ::std::unique_ptr< ::ECLEntry_t > r (
1292 ::xsd::cxx::tree::traits< ::ECLEntry_t, char >::create (
1297 throw ::xsd::cxx::tree::unexpected_element < char > (
1305 #include <xsd/cxx/tree/error-handler.hxx>
1306 #include <xsd/cxx/xml/dom/serialization-source.hxx>
1309 entry (::std::ostream& o,
1310 const ::ECLEntry_t& s,
1311 const ::xml_schema::namespace_infomap& m,
1312 const ::std::string& e,
1313 ::xml_schema::flags f)
1315 ::xsd::cxx::xml::auto_initializer i (
1316 (f & ::xml_schema::flags::dont_initialize) == 0);
1318 ::xml_schema::dom::unique_ptr< ::xercesc::DOMDocument > d (
1321 ::xsd::cxx::tree::error_handler< char > h;
1323 ::xsd::cxx::xml::dom::ostream_format_target t (o);
1324 if (!::xsd::cxx::xml::dom::serialize (t, *d, e, h, f))
1326 h.throw_if_failed< ::xsd::cxx::tree::serialization< char > > ();
1331 entry (::std::ostream& o,
1332 const ::ECLEntry_t& s,
1333 ::xml_schema::error_handler& h,
1334 const ::xml_schema::namespace_infomap& m,
1335 const ::std::string& e,
1336 ::xml_schema::flags f)
1338 ::xsd::cxx::xml::auto_initializer i (
1339 (f & ::xml_schema::flags::dont_initialize) == 0);
1341 ::xml_schema::dom::unique_ptr< ::xercesc::DOMDocument > d (
1343 ::xsd::cxx::xml::dom::ostream_format_target t (o);
1344 if (!::xsd::cxx::xml::dom::serialize (t, *d, e, h, f))
1346 throw ::xsd::cxx::tree::serialization< char > ();
1351 entry (::std::ostream& o,
1352 const ::ECLEntry_t& s,
1353 ::xercesc::DOMErrorHandler& h,
1354 const ::xml_schema::namespace_infomap& m,
1355 const ::std::string& e,
1356 ::xml_schema::flags f)
1358 ::xml_schema::dom::unique_ptr< ::xercesc::DOMDocument > d (
1360 ::xsd::cxx::xml::dom::ostream_format_target t (o);
1361 if (!::xsd::cxx::xml::dom::serialize (t, *d, e, h, f))
1363 throw ::xsd::cxx::tree::serialization< char > ();
1368 entry (::xercesc::XMLFormatTarget& t,
1369 const ::ECLEntry_t& s,
1370 const ::xml_schema::namespace_infomap& m,
1371 const ::std::string& e,
1372 ::xml_schema::flags f)
1374 ::xml_schema::dom::unique_ptr< ::xercesc::DOMDocument > d (
1377 ::xsd::cxx::tree::error_handler< char > h;
1379 if (!::xsd::cxx::xml::dom::serialize (t, *d, e, h, f))
1381 h.throw_if_failed< ::xsd::cxx::tree::serialization< char > > ();
1386 entry (::xercesc::XMLFormatTarget& t,
1387 const ::ECLEntry_t& s,
1388 ::xml_schema::error_handler& h,
1389 const ::xml_schema::namespace_infomap& m,
1390 const ::std::string& e,
1391 ::xml_schema::flags f)
1393 ::xml_schema::dom::unique_ptr< ::xercesc::DOMDocument > d (
1395 if (!::xsd::cxx::xml::dom::serialize (t, *d, e, h, f))
1397 throw ::xsd::cxx::tree::serialization< char > ();
1402 entry (::xercesc::XMLFormatTarget& t,
1403 const ::ECLEntry_t& s,
1404 ::xercesc::DOMErrorHandler& h,
1405 const ::xml_schema::namespace_infomap& m,
1406 const ::std::string& e,
1407 ::xml_schema::flags f)
1409 ::xml_schema::dom::unique_ptr< ::xercesc::DOMDocument > d (
1411 if (!::xsd::cxx::xml::dom::serialize (t, *d, e, h, f))
1413 throw ::xsd::cxx::tree::serialization< char > ();
1418 entry (::xercesc::DOMDocument& d,
1419 const ::ECLEntry_t& s,
1420 ::xml_schema::flags)
1422 ::xercesc::DOMElement& e (*d.getDocumentElement ());
1423 const ::xsd::cxx::xml::qualified_name< char > n (
1424 ::xsd::cxx::xml::dom::name< char > (e));
1426 if (n.name () ==
"entry" &&
1427 n.namespace_ () ==
"")
1433 throw ::xsd::cxx::tree::unexpected_element < char > (
1441 ::xml_schema::dom::unique_ptr< ::xercesc::DOMDocument >
1442 entry (const ::ECLEntry_t& s,
1443 const ::xml_schema::namespace_infomap& m,
1444 ::xml_schema::flags f)
1446 ::xml_schema::dom::unique_ptr< ::xercesc::DOMDocument > d (
1447 ::xsd::cxx::xml::dom::serialize< char > (
1457 operator<< (::xercesc::DOMElement& e,
const Tag_t& i)
1459 e << static_cast< const ::xml_schema::type& > (i);
1464 ::xercesc::DOMAttr& a (
1465 ::xsd::cxx::xml::dom::create_attribute (
1474 operator<< (::xercesc::DOMElement& e,
const Attachment_t& i)
1476 e << static_cast< const ::xml_schema::base64_binary& > (i);
1481 ::xercesc::DOMAttr& a (
1482 ::xsd::cxx::xml::dom::create_attribute (
1492 ::xercesc::DOMAttr& a (
1493 ::xsd::cxx::xml::dom::create_attribute (
1502 operator<< (::xercesc::DOMElement& e,
const Field_t& i)
1504 e << static_cast< const ::xml_schema::string& > (i);
1509 ::xercesc::DOMAttr& a (
1510 ::xsd::cxx::xml::dom::create_attribute (
1519 operator<< (::xercesc::DOMElement& e,
const Form_t& i)
1521 e << static_cast< const ::xml_schema::type& > (i);
1525 for (Form_t::field_const_iterator
1526 b (i.field ().begin ()), n (i.field ().end ());
1529 ::xercesc::DOMElement& s (
1530 ::xsd::cxx::xml::dom::create_element (
1540 ::xercesc::DOMAttr& a (
1541 ::xsd::cxx::xml::dom::create_attribute (
1550 operator<< (::xercesc::DOMElement& e,
const ECLEntry_t& i)
1552 e << static_cast< const ::xml_schema::type& > (i);
1556 for (ECLEntry_t::tag_const_iterator
1557 b (i.tag ().begin ()), n (i.tag ().end ());
1560 ::xercesc::DOMElement& s (
1561 ::xsd::cxx::xml::dom::create_element (
1570 for (ECLEntry_t::attachment_const_iterator
1571 b (i.attachment ().begin ()), n (i.attachment ().end ());
1574 ::xercesc::DOMElement& s (
1575 ::xsd::cxx::xml::dom::create_element (
1586 ::xercesc::DOMElement& s (
1587 ::xsd::cxx::xml::dom::create_element (
1597 ::xercesc::DOMAttr& a (
1598 ::xsd::cxx::xml::dom::create_attribute (
1608 ::xercesc::DOMAttr& a (
1609 ::xsd::cxx::xml::dom::create_attribute (
1620 ::xercesc::DOMAttr& a (
1621 ::xsd::cxx::xml::dom::create_attribute (
1629 #include <xsd/cxx/post.hxx>