25 void SchemaParser::print(ostream & out)
27 typesTable_.printTypes(out);
31 void TypesTable::printTypes(ostream & out)
33 out << numTypes << endl;
34 for (
int i = 0; i < numTypes; i++)
36 typesArray[i]->print(out);
42 ComplexType::print (ostream & out)
47 out << simpleContentTypeId_;
50 out << attList_.size()<< endl;
51 list < Attribute >::iterator pAttr = attList_.begin ();
52 while (pAttr != attList_.end ()){
59 out << cm_->getNumParticles()<< endl;
60 ContentModel::ContentsIterator cit_b=cm_->begin();
61 ContentModel::ContentsIterator cit_e=cm_->end();
62 ContentModel::ContentsIterator ci=cit_b;
64 for (ci=cit_b;ci!=cit_e;ci++){
65 if(ci->second==ContentModel::Particle){
73 ostream &
operator << (ostream & stream, Attribute & a)
75 stream <<
"@" << a.getName () << XmlUtils::dbsp << a.getType () << XmlUtils::dbsp <<
XmlUtils::dbsp;
78 if (!(a.defaultVal ()).empty ())
80 stream << 1 << XmlUtils::dbsp << a.defaultVal ();
83 if (!(a.fixedVal ()).empty ())
85 stream << 1 << XmlUtils::dbsp << a.fixedVal ();
95 ostream &
operator << (ostream & stream, Element & e)
97 stream << e.getName () << XmlUtils::dbsp << e.getType () << XmlUtils::dbsp <<
XmlUtils::dbsp;
98 stream << e.getMin () << XmlUtils::dbsp << e.getMax () <<
XmlUtils::dbsp;
99 if (!(e.defaultVal ()).empty ())
101 stream << 1 << XmlUtils::dbsp << e.defaultVal ();
104 if (!(e.fixedVal ()).empty ())
106 stream << 1 << XmlUtils::dbsp << e.fixedVal ();
116 SimpleType::print (ostream & out)
119 out << getName() << XmlUtils::dbsp << getTypeId() << XmlUtils::dbsp << isSimple () << endl;
120 out << getBaseTypeId() << endl;
122 out << facetId_.size() << endl;
123 for (
size_t j = 0; j < facetId_.size(); j++)
126 if (facetId_[j] == ENUM)
129 for (list < string >::iterator pEnums = enumValues_.begin ();
130 pEnums != enumValues_.end (); pEnums++)
131 out << *pEnums << XmlUtils::dbsp;