39 #include <xsd/cxx/pre.hxx>
51 return this->element_data_;
57 return this->element_data_;
63 this->element_data_ = s;
69 return this->spaceType_;
75 return this->spaceType_;
81 this->spaceType_.set (x);
93 this->spaceType_.set (x);
103 return this->e_id_.get ();
109 return this->e_id_.get ();
121 return this->ord_.get ();
127 return this->ord_.get ();
139 return this->bd_.get ();
145 return this->bd_.get ();
157 return this->n_.get ();
163 return this->n_.get ();
175 return this->chgd_.get ();
181 return this->chgd_.get ();
191 #include <xsd/cxx/xml/dom/parsing-source.hxx>
193 #include <xsd/cxx/tree/type-factory-map.hxx>
198 const ::xsd::cxx::tree::type_factory_plate< 0, char >
199 type_factory_plate_init;
220 element_data_ (x.element_data_, f, this),
221 spaceType_ (x.spaceType_, f, this)
226 space (const ::xercesc::DOMElement& e,
230 element_data_ (f, this),
233 if ((f & ::xml_schema::flags::base) == 0)
235 ::xsd::cxx::xml::dom::parser< char > p (e,
true,
true);
241 parse (::xsd::cxx::xml::dom::parser< char >& p,
244 for (; p.more_elements (); p.next_element ())
246 const ::xercesc::DOMElement& i (p.cur_element ());
247 const ::xsd::cxx::xml::qualified_name< char > n (
248 ::xsd::cxx::xml::dom::name< char > (i));
252 if (n.name () ==
"element_data" && n.namespace_ ().empty ())
254 ::std::auto_ptr< element_data_type > r (
255 element_data_traits::create (i, f,
this));
257 this->element_data_.push_back (r);
264 while (p.more_attributes ())
266 const ::xercesc::DOMAttr& i (p.next_attribute ());
267 const ::xsd::cxx::xml::qualified_name< char > n (
268 ::xsd::cxx::xml::dom::name< char > (i));
270 if (n.name () ==
"spaceType" && n.namespace_ ().empty ())
272 ::std::auto_ptr< spaceType_type > r (
273 spaceType_traits::create (i, f,
this));
275 this->spaceType_.set (r);
285 return new class space (*
this, f, c);
316 e_id_ (x.e_id_, f, this),
317 ord_ (x.ord_, f, this),
318 bd_ (x.bd_, f, this),
320 chgd_ (x.chgd_, f, this)
335 if ((f & ::xml_schema::flags::base) == 0)
337 ::xsd::cxx::xml::dom::parser< char > p (e,
false,
true);
343 parse (::xsd::cxx::xml::dom::parser< char >& p,
346 while (p.more_attributes ())
348 const ::xercesc::DOMAttr& i (p.next_attribute ());
349 const ::xsd::cxx::xml::qualified_name< char >
n (
350 ::xsd::cxx::xml::dom::name< char > (i));
352 if (
n.name () ==
"e_id" &&
n.namespace_ ().empty ())
354 this->e_id_.set (e_id_traits::create (i, f,
this));
358 if (
n.name () ==
"ord" &&
n.namespace_ ().empty ())
360 this->ord_.set (ord_traits::create (i, f,
this));
364 if (
n.name () ==
"bd" &&
n.namespace_ ().empty ())
366 this->bd_.set (bd_traits::create (i, f,
this));
370 if (
n.name () ==
"n" &&
n.namespace_ ().empty ())
372 this->n_.set (n_traits::create (i, f,
this));
376 if (
n.name () ==
"chgd" &&
n.namespace_ ().empty ())
378 this->chgd_.set (chgd_traits::create (i, f,
this));
383 if (!e_id_.present ())
385 throw ::xsd::cxx::tree::expected_attribute< char > (
390 if (!ord_.present ())
392 throw ::xsd::cxx::tree::expected_attribute< char > (
399 throw ::xsd::cxx::tree::expected_attribute< char > (
406 throw ::xsd::cxx::tree::expected_attribute< char > (
411 if (!chgd_.present ())
413 throw ::xsd::cxx::tree::expected_attribute< char > (
434 #include <xsd/cxx/tree/std-ostream-map.hxx>
439 const ::xsd::cxx::tree::std_ostream_plate< 0, char >
440 std_ostream_plate_init;
446 operator<< (::std::ostream& o,
const space& i)
449 b (i.element_data ().begin ()), e (i.element_data ().end ());
452 o << ::std::endl <<
"element_data: " << *b;
457 o << ::std::endl <<
"spaceType: " << *i.spaceType ();
464 operator<< (::std::ostream& o,
const element_data& i)
466 o << ::std::endl <<
"e_id: " << i.e_id ();
467 o << ::std::endl <<
"ord: " << i.ord ();
468 o << ::std::endl <<
"bd: " << i.bd ();
469 o << ::std::endl <<
"n: " << i.n ();
470 o << ::std::endl <<
"chgd: " << i.chgd ();
476 #include <xsd/cxx/xml/sax/std-input-source.hxx>
477 #include <xsd/cxx/tree/error-handler.hxx>
481 ::std::auto_ptr< ::XMLSpace::space >
486 ::xsd::cxx::xml::auto_initializer i (
487 (f & ::xml_schema::flags::dont_initialize) == 0,
488 (f & ::xml_schema::flags::keep_dom) == 0);
490 ::xsd::cxx::tree::error_handler< char > h;
492 ::xml_schema::dom::auto_ptr< ::xercesc::DOMDocument > d (
493 ::xsd::cxx::xml::dom::parse< char > (
496 h.throw_if_failed< ::xsd::cxx::tree::parsing< char > > ();
498 ::std::auto_ptr< ::XMLSpace::space > r (
500 d, f | ::xml_schema::flags::own_dom, p));
505 ::std::auto_ptr< ::XMLSpace::space >
511 ::xsd::cxx::xml::auto_initializer i (
512 (f & ::xml_schema::flags::dont_initialize) == 0,
513 (f & ::xml_schema::flags::keep_dom) == 0);
515 ::xml_schema::dom::auto_ptr< ::xercesc::DOMDocument > d (
516 ::xsd::cxx::xml::dom::parse< char > (
520 throw ::xsd::cxx::tree::parsing< char > ();
522 ::std::auto_ptr< ::XMLSpace::space > r (
524 d, f | ::xml_schema::flags::own_dom, p));
529 ::std::auto_ptr< ::XMLSpace::space >
531 ::xercesc::DOMErrorHandler& h,
535 ::xml_schema::dom::auto_ptr< ::xercesc::DOMDocument > d (
536 ::xsd::cxx::xml::dom::parse< char > (
540 throw ::xsd::cxx::tree::parsing< char > ();
542 ::std::auto_ptr< ::XMLSpace::space > r (
544 d, f | ::xml_schema::flags::own_dom, p));
549 ::std::auto_ptr< ::XMLSpace::space >
554 ::xsd::cxx::xml::auto_initializer i (
555 (f & ::xml_schema::flags::dont_initialize) == 0,
556 (f & ::xml_schema::flags::keep_dom) == 0);
558 ::xsd::cxx::xml::sax::std_input_source isrc (is);
562 ::std::auto_ptr< ::XMLSpace::space >
568 ::xsd::cxx::xml::auto_initializer i (
569 (f & ::xml_schema::flags::dont_initialize) == 0,
570 (f & ::xml_schema::flags::keep_dom) == 0);
572 ::xsd::cxx::xml::sax::std_input_source isrc (is);
576 ::std::auto_ptr< ::XMLSpace::space >
578 ::xercesc::DOMErrorHandler& h,
582 ::xsd::cxx::xml::sax::std_input_source isrc (is);
586 ::std::auto_ptr< ::XMLSpace::space >
592 ::xsd::cxx::xml::auto_initializer i (
593 (f & ::xml_schema::flags::dont_initialize) == 0,
594 (f & ::xml_schema::flags::keep_dom) == 0);
596 ::xsd::cxx::xml::sax::std_input_source isrc (is, sid);
600 ::std::auto_ptr< ::XMLSpace::space >
607 ::xsd::cxx::xml::auto_initializer i (
608 (f & ::xml_schema::flags::dont_initialize) == 0,
609 (f & ::xml_schema::flags::keep_dom) == 0);
611 ::xsd::cxx::xml::sax::std_input_source isrc (is, sid);
615 ::std::auto_ptr< ::XMLSpace::space >
618 ::xercesc::DOMErrorHandler& h,
622 ::xsd::cxx::xml::sax::std_input_source isrc (is, sid);
626 ::std::auto_ptr< ::XMLSpace::space >
631 ::xsd::cxx::tree::error_handler< char > h;
633 ::xml_schema::dom::auto_ptr< ::xercesc::DOMDocument > d (
634 ::xsd::cxx::xml::dom::parse< char > (
637 h.throw_if_failed< ::xsd::cxx::tree::parsing< char > > ();
639 ::std::auto_ptr< ::XMLSpace::space > r (
641 d, f | ::xml_schema::flags::own_dom, p));
646 ::std::auto_ptr< ::XMLSpace::space >
652 ::xml_schema::dom::auto_ptr< ::xercesc::DOMDocument > d (
653 ::xsd::cxx::xml::dom::parse< char > (
657 throw ::xsd::cxx::tree::parsing< char > ();
659 ::std::auto_ptr< ::XMLSpace::space > r (
661 d, f | ::xml_schema::flags::own_dom, p));
666 ::std::auto_ptr< ::XMLSpace::space >
668 ::xercesc::DOMErrorHandler& h,
672 ::xml_schema::dom::auto_ptr< ::xercesc::DOMDocument > d (
673 ::xsd::cxx::xml::dom::parse< char > (
677 throw ::xsd::cxx::tree::parsing< char > ();
679 ::std::auto_ptr< ::XMLSpace::space > r (
681 d, f | ::xml_schema::flags::own_dom, p));
686 ::std::auto_ptr< ::XMLSpace::space >
691 if (f & ::xml_schema::flags::keep_dom)
693 ::xml_schema::dom::auto_ptr< ::xercesc::DOMDocument > c (
694 static_cast< ::xercesc::DOMDocument* > (d.cloneNode (
true)));
696 ::std::auto_ptr< ::XMLSpace::space > r (
698 c, f | ::xml_schema::flags::own_dom, p));
703 const ::xercesc::DOMElement& e (*d.getDocumentElement ());
704 const ::xsd::cxx::xml::qualified_name< char > n (
705 ::xsd::cxx::xml::dom::name< char > (e));
707 if (n.name () ==
"space" &&
708 n.namespace_ () ==
"XMLSpace")
710 ::std::auto_ptr< ::XMLSpace::space > r (
711 ::xsd::cxx::tree::traits< ::XMLSpace::space, char >::create (
716 throw ::xsd::cxx::tree::unexpected_element < char > (
723 ::std::auto_ptr< ::XMLSpace::space >
724 space_ (::xml_schema::dom::auto_ptr< ::xercesc::DOMDocument >& d,
728 ::xml_schema::dom::auto_ptr< ::xercesc::DOMDocument > c (
729 ((f & ::xml_schema::flags::keep_dom) &&
730 !(f & ::xml_schema::flags::own_dom))
731 ? static_cast< ::xercesc::DOMDocument* > (d->cloneNode (
true))
734 ::xercesc::DOMDocument& doc (c.get () ? *c : *d);
735 const ::xercesc::DOMElement& e (*doc.getDocumentElement ());
737 const ::xsd::cxx::xml::qualified_name< char > n (
738 ::xsd::cxx::xml::dom::name< char > (e));
740 if (f & ::xml_schema::flags::keep_dom)
742 (c.get () ? &c : &d),
745 if (n.name () ==
"space" &&
746 n.namespace_ () ==
"XMLSpace")
748 ::std::auto_ptr< ::XMLSpace::space > r (
749 ::xsd::cxx::tree::traits< ::XMLSpace::space, char >::create (
754 throw ::xsd::cxx::tree::unexpected_element < char > (
763 #include <xsd/cxx/tree/error-handler.hxx>
764 #include <xsd/cxx/xml/dom/serialization-source.hxx>
766 #include <xsd/cxx/tree/type-serializer-map.hxx>
771 const ::xsd::cxx::tree::type_serializer_plate< 0, char >
772 type_serializer_plate_init;
779 const ::XMLSpace::space& s,
784 ::xsd::cxx::xml::auto_initializer i (
785 (f & ::xml_schema::flags::dont_initialize) == 0);
787 ::xml_schema::dom::auto_ptr< ::xercesc::DOMDocument > d (
790 ::xsd::cxx::tree::error_handler< char > h;
792 ::xsd::cxx::xml::dom::ostream_format_target t (o);
793 if (!::xsd::cxx::xml::dom::serialize (t, *d, e, h, f))
795 h.throw_if_failed< ::xsd::cxx::tree::serialization< char > > ();
801 const ::XMLSpace::space& s,
807 ::xsd::cxx::xml::auto_initializer i (
808 (f & ::xml_schema::flags::dont_initialize) == 0);
810 ::xml_schema::dom::auto_ptr< ::xercesc::DOMDocument > d (
812 ::xsd::cxx::xml::dom::ostream_format_target t (o);
813 if (!::xsd::cxx::xml::dom::serialize (t, *d, e, h, f))
815 throw ::xsd::cxx::tree::serialization< char > ();
821 const ::XMLSpace::space& s,
822 ::xercesc::DOMErrorHandler& h,
827 ::xml_schema::dom::auto_ptr< ::xercesc::DOMDocument > d (
829 ::xsd::cxx::xml::dom::ostream_format_target t (o);
830 if (!::xsd::cxx::xml::dom::serialize (t, *d, e, h, f))
832 throw ::xsd::cxx::tree::serialization< char > ();
838 const ::XMLSpace::space& s,
843 ::xml_schema::dom::auto_ptr< ::xercesc::DOMDocument > d (
846 ::xsd::cxx::tree::error_handler< char > h;
848 if (!::xsd::cxx::xml::dom::serialize (t, *d, e, h, f))
850 h.throw_if_failed< ::xsd::cxx::tree::serialization< char > > ();
856 const ::XMLSpace::space& s,
862 ::xml_schema::dom::auto_ptr< ::xercesc::DOMDocument > d (
864 if (!::xsd::cxx::xml::dom::serialize (t, *d, e, h, f))
866 throw ::xsd::cxx::tree::serialization< char > ();
872 const ::XMLSpace::space& s,
873 ::xercesc::DOMErrorHandler& h,
878 ::xml_schema::dom::auto_ptr< ::xercesc::DOMDocument > d (
880 if (!::xsd::cxx::xml::dom::serialize (t, *d, e, h, f))
882 throw ::xsd::cxx::tree::serialization< char > ();
888 const ::XMLSpace::space& s,
891 ::xercesc::DOMElement& e (*d.getDocumentElement ());
892 const ::xsd::cxx::xml::qualified_name< char > n (
893 ::xsd::cxx::xml::dom::name< char > (e));
895 if (n.name () ==
"space" &&
896 n.namespace_ () ==
"XMLSpace")
902 throw ::xsd::cxx::tree::unexpected_element < char > (
910 ::xml_schema::dom::auto_ptr< ::xercesc::DOMDocument >
915 ::xml_schema::dom::auto_ptr< ::xercesc::DOMDocument > d (
916 ::xsd::cxx::xml::dom::serialize< char > (
926 operator<< (::xercesc::DOMElement& e,
const space& i)
928 e << static_cast< const ::xml_schema::type& > (i);
933 b (i.element_data ().begin ()), n (i.element_data ().end ());
936 ::xercesc::DOMElement& s (
937 ::xsd::cxx::xml::dom::create_element (
948 ::xercesc::DOMAttr& a (
949 ::xsd::cxx::xml::dom::create_attribute (
953 a << *i.spaceType ();
958 operator<< (::xercesc::DOMElement& e,
const element_data& i)
960 e << static_cast< const ::xml_schema::type& > (i);
965 ::xercesc::DOMAttr& a (
966 ::xsd::cxx::xml::dom::create_attribute (
976 ::xercesc::DOMAttr& a (
977 ::xsd::cxx::xml::dom::create_attribute (
987 ::xercesc::DOMAttr& a (
988 ::xsd::cxx::xml::dom::create_attribute (
998 ::xercesc::DOMAttr& a (
999 ::xsd::cxx::xml::dom::create_attribute (
1009 ::xercesc::DOMAttr& a (
1010 ::xsd::cxx::xml::dom::create_attribute (
1019 #include <xsd/cxx/post.hxx>
const ord_type & ord() const
Return a read-only (constant) reference to the attribute.
virtual element_data * _clone(::xml_schema::flags f=0,::xml_schema::container *c=0) const
Copy the instance polymorphically.
element_data_sequence::const_iterator element_data_const_iterator
Element constant iterator type.
::xsd::cxx::tree::sequence< element_data_type > element_data_sequence
Element sequence container type.
::xsd::cxx::tree::flags flags
Parsing and serialization flags.
const spaceType_optional & spaceType() const
Return a read-only (constant) reference to the attribute container.
Generated from space_h2d_xml.xsd.
space()
Create an instance from the ultimate base and initializers for required elements and attributes...
const e_id_type & e_id() const
Return a read-only (constant) reference to the attribute.
const element_data_sequence & element_data() const
Return a read-only (constant) reference to the element sequence.
::xsd::cxx::tree::type type
C++ type corresponding to the anyType XML Schema built-in type.
const n_type & n() const
Return a read-only (constant) reference to the attribute.
::xml_schema::integer bd_type
Attribute type.
C++ namespace for the XMLSpace schema namespace.
::xsd::cxx::xml::dom::namespace_infomap< char > namespace_infomap
Namespace serialization information map.
::xml_schema::integer e_id_type
Attribute type.
::xsd::cxx::xml::error_handler< char > error_handler
Error handler callback interface.
const XMLCh *const tree_node_key
DOM user data key for back pointers to tree nodes.
::xsd::cxx::tree::properties< char > properties
Parsing properties.
::xml_schema::integer n_type
Attribute type.
Class corresponding to the element_data schema type.
C++ namespace for the http://www.w3.org/2001/XMLSchema schema namespace.
::xsd::cxx::tree::string< char, simple_type > string
C++ type corresponding to the string XML Schema built-in type.
::xsd::cxx::tree::optional< spaceType_type > spaceType_optional
Attribute optional container type.
virtual space * _clone(::xml_schema::flags f=0,::xml_schema::container *c=0) const
Copy the instance polymorphically.
::xml_schema::boolean chgd_type
Attribute type.
const bd_type & bd() const
Return a read-only (constant) reference to the attribute.
::xml_schema::integer ord_type
Attribute type.
Class corresponding to the space schema type.
::xsd::cxx::tree::type container
Alias for the anyType type.
const chgd_type & chgd() const
Return a read-only (constant) reference to the attribute.
::xml_schema::string spaceType_type
Attribute type.
::std::auto_ptr< ::XMLSpace::space > space_(const ::std::string &uri,::xml_schema::flags f=0, const ::xml_schema::properties &p=::xml_schema::properties())
Parse a URI or a local file.
virtual ~element_data()
Destructor.
virtual ~space()
Destructor.
element_data(const e_id_type &, const ord_type &, const bd_type &, const n_type &, const chgd_type &)
Create an instance from the ultimate base and initializers for required elements and attributes...