| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450 |
- using System;
- using System.Xml;
- using System.Xml.Schema;
- using System.Xml.Serialization;
- using System.Text;
- using System.Collections;
- using System.Globalization;
- namespace System.Xml.Schema
- {
- internal class XmlSchemaSerializationWriter : XmlSerializationWriter
- {
- const string xmlNamespace = "http://www.w3.org/2000/xmlns/";
- public void WriteRoot_XmlSchema (object o)
- {
- WriteStartDocument ();
- System.Xml.Schema.XmlSchema ob = (System.Xml.Schema.XmlSchema) o;
- TopLevelElement ();
- WriteObject_XmlSchema (ob, "schema", "http://www.w3.org/2001/XMLSchema", true, false, true);
- }
- void WriteObject_XmlSchema (System.Xml.Schema.XmlSchema ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
- {
- if (ob == null)
- {
- if (isNullable)
- WriteNullTagLiteral(element, namesp);
- return;
- }
- System.Type type = ob.GetType ();
- if (type == typeof(System.Xml.Schema.XmlSchema))
- ;
- else {
- throw CreateUnknownTypeException (ob);
- }
- if (writeWrappingElem) {
- WriteStartElement (element, namesp, ob);
- }
- if (needType) WriteXsiType("XmlSchema", "http://www.w3.org/2001/XMLSchema");
- WriteNamespaceDeclarations ((XmlSerializerNamespaces) ob.@Namespaces);
- ICollection o0 = ob.@UnhandledAttributes;
- if (o0 != null) {
- foreach (XmlAttribute o1 in o0)
- if (o1.NamespaceURI != xmlNamespace)
- WriteXmlAttribute (o1, ob);
- }
- if (ob.@AttributeFormDefault != ((System.Xml.Schema.XmlSchemaForm) System.Xml.Schema.XmlSchemaForm.None)) {
- WriteAttribute ("attributeFormDefault", "", GetEnumValue_XmlSchemaForm (ob.@AttributeFormDefault));
- }
- if (ob.@BlockDefault != ((System.Xml.Schema.XmlSchemaDerivationMethod) System.Xml.Schema.XmlSchemaDerivationMethod.None)) {
- WriteAttribute ("blockDefault", "", GetEnumValue_XmlSchemaDerivationMethod (ob.@BlockDefault));
- }
- if (ob.@FinalDefault != ((System.Xml.Schema.XmlSchemaDerivationMethod) System.Xml.Schema.XmlSchemaDerivationMethod.None)) {
- WriteAttribute ("finalDefault", "", GetEnumValue_XmlSchemaDerivationMethod (ob.@FinalDefault));
- }
- if (ob.@ElementFormDefault != ((System.Xml.Schema.XmlSchemaForm) System.Xml.Schema.XmlSchemaForm.None)) {
- WriteAttribute ("elementFormDefault", "", GetEnumValue_XmlSchemaForm (ob.@ElementFormDefault));
- }
- WriteAttribute ("targetNamespace", "", ob.@TargetNamespace);
- WriteAttribute ("version", "", ob.@Version);
- WriteAttribute ("id", "", ob.@Id);
- if (ob.@Includes != null) {
- for (int n2 = 0; n2 < [email protected]; n2++) {
- if (ob.@Includes[n2] == null) { }
- else if (ob.@Includes[n2].GetType() == typeof(System.Xml.Schema.XmlSchemaInclude)) {
- WriteObject_XmlSchemaInclude (((System.Xml.Schema.XmlSchemaInclude) ob.@Includes[n2]), "include", "http://www.w3.org/2001/XMLSchema", false, false, true);
- }
- else if (ob.@Includes[n2].GetType() == typeof(System.Xml.Schema.XmlSchemaImport)) {
- WriteObject_XmlSchemaImport (((System.Xml.Schema.XmlSchemaImport) ob.@Includes[n2]), "import", "http://www.w3.org/2001/XMLSchema", false, false, true);
- }
- else if (ob.@Includes[n2].GetType() == typeof(System.Xml.Schema.XmlSchemaRedefine)) {
- WriteObject_XmlSchemaRedefine (((System.Xml.Schema.XmlSchemaRedefine) ob.@Includes[n2]), "redefine", "http://www.w3.org/2001/XMLSchema", false, false, true);
- }
- else throw CreateUnknownTypeException (ob.@Includes[n2]);
- }
- }
- if (ob.@Items != null) {
- for (int n3 = 0; n3 < [email protected]; n3++) {
- if (ob.@Items[n3] == null) { }
- else if (ob.@Items[n3].GetType() == typeof(System.Xml.Schema.XmlSchemaElement)) {
- WriteObject_XmlSchemaElement (((System.Xml.Schema.XmlSchemaElement) ob.@Items[n3]), "element", "http://www.w3.org/2001/XMLSchema", false, false, true);
- }
- else if (ob.@Items[n3].GetType() == typeof(System.Xml.Schema.XmlSchemaSimpleType)) {
- WriteObject_XmlSchemaSimpleType (((System.Xml.Schema.XmlSchemaSimpleType) ob.@Items[n3]), "simpleType", "http://www.w3.org/2001/XMLSchema", false, false, true);
- }
- else if (ob.@Items[n3].GetType() == typeof(System.Xml.Schema.XmlSchemaAttribute)) {
- WriteObject_XmlSchemaAttribute (((System.Xml.Schema.XmlSchemaAttribute) ob.@Items[n3]), "attribute", "http://www.w3.org/2001/XMLSchema", false, false, true);
- }
- else if (ob.@Items[n3].GetType() == typeof(System.Xml.Schema.XmlSchemaAnnotation)) {
- WriteObject_XmlSchemaAnnotation (((System.Xml.Schema.XmlSchemaAnnotation) ob.@Items[n3]), "annotation", "http://www.w3.org/2001/XMLSchema", false, false, true);
- }
- else if (ob.@Items[n3].GetType() == typeof(System.Xml.Schema.XmlSchemaAttributeGroup)) {
- WriteObject_XmlSchemaAttributeGroup (((System.Xml.Schema.XmlSchemaAttributeGroup) ob.@Items[n3]), "attributeGroup", "http://www.w3.org/2001/XMLSchema", false, false, true);
- }
- else if (ob.@Items[n3].GetType() == typeof(System.Xml.Schema.XmlSchemaGroup)) {
- WriteObject_XmlSchemaGroup (((System.Xml.Schema.XmlSchemaGroup) ob.@Items[n3]), "group", "http://www.w3.org/2001/XMLSchema", false, false, true);
- }
- else if (ob.@Items[n3].GetType() == typeof(System.Xml.Schema.XmlSchemaComplexType)) {
- WriteObject_XmlSchemaComplexType (((System.Xml.Schema.XmlSchemaComplexType) ob.@Items[n3]), "complexType", "http://www.w3.org/2001/XMLSchema", false, false, true);
- }
- else if (ob.@Items[n3].GetType() == typeof(System.Xml.Schema.XmlSchemaNotation)) {
- WriteObject_XmlSchemaNotation (((System.Xml.Schema.XmlSchemaNotation) ob.@Items[n3]), "notation", "http://www.w3.org/2001/XMLSchema", false, false, true);
- }
- else throw CreateUnknownTypeException (ob.@Items[n3]);
- }
- }
- if (writeWrappingElem) WriteEndElement (ob);
- }
- void WriteObject_XmlSchemaForm (System.Xml.Schema.XmlSchemaForm ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
- {
- System.Type type = ob.GetType ();
- if (type == typeof(System.Xml.Schema.XmlSchemaForm))
- ;
- else {
- throw CreateUnknownTypeException (ob);
- }
- if (writeWrappingElem) {
- WriteStartElement (element, namesp, ob);
- }
- if (needType) WriteXsiType("XmlSchemaForm", "");
- Writer.WriteString (GetEnumValue_XmlSchemaForm (ob));
- if (writeWrappingElem) WriteEndElement (ob);
- }
- string GetEnumValue_XmlSchemaForm (System.Xml.Schema.XmlSchemaForm val)
- {
- switch (val)
- {
- case System.Xml.Schema.XmlSchemaForm.Qualified: return "qualified";
- case System.Xml.Schema.XmlSchemaForm.Unqualified: return "unqualified";
- default: return ((long)val).ToString(CultureInfo.InvariantCulture);
- }
- }
- void WriteObject_XmlSchemaDerivationMethod (System.Xml.Schema.XmlSchemaDerivationMethod ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
- {
- System.Type type = ob.GetType ();
- if (type == typeof(System.Xml.Schema.XmlSchemaDerivationMethod))
- ;
- else {
- throw CreateUnknownTypeException (ob);
- }
- if (writeWrappingElem) {
- WriteStartElement (element, namesp, ob);
- }
- if (needType) WriteXsiType("XmlSchemaDerivationMethod", "");
- Writer.WriteString (GetEnumValue_XmlSchemaDerivationMethod (ob));
- if (writeWrappingElem) WriteEndElement (ob);
- }
- string GetEnumValue_XmlSchemaDerivationMethod (System.Xml.Schema.XmlSchemaDerivationMethod val)
- {
- switch (val)
- {
- case System.Xml.Schema.XmlSchemaDerivationMethod.Empty: return "";
- case System.Xml.Schema.XmlSchemaDerivationMethod.Substitution: return "substitution";
- case System.Xml.Schema.XmlSchemaDerivationMethod.Extension: return "extension";
- case System.Xml.Schema.XmlSchemaDerivationMethod.Restriction: return "restriction";
- case System.Xml.Schema.XmlSchemaDerivationMethod.List: return "list";
- case System.Xml.Schema.XmlSchemaDerivationMethod.Union: return "union";
- case System.Xml.Schema.XmlSchemaDerivationMethod.All: return "#all";
- default:
- System.Text.StringBuilder sb = new System.Text.StringBuilder ();
- string[] enumNames = val.ToString().Split (',');
- foreach (string name in enumNames)
- {
- switch (name.Trim())
- {
- case "Empty": sb.Append ("").Append (' '); break;
- case "Substitution": sb.Append ("substitution").Append (' '); break;
- case "Extension": sb.Append ("extension").Append (' '); break;
- case "Restriction": sb.Append ("restriction").Append (' '); break;
- case "List": sb.Append ("list").Append (' '); break;
- case "Union": sb.Append ("union").Append (' '); break;
- case "All": sb.Append ("#all").Append (' '); break;
- default: sb.Append (name.Trim()).Append (' '); break;
- }
- }
- return sb.ToString ().Trim();
- }
- }
- void WriteObject_XmlSchemaInclude (System.Xml.Schema.XmlSchemaInclude ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
- {
- if (ob == null)
- {
- if (isNullable)
- WriteNullTagLiteral(element, namesp);
- return;
- }
- System.Type type = ob.GetType ();
- if (type == typeof(System.Xml.Schema.XmlSchemaInclude))
- ;
- else {
- throw CreateUnknownTypeException (ob);
- }
- if (writeWrappingElem) {
- WriteStartElement (element, namesp, ob);
- }
- if (needType) WriteXsiType("XmlSchemaInclude", "http://www.w3.org/2001/XMLSchema");
- WriteNamespaceDeclarations ((XmlSerializerNamespaces) ob.@Namespaces);
- ICollection o4 = ob.@UnhandledAttributes;
- if (o4 != null) {
- foreach (XmlAttribute o5 in o4)
- if (o5.NamespaceURI != xmlNamespace)
- WriteXmlAttribute (o5, ob);
- }
- WriteAttribute ("schemaLocation", "", ob.@SchemaLocation);
- WriteAttribute ("id", "", ob.@Id);
- WriteObject_XmlSchemaAnnotation (ob.@Annotation, "annotation", "http://www.w3.org/2001/XMLSchema", false, false, true);
- if (writeWrappingElem) WriteEndElement (ob);
- }
- void WriteObject_XmlSchemaImport (System.Xml.Schema.XmlSchemaImport ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
- {
- if (ob == null)
- {
- if (isNullable)
- WriteNullTagLiteral(element, namesp);
- return;
- }
- System.Type type = ob.GetType ();
- if (type == typeof(System.Xml.Schema.XmlSchemaImport))
- ;
- else {
- throw CreateUnknownTypeException (ob);
- }
- if (writeWrappingElem) {
- WriteStartElement (element, namesp, ob);
- }
- if (needType) WriteXsiType("XmlSchemaImport", "http://www.w3.org/2001/XMLSchema");
- WriteNamespaceDeclarations ((XmlSerializerNamespaces) ob.@Namespaces);
- ICollection o6 = ob.@UnhandledAttributes;
- if (o6 != null) {
- foreach (XmlAttribute o7 in o6)
- if (o7.NamespaceURI != xmlNamespace)
- WriteXmlAttribute (o7, ob);
- }
- WriteAttribute ("schemaLocation", "", ob.@SchemaLocation);
- WriteAttribute ("id", "", ob.@Id);
- WriteAttribute ("namespace", "", ob.@Namespace);
- WriteObject_XmlSchemaAnnotation (ob.@Annotation, "annotation", "http://www.w3.org/2001/XMLSchema", false, false, true);
- if (writeWrappingElem) WriteEndElement (ob);
- }
- void WriteObject_XmlSchemaRedefine (System.Xml.Schema.XmlSchemaRedefine ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
- {
- if (ob == null)
- {
- if (isNullable)
- WriteNullTagLiteral(element, namesp);
- return;
- }
- System.Type type = ob.GetType ();
- if (type == typeof(System.Xml.Schema.XmlSchemaRedefine))
- ;
- else {
- throw CreateUnknownTypeException (ob);
- }
- if (writeWrappingElem) {
- WriteStartElement (element, namesp, ob);
- }
- if (needType) WriteXsiType("XmlSchemaRedefine", "http://www.w3.org/2001/XMLSchema");
- WriteNamespaceDeclarations ((XmlSerializerNamespaces) ob.@Namespaces);
- ICollection o8 = ob.@UnhandledAttributes;
- if (o8 != null) {
- foreach (XmlAttribute o9 in o8)
- if (o9.NamespaceURI != xmlNamespace)
- WriteXmlAttribute (o9, ob);
- }
- WriteAttribute ("schemaLocation", "", ob.@SchemaLocation);
- WriteAttribute ("id", "", ob.@Id);
- if (ob.@Items != null) {
- for (int n10 = 0; n10 < [email protected]; n10++) {
- if (ob.@Items[n10] == null) { }
- else if (ob.@Items[n10].GetType() == typeof(System.Xml.Schema.XmlSchemaGroup)) {
- WriteObject_XmlSchemaGroup (((System.Xml.Schema.XmlSchemaGroup) ob.@Items[n10]), "group", "http://www.w3.org/2001/XMLSchema", false, false, true);
- }
- else if (ob.@Items[n10].GetType() == typeof(System.Xml.Schema.XmlSchemaComplexType)) {
- WriteObject_XmlSchemaComplexType (((System.Xml.Schema.XmlSchemaComplexType) ob.@Items[n10]), "complexType", "http://www.w3.org/2001/XMLSchema", false, false, true);
- }
- else if (ob.@Items[n10].GetType() == typeof(System.Xml.Schema.XmlSchemaSimpleType)) {
- WriteObject_XmlSchemaSimpleType (((System.Xml.Schema.XmlSchemaSimpleType) ob.@Items[n10]), "simpleType", "http://www.w3.org/2001/XMLSchema", false, false, true);
- }
- else if (ob.@Items[n10].GetType() == typeof(System.Xml.Schema.XmlSchemaAnnotation)) {
- WriteObject_XmlSchemaAnnotation (((System.Xml.Schema.XmlSchemaAnnotation) ob.@Items[n10]), "annotation", "http://www.w3.org/2001/XMLSchema", false, false, true);
- }
- else if (ob.@Items[n10].GetType() == typeof(System.Xml.Schema.XmlSchemaAttributeGroup)) {
- WriteObject_XmlSchemaAttributeGroup (((System.Xml.Schema.XmlSchemaAttributeGroup) ob.@Items[n10]), "attributeGroup", "http://www.w3.org/2001/XMLSchema", false, false, true);
- }
- else throw CreateUnknownTypeException (ob.@Items[n10]);
- }
- }
- if (writeWrappingElem) WriteEndElement (ob);
- }
- void WriteObject_XmlSchemaElement (System.Xml.Schema.XmlSchemaElement ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
- {
- if (ob == null)
- {
- if (isNullable)
- WriteNullTagLiteral(element, namesp);
- return;
- }
- System.Type type = ob.GetType ();
- if (type == typeof(System.Xml.Schema.XmlSchemaElement))
- ;
- else {
- throw CreateUnknownTypeException (ob);
- }
- if (writeWrappingElem) {
- WriteStartElement (element, namesp, ob);
- }
- if (needType) WriteXsiType("XmlSchemaElement", "http://www.w3.org/2001/XMLSchema");
- WriteNamespaceDeclarations ((XmlSerializerNamespaces) ob.@Namespaces);
- ICollection o11 = ob.@UnhandledAttributes;
- if (o11 != null) {
- foreach (XmlAttribute o12 in o11)
- if (o12.NamespaceURI != xmlNamespace)
- WriteXmlAttribute (o12, ob);
- }
- WriteAttribute ("id", "", ob.@Id);
- WriteAttribute ("minOccurs", "", ob.@MinOccursString);
- WriteAttribute ("maxOccurs", "", ob.@MaxOccursString);
- if (ob.@IsAbstract != false) {
- WriteAttribute ("abstract", "", (ob.@IsAbstract?"true":"false"));
- }
- if (ob.@Block != ((System.Xml.Schema.XmlSchemaDerivationMethod) System.Xml.Schema.XmlSchemaDerivationMethod.None)) {
- WriteAttribute ("block", "", GetEnumValue_XmlSchemaDerivationMethod (ob.@Block));
- }
- if (ob.@DefaultValue != null) {
- WriteAttribute ("default", "", ob.@DefaultValue);
- }
- if (ob.@Final != ((System.Xml.Schema.XmlSchemaDerivationMethod) System.Xml.Schema.XmlSchemaDerivationMethod.None)) {
- WriteAttribute ("final", "", GetEnumValue_XmlSchemaDerivationMethod (ob.@Final));
- }
- if (ob.@FixedValue != null) {
- WriteAttribute ("fixed", "", ob.@FixedValue);
- }
- if (ob.@Form != ((System.Xml.Schema.XmlSchemaForm) System.Xml.Schema.XmlSchemaForm.None)) {
- WriteAttribute ("form", "", GetEnumValue_XmlSchemaForm (ob.@Form));
- }
- if (ob.@Name != null) {
- WriteAttribute ("name", "", ob.@Name);
- }
- if (ob.@IsNillable != false) {
- WriteAttribute ("nillable", "", (ob.@IsNillable?"true":"false"));
- }
- WriteAttribute ("ref", "", FromXmlQualifiedName (ob.@RefName));
- WriteAttribute ("substitutionGroup", "", FromXmlQualifiedName (ob.@SubstitutionGroup));
- WriteAttribute ("type", "", FromXmlQualifiedName (ob.@SchemaTypeName));
- WriteObject_XmlSchemaAnnotation (ob.@Annotation, "annotation", "http://www.w3.org/2001/XMLSchema", false, false, true);
- if (ob.@SchemaType is System.Xml.Schema.XmlSchemaSimpleType) {
- WriteObject_XmlSchemaSimpleType (((System.Xml.Schema.XmlSchemaSimpleType) ob.@SchemaType), "simpleType", "http://www.w3.org/2001/XMLSchema", false, false, true);
- }
- else if (ob.@SchemaType is System.Xml.Schema.XmlSchemaComplexType) {
- WriteObject_XmlSchemaComplexType (((System.Xml.Schema.XmlSchemaComplexType) ob.@SchemaType), "complexType", "http://www.w3.org/2001/XMLSchema", false, false, true);
- }
- if (ob.@Constraints != null) {
- for (int n13 = 0; n13 < [email protected]; n13++) {
- if (ob.@Constraints[n13] == null) { }
- else if (ob.@Constraints[n13].GetType() == typeof(System.Xml.Schema.XmlSchemaKeyref)) {
- WriteObject_XmlSchemaKeyref (((System.Xml.Schema.XmlSchemaKeyref) ob.@Constraints[n13]), "keyref", "http://www.w3.org/2001/XMLSchema", false, false, true);
- }
- else if (ob.@Constraints[n13].GetType() == typeof(System.Xml.Schema.XmlSchemaKey)) {
- WriteObject_XmlSchemaKey (((System.Xml.Schema.XmlSchemaKey) ob.@Constraints[n13]), "key", "http://www.w3.org/2001/XMLSchema", false, false, true);
- }
- else if (ob.@Constraints[n13].GetType() == typeof(System.Xml.Schema.XmlSchemaUnique)) {
- WriteObject_XmlSchemaUnique (((System.Xml.Schema.XmlSchemaUnique) ob.@Constraints[n13]), "unique", "http://www.w3.org/2001/XMLSchema", false, false, true);
- }
- else throw CreateUnknownTypeException (ob.@Constraints[n13]);
- }
- }
- if (writeWrappingElem) WriteEndElement (ob);
- }
- void WriteObject_XmlSchemaSimpleType (System.Xml.Schema.XmlSchemaSimpleType ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
- {
- if (ob == null)
- {
- if (isNullable)
- WriteNullTagLiteral(element, namesp);
- return;
- }
- System.Type type = ob.GetType ();
- if (type == typeof(System.Xml.Schema.XmlSchemaSimpleType))
- ;
- else {
- throw CreateUnknownTypeException (ob);
- }
- if (writeWrappingElem) {
- WriteStartElement (element, namesp, ob);
- }
- if (needType) WriteXsiType("XmlSchemaSimpleType", "http://www.w3.org/2001/XMLSchema");
- WriteNamespaceDeclarations ((XmlSerializerNamespaces) ob.@Namespaces);
- ICollection o14 = ob.@UnhandledAttributes;
- if (o14 != null) {
- foreach (XmlAttribute o15 in o14)
- if (o15.NamespaceURI != xmlNamespace)
- WriteXmlAttribute (o15, ob);
- }
- WriteAttribute ("id", "", ob.@Id);
- WriteAttribute ("name", "", ob.@Name);
- if (ob.@Final != ((System.Xml.Schema.XmlSchemaDerivationMethod) System.Xml.Schema.XmlSchemaDerivationMethod.None)) {
- WriteAttribute ("final", "", GetEnumValue_XmlSchemaDerivationMethod (ob.@Final));
- }
- WriteObject_XmlSchemaAnnotation (ob.@Annotation, "annotation", "http://www.w3.org/2001/XMLSchema", false, false, true);
- if (ob.@Content is System.Xml.Schema.XmlSchemaSimpleTypeUnion) {
- WriteObject_XmlSchemaSimpleTypeUnion (((System.Xml.Schema.XmlSchemaSimpleTypeUnion) ob.@Content), "union", "http://www.w3.org/2001/XMLSchema", false, false, true);
- }
- else if (ob.@Content is System.Xml.Schema.XmlSchemaSimpleTypeList) {
- WriteObject_XmlSchemaSimpleTypeList (((System.Xml.Schema.XmlSchemaSimpleTypeList) ob.@Content), "list", "http://www.w3.org/2001/XMLSchema", false, false, true);
- }
- else if (ob.@Content is System.Xml.Schema.XmlSchemaSimpleTypeRestriction) {
- WriteObject_XmlSchemaSimpleTypeRestriction (((System.Xml.Schema.XmlSchemaSimpleTypeRestriction) ob.@Content), "restriction", "http://www.w3.org/2001/XMLSchema", false, false, true);
- }
- if (writeWrappingElem) WriteEndElement (ob);
- }
- void WriteObject_XmlSchemaAttribute (System.Xml.Schema.XmlSchemaAttribute ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
- {
- if (ob == null)
- {
- if (isNullable)
- WriteNullTagLiteral(element, namesp);
- return;
- }
- System.Type type = ob.GetType ();
- if (type == typeof(System.Xml.Schema.XmlSchemaAttribute))
- ;
- else {
- throw CreateUnknownTypeException (ob);
- }
- if (writeWrappingElem) {
- WriteStartElement (element, namesp, ob);
- }
- if (needType) WriteXsiType("XmlSchemaAttribute", "http://www.w3.org/2001/XMLSchema");
- WriteNamespaceDeclarations ((XmlSerializerNamespaces) ob.@Namespaces);
- ICollection o16 = ob.@UnhandledAttributes;
- if (o16 != null) {
- foreach (XmlAttribute o17 in o16)
- if (o17.NamespaceURI != xmlNamespace)
- WriteXmlAttribute (o17, ob);
- }
- WriteAttribute ("id", "", ob.@Id);
- if (ob.@DefaultValue != null) {
- WriteAttribute ("default", "", ob.@DefaultValue);
- }
- if (ob.@FixedValue != null) {
- WriteAttribute ("fixed", "", ob.@FixedValue);
- }
- if (ob.@Form != ((System.Xml.Schema.XmlSchemaForm) System.Xml.Schema.XmlSchemaForm.None)) {
- WriteAttribute ("form", "", GetEnumValue_XmlSchemaForm (ob.@Form));
- }
- WriteAttribute ("name", "", ob.@Name);
- WriteAttribute ("ref", "", FromXmlQualifiedName (ob.@RefName));
- WriteAttribute ("type", "", FromXmlQualifiedName (ob.@SchemaTypeName));
- if (ob.@Use != ((System.Xml.Schema.XmlSchemaUse) System.Xml.Schema.XmlSchemaUse.None)) {
- WriteAttribute ("use", "", GetEnumValue_XmlSchemaUse (ob.@Use));
- }
- WriteObject_XmlSchemaAnnotation (ob.@Annotation, "annotation", "http://www.w3.org/2001/XMLSchema", false, false, true);
- WriteObject_XmlSchemaSimpleType (ob.@SchemaType, "simpleType", "http://www.w3.org/2001/XMLSchema", false, false, true);
- if (writeWrappingElem) WriteEndElement (ob);
- }
- void WriteObject_XmlSchemaAnnotation (System.Xml.Schema.XmlSchemaAnnotation ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
- {
- if (ob == null)
- {
- if (isNullable)
- WriteNullTagLiteral(element, namesp);
- return;
- }
- System.Type type = ob.GetType ();
- if (type == typeof(System.Xml.Schema.XmlSchemaAnnotation))
- ;
- else {
- throw CreateUnknownTypeException (ob);
- }
- if (writeWrappingElem) {
- WriteStartElement (element, namesp, ob);
- }
- if (needType) WriteXsiType("XmlSchemaAnnotation", "http://www.w3.org/2001/XMLSchema");
- WriteNamespaceDeclarations ((XmlSerializerNamespaces) ob.@Namespaces);
- ICollection o18 = ob.@UnhandledAttributes;
- if (o18 != null) {
- foreach (XmlAttribute o19 in o18)
- if (o19.NamespaceURI != xmlNamespace)
- WriteXmlAttribute (o19, ob);
- }
- WriteAttribute ("id", "", ob.@Id);
- if (ob.@Items != null) {
- for (int n20 = 0; n20 < [email protected]; n20++) {
- if (ob.@Items[n20] == null) { }
- else if (ob.@Items[n20].GetType() == typeof(System.Xml.Schema.XmlSchemaAppInfo)) {
- WriteObject_XmlSchemaAppInfo (((System.Xml.Schema.XmlSchemaAppInfo) ob.@Items[n20]), "appinfo", "http://www.w3.org/2001/XMLSchema", false, false, true);
- }
- else if (ob.@Items[n20].GetType() == typeof(System.Xml.Schema.XmlSchemaDocumentation)) {
- WriteObject_XmlSchemaDocumentation (((System.Xml.Schema.XmlSchemaDocumentation) ob.@Items[n20]), "documentation", "http://www.w3.org/2001/XMLSchema", false, false, true);
- }
- else throw CreateUnknownTypeException (ob.@Items[n20]);
- }
- }
- if (writeWrappingElem) WriteEndElement (ob);
- }
- void WriteObject_XmlSchemaAttributeGroup (System.Xml.Schema.XmlSchemaAttributeGroup ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
- {
- if (ob == null)
- {
- if (isNullable)
- WriteNullTagLiteral(element, namesp);
- return;
- }
- System.Type type = ob.GetType ();
- if (type == typeof(System.Xml.Schema.XmlSchemaAttributeGroup))
- ;
- else {
- throw CreateUnknownTypeException (ob);
- }
- if (writeWrappingElem) {
- WriteStartElement (element, namesp, ob);
- }
- if (needType) WriteXsiType("XmlSchemaAttributeGroup", "http://www.w3.org/2001/XMLSchema");
- WriteNamespaceDeclarations ((XmlSerializerNamespaces) ob.@Namespaces);
- ICollection o21 = ob.@UnhandledAttributes;
- if (o21 != null) {
- foreach (XmlAttribute o22 in o21)
- if (o22.NamespaceURI != xmlNamespace)
- WriteXmlAttribute (o22, ob);
- }
- WriteAttribute ("id", "", ob.@Id);
- WriteAttribute ("name", "", ob.@Name);
- WriteObject_XmlSchemaAnnotation (ob.@Annotation, "annotation", "http://www.w3.org/2001/XMLSchema", false, false, true);
- if (ob.@Attributes != null) {
- for (int n23 = 0; n23 < [email protected]; n23++) {
- if (ob.@Attributes[n23] == null) { }
- else if (ob.@Attributes[n23].GetType() == typeof(System.Xml.Schema.XmlSchemaAttribute)) {
- WriteObject_XmlSchemaAttribute (((System.Xml.Schema.XmlSchemaAttribute) ob.@Attributes[n23]), "attribute", "http://www.w3.org/2001/XMLSchema", false, false, true);
- }
- else if (ob.@Attributes[n23].GetType() == typeof(System.Xml.Schema.XmlSchemaAttributeGroupRef)) {
- WriteObject_XmlSchemaAttributeGroupRef (((System.Xml.Schema.XmlSchemaAttributeGroupRef) ob.@Attributes[n23]), "attributeGroup", "http://www.w3.org/2001/XMLSchema", false, false, true);
- }
- else throw CreateUnknownTypeException (ob.@Attributes[n23]);
- }
- }
- WriteObject_XmlSchemaAnyAttribute (ob.@AnyAttribute, "anyAttribute", "http://www.w3.org/2001/XMLSchema", false, false, true);
- if (writeWrappingElem) WriteEndElement (ob);
- }
- void WriteObject_XmlSchemaGroup (System.Xml.Schema.XmlSchemaGroup ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
- {
- if (ob == null)
- {
- if (isNullable)
- WriteNullTagLiteral(element, namesp);
- return;
- }
- System.Type type = ob.GetType ();
- if (type == typeof(System.Xml.Schema.XmlSchemaGroup))
- ;
- else {
- throw CreateUnknownTypeException (ob);
- }
- if (writeWrappingElem) {
- WriteStartElement (element, namesp, ob);
- }
- if (needType) WriteXsiType("XmlSchemaGroup", "http://www.w3.org/2001/XMLSchema");
- WriteNamespaceDeclarations ((XmlSerializerNamespaces) ob.@Namespaces);
- ICollection o24 = ob.@UnhandledAttributes;
- if (o24 != null) {
- foreach (XmlAttribute o25 in o24)
- if (o25.NamespaceURI != xmlNamespace)
- WriteXmlAttribute (o25, ob);
- }
- WriteAttribute ("id", "", ob.@Id);
- WriteAttribute ("name", "", ob.@Name);
- WriteObject_XmlSchemaAnnotation (ob.@Annotation, "annotation", "http://www.w3.org/2001/XMLSchema", false, false, true);
- if (ob.@Particle is System.Xml.Schema.XmlSchemaSequence) {
- WriteObject_XmlSchemaSequence (((System.Xml.Schema.XmlSchemaSequence) ob.@Particle), "sequence", "http://www.w3.org/2001/XMLSchema", false, false, true);
- }
- else if (ob.@Particle is System.Xml.Schema.XmlSchemaChoice) {
- WriteObject_XmlSchemaChoice (((System.Xml.Schema.XmlSchemaChoice) ob.@Particle), "choice", "http://www.w3.org/2001/XMLSchema", false, false, true);
- }
- else if (ob.@Particle is System.Xml.Schema.XmlSchemaAll) {
- WriteObject_XmlSchemaAll (((System.Xml.Schema.XmlSchemaAll) ob.@Particle), "all", "http://www.w3.org/2001/XMLSchema", false, false, true);
- }
- if (writeWrappingElem) WriteEndElement (ob);
- }
- void WriteObject_XmlSchemaComplexType (System.Xml.Schema.XmlSchemaComplexType ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
- {
- if (ob == null)
- {
- if (isNullable)
- WriteNullTagLiteral(element, namesp);
- return;
- }
- System.Type type = ob.GetType ();
- if (type == typeof(System.Xml.Schema.XmlSchemaComplexType))
- ;
- else {
- throw CreateUnknownTypeException (ob);
- }
- if (writeWrappingElem) {
- WriteStartElement (element, namesp, ob);
- }
- if (needType) WriteXsiType("XmlSchemaComplexType", "http://www.w3.org/2001/XMLSchema");
- WriteNamespaceDeclarations ((XmlSerializerNamespaces) ob.@Namespaces);
- ICollection o26 = ob.@UnhandledAttributes;
- if (o26 != null) {
- foreach (XmlAttribute o27 in o26)
- if (o27.NamespaceURI != xmlNamespace)
- WriteXmlAttribute (o27, ob);
- }
- WriteAttribute ("id", "", ob.@Id);
- WriteAttribute ("name", "", ob.@Name);
- if (ob.@Final != ((System.Xml.Schema.XmlSchemaDerivationMethod) System.Xml.Schema.XmlSchemaDerivationMethod.None)) {
- WriteAttribute ("final", "", GetEnumValue_XmlSchemaDerivationMethod (ob.@Final));
- }
- if (ob.@IsAbstract != false) {
- WriteAttribute ("abstract", "", (ob.@IsAbstract?"true":"false"));
- }
- if (ob.@Block != ((System.Xml.Schema.XmlSchemaDerivationMethod) System.Xml.Schema.XmlSchemaDerivationMethod.None)) {
- WriteAttribute ("block", "", GetEnumValue_XmlSchemaDerivationMethod (ob.@Block));
- }
- if (ob.@IsMixed != false) {
- WriteAttribute ("mixed", "", (ob.@IsMixed?"true":"false"));
- }
- WriteObject_XmlSchemaAnnotation (ob.@Annotation, "annotation", "http://www.w3.org/2001/XMLSchema", false, false, true);
- if (ob.@ContentModel is System.Xml.Schema.XmlSchemaComplexContent) {
- WriteObject_XmlSchemaComplexContent (((System.Xml.Schema.XmlSchemaComplexContent) ob.@ContentModel), "complexContent", "http://www.w3.org/2001/XMLSchema", false, false, true);
- }
- else if (ob.@ContentModel is System.Xml.Schema.XmlSchemaSimpleContent) {
- WriteObject_XmlSchemaSimpleContent (((System.Xml.Schema.XmlSchemaSimpleContent) ob.@ContentModel), "simpleContent", "http://www.w3.org/2001/XMLSchema", false, false, true);
- }
- if (ob.@Particle is System.Xml.Schema.XmlSchemaAll) {
- WriteObject_XmlSchemaAll (((System.Xml.Schema.XmlSchemaAll) ob.@Particle), "all", "http://www.w3.org/2001/XMLSchema", false, false, true);
- }
- else if (ob.@Particle is System.Xml.Schema.XmlSchemaGroupRef) {
- WriteObject_XmlSchemaGroupRef (((System.Xml.Schema.XmlSchemaGroupRef) ob.@Particle), "group", "http://www.w3.org/2001/XMLSchema", false, false, true);
- }
- else if (ob.@Particle is System.Xml.Schema.XmlSchemaSequence) {
- WriteObject_XmlSchemaSequence (((System.Xml.Schema.XmlSchemaSequence) ob.@Particle), "sequence", "http://www.w3.org/2001/XMLSchema", false, false, true);
- }
- else if (ob.@Particle is System.Xml.Schema.XmlSchemaChoice) {
- WriteObject_XmlSchemaChoice (((System.Xml.Schema.XmlSchemaChoice) ob.@Particle), "choice", "http://www.w3.org/2001/XMLSchema", false, false, true);
- }
- if (ob.@Attributes != null) {
- for (int n28 = 0; n28 < [email protected]; n28++) {
- if (ob.@Attributes[n28] == null) { }
- else if (ob.@Attributes[n28].GetType() == typeof(System.Xml.Schema.XmlSchemaAttributeGroupRef)) {
- WriteObject_XmlSchemaAttributeGroupRef (((System.Xml.Schema.XmlSchemaAttributeGroupRef) ob.@Attributes[n28]), "attributeGroup", "http://www.w3.org/2001/XMLSchema", false, false, true);
- }
- else if (ob.@Attributes[n28].GetType() == typeof(System.Xml.Schema.XmlSchemaAttribute)) {
- WriteObject_XmlSchemaAttribute (((System.Xml.Schema.XmlSchemaAttribute) ob.@Attributes[n28]), "attribute", "http://www.w3.org/2001/XMLSchema", false, false, true);
- }
- else throw CreateUnknownTypeException (ob.@Attributes[n28]);
- }
- }
- WriteObject_XmlSchemaAnyAttribute (ob.@AnyAttribute, "anyAttribute", "http://www.w3.org/2001/XMLSchema", false, false, true);
- if (writeWrappingElem) WriteEndElement (ob);
- }
- void WriteObject_XmlSchemaNotation (System.Xml.Schema.XmlSchemaNotation ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
- {
- if (ob == null)
- {
- if (isNullable)
- WriteNullTagLiteral(element, namesp);
- return;
- }
- System.Type type = ob.GetType ();
- if (type == typeof(System.Xml.Schema.XmlSchemaNotation))
- ;
- else {
- throw CreateUnknownTypeException (ob);
- }
- if (writeWrappingElem) {
- WriteStartElement (element, namesp, ob);
- }
- if (needType) WriteXsiType("XmlSchemaNotation", "http://www.w3.org/2001/XMLSchema");
- WriteNamespaceDeclarations ((XmlSerializerNamespaces) ob.@Namespaces);
- ICollection o29 = ob.@UnhandledAttributes;
- if (o29 != null) {
- foreach (XmlAttribute o30 in o29)
- if (o30.NamespaceURI != xmlNamespace)
- WriteXmlAttribute (o30, ob);
- }
- WriteAttribute ("id", "", ob.@Id);
- WriteAttribute ("name", "", ob.@Name);
- WriteAttribute ("public", "", ob.@Public);
- WriteAttribute ("system", "", ob.@System);
- WriteObject_XmlSchemaAnnotation (ob.@Annotation, "annotation", "http://www.w3.org/2001/XMLSchema", false, false, true);
- if (writeWrappingElem) WriteEndElement (ob);
- }
- void WriteObject_XmlSchemaKeyref (System.Xml.Schema.XmlSchemaKeyref ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
- {
- if (ob == null)
- {
- if (isNullable)
- WriteNullTagLiteral(element, namesp);
- return;
- }
- System.Type type = ob.GetType ();
- if (type == typeof(System.Xml.Schema.XmlSchemaKeyref))
- ;
- else {
- throw CreateUnknownTypeException (ob);
- }
- if (writeWrappingElem) {
- WriteStartElement (element, namesp, ob);
- }
- if (needType) WriteXsiType("XmlSchemaKeyref", "http://www.w3.org/2001/XMLSchema");
- WriteNamespaceDeclarations ((XmlSerializerNamespaces) ob.@Namespaces);
- ICollection o31 = ob.@UnhandledAttributes;
- if (o31 != null) {
- foreach (XmlAttribute o32 in o31)
- if (o32.NamespaceURI != xmlNamespace)
- WriteXmlAttribute (o32, ob);
- }
- WriteAttribute ("id", "", ob.@Id);
- WriteAttribute ("name", "", ob.@Name);
- WriteAttribute ("refer", "", FromXmlQualifiedName (ob.@Refer));
- WriteObject_XmlSchemaAnnotation (ob.@Annotation, "annotation", "http://www.w3.org/2001/XMLSchema", false, false, true);
- WriteObject_XmlSchemaXPath (ob.@Selector, "selector", "http://www.w3.org/2001/XMLSchema", false, false, true);
- if (ob.@Fields != null) {
- for (int n33 = 0; n33 < [email protected]; n33++) {
- WriteObject_XmlSchemaXPath (((System.Xml.Schema.XmlSchemaXPath) ob.@Fields[n33]), "field", "http://www.w3.org/2001/XMLSchema", false, false, true);
- }
- }
- if (writeWrappingElem) WriteEndElement (ob);
- }
- void WriteObject_XmlSchemaKey (System.Xml.Schema.XmlSchemaKey ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
- {
- if (ob == null)
- {
- if (isNullable)
- WriteNullTagLiteral(element, namesp);
- return;
- }
- System.Type type = ob.GetType ();
- if (type == typeof(System.Xml.Schema.XmlSchemaKey))
- ;
- else {
- throw CreateUnknownTypeException (ob);
- }
- if (writeWrappingElem) {
- WriteStartElement (element, namesp, ob);
- }
- if (needType) WriteXsiType("XmlSchemaKey", "http://www.w3.org/2001/XMLSchema");
- WriteNamespaceDeclarations ((XmlSerializerNamespaces) ob.@Namespaces);
- ICollection o34 = ob.@UnhandledAttributes;
- if (o34 != null) {
- foreach (XmlAttribute o35 in o34)
- if (o35.NamespaceURI != xmlNamespace)
- WriteXmlAttribute (o35, ob);
- }
- WriteAttribute ("id", "", ob.@Id);
- WriteAttribute ("name", "", ob.@Name);
- WriteObject_XmlSchemaAnnotation (ob.@Annotation, "annotation", "http://www.w3.org/2001/XMLSchema", false, false, true);
- WriteObject_XmlSchemaXPath (ob.@Selector, "selector", "http://www.w3.org/2001/XMLSchema", false, false, true);
- if (ob.@Fields != null) {
- for (int n36 = 0; n36 < [email protected]; n36++) {
- WriteObject_XmlSchemaXPath (((System.Xml.Schema.XmlSchemaXPath) ob.@Fields[n36]), "field", "http://www.w3.org/2001/XMLSchema", false, false, true);
- }
- }
- if (writeWrappingElem) WriteEndElement (ob);
- }
- void WriteObject_XmlSchemaUnique (System.Xml.Schema.XmlSchemaUnique ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
- {
- if (ob == null)
- {
- if (isNullable)
- WriteNullTagLiteral(element, namesp);
- return;
- }
- System.Type type = ob.GetType ();
- if (type == typeof(System.Xml.Schema.XmlSchemaUnique))
- ;
- else {
- throw CreateUnknownTypeException (ob);
- }
- if (writeWrappingElem) {
- WriteStartElement (element, namesp, ob);
- }
- if (needType) WriteXsiType("XmlSchemaUnique", "http://www.w3.org/2001/XMLSchema");
- WriteNamespaceDeclarations ((XmlSerializerNamespaces) ob.@Namespaces);
- ICollection o37 = ob.@UnhandledAttributes;
- if (o37 != null) {
- foreach (XmlAttribute o38 in o37)
- if (o38.NamespaceURI != xmlNamespace)
- WriteXmlAttribute (o38, ob);
- }
- WriteAttribute ("id", "", ob.@Id);
- WriteAttribute ("name", "", ob.@Name);
- WriteObject_XmlSchemaAnnotation (ob.@Annotation, "annotation", "http://www.w3.org/2001/XMLSchema", false, false, true);
- WriteObject_XmlSchemaXPath (ob.@Selector, "selector", "http://www.w3.org/2001/XMLSchema", false, false, true);
- if (ob.@Fields != null) {
- for (int n39 = 0; n39 < [email protected]; n39++) {
- WriteObject_XmlSchemaXPath (((System.Xml.Schema.XmlSchemaXPath) ob.@Fields[n39]), "field", "http://www.w3.org/2001/XMLSchema", false, false, true);
- }
- }
- if (writeWrappingElem) WriteEndElement (ob);
- }
- void WriteObject_XmlSchemaSimpleTypeUnion (System.Xml.Schema.XmlSchemaSimpleTypeUnion ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
- {
- if (ob == null)
- {
- if (isNullable)
- WriteNullTagLiteral(element, namesp);
- return;
- }
- System.Type type = ob.GetType ();
- if (type == typeof(System.Xml.Schema.XmlSchemaSimpleTypeUnion))
- ;
- else {
- throw CreateUnknownTypeException (ob);
- }
- if (writeWrappingElem) {
- WriteStartElement (element, namesp, ob);
- }
- if (needType) WriteXsiType("XmlSchemaSimpleTypeUnion", "http://www.w3.org/2001/XMLSchema");
- WriteNamespaceDeclarations ((XmlSerializerNamespaces) ob.@Namespaces);
- ICollection o40 = ob.@UnhandledAttributes;
- if (o40 != null) {
- foreach (XmlAttribute o41 in o40)
- if (o41.NamespaceURI != xmlNamespace)
- WriteXmlAttribute (o41, ob);
- }
- WriteAttribute ("id", "", ob.@Id);
- string s42 = null;
- if (ob.@MemberTypes != null) {
- System.Text.StringBuilder s43 = new System.Text.StringBuilder();
- for (int n44 = 0; n44 < [email protected]; n44++) {
- s43.Append (FromXmlQualifiedName (ob.@MemberTypes[n44])).Append (" ");
- }
- s42 = s43.ToString ().Trim ();
- }
- WriteAttribute ("memberTypes", "", s42);
- WriteObject_XmlSchemaAnnotation (ob.@Annotation, "annotation", "http://www.w3.org/2001/XMLSchema", false, false, true);
- if (ob.@BaseTypes != null) {
- for (int n45 = 0; n45 < [email protected]; n45++) {
- WriteObject_XmlSchemaSimpleType (((System.Xml.Schema.XmlSchemaSimpleType) ob.@BaseTypes[n45]), "simpleType", "http://www.w3.org/2001/XMLSchema", false, false, true);
- }
- }
- if (writeWrappingElem) WriteEndElement (ob);
- }
- void WriteObject_XmlSchemaSimpleTypeList (System.Xml.Schema.XmlSchemaSimpleTypeList ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
- {
- if (ob == null)
- {
- if (isNullable)
- WriteNullTagLiteral(element, namesp);
- return;
- }
- System.Type type = ob.GetType ();
- if (type == typeof(System.Xml.Schema.XmlSchemaSimpleTypeList))
- ;
- else {
- throw CreateUnknownTypeException (ob);
- }
- if (writeWrappingElem) {
- WriteStartElement (element, namesp, ob);
- }
- if (needType) WriteXsiType("XmlSchemaSimpleTypeList", "http://www.w3.org/2001/XMLSchema");
- WriteNamespaceDeclarations ((XmlSerializerNamespaces) ob.@Namespaces);
- ICollection o46 = ob.@UnhandledAttributes;
- if (o46 != null) {
- foreach (XmlAttribute o47 in o46)
- if (o47.NamespaceURI != xmlNamespace)
- WriteXmlAttribute (o47, ob);
- }
- WriteAttribute ("id", "", ob.@Id);
- WriteAttribute ("itemType", "", FromXmlQualifiedName (ob.@ItemTypeName));
- WriteObject_XmlSchemaAnnotation (ob.@Annotation, "annotation", "http://www.w3.org/2001/XMLSchema", false, false, true);
- WriteObject_XmlSchemaSimpleType (ob.@ItemType, "simpleType", "http://www.w3.org/2001/XMLSchema", false, false, true);
- if (writeWrappingElem) WriteEndElement (ob);
- }
- void WriteObject_XmlSchemaSimpleTypeRestriction (System.Xml.Schema.XmlSchemaSimpleTypeRestriction ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
- {
- if (ob == null)
- {
- if (isNullable)
- WriteNullTagLiteral(element, namesp);
- return;
- }
- System.Type type = ob.GetType ();
- if (type == typeof(System.Xml.Schema.XmlSchemaSimpleTypeRestriction))
- ;
- else {
- throw CreateUnknownTypeException (ob);
- }
- if (writeWrappingElem) {
- WriteStartElement (element, namesp, ob);
- }
- if (needType) WriteXsiType("XmlSchemaSimpleTypeRestriction", "http://www.w3.org/2001/XMLSchema");
- WriteNamespaceDeclarations ((XmlSerializerNamespaces) ob.@Namespaces);
- ICollection o48 = ob.@UnhandledAttributes;
- if (o48 != null) {
- foreach (XmlAttribute o49 in o48)
- if (o49.NamespaceURI != xmlNamespace)
- WriteXmlAttribute (o49, ob);
- }
- WriteAttribute ("id", "", ob.@Id);
- WriteAttribute ("base", "", FromXmlQualifiedName (ob.@BaseTypeName));
- WriteObject_XmlSchemaAnnotation (ob.@Annotation, "annotation", "http://www.w3.org/2001/XMLSchema", false, false, true);
- WriteObject_XmlSchemaSimpleType (ob.@BaseType, "simpleType", "http://www.w3.org/2001/XMLSchema", false, false, true);
- if (ob.@Facets != null) {
- for (int n50 = 0; n50 < [email protected]; n50++) {
- if (ob.@Facets[n50] == null) { }
- else if (ob.@Facets[n50].GetType() == typeof(System.Xml.Schema.XmlSchemaMaxLengthFacet)) {
- WriteObject_XmlSchemaMaxLengthFacet (((System.Xml.Schema.XmlSchemaMaxLengthFacet) ob.@Facets[n50]), "maxLength", "http://www.w3.org/2001/XMLSchema", false, false, true);
- }
- else if (ob.@Facets[n50].GetType() == typeof(System.Xml.Schema.XmlSchemaMinLengthFacet)) {
- WriteObject_XmlSchemaMinLengthFacet (((System.Xml.Schema.XmlSchemaMinLengthFacet) ob.@Facets[n50]), "minLength", "http://www.w3.org/2001/XMLSchema", false, false, true);
- }
- else if (ob.@Facets[n50].GetType() == typeof(System.Xml.Schema.XmlSchemaLengthFacet)) {
- WriteObject_XmlSchemaLengthFacet (((System.Xml.Schema.XmlSchemaLengthFacet) ob.@Facets[n50]), "length", "http://www.w3.org/2001/XMLSchema", false, false, true);
- }
- else if (ob.@Facets[n50].GetType() == typeof(System.Xml.Schema.XmlSchemaFractionDigitsFacet)) {
- WriteObject_XmlSchemaFractionDigitsFacet (((System.Xml.Schema.XmlSchemaFractionDigitsFacet) ob.@Facets[n50]), "fractionDigits", "http://www.w3.org/2001/XMLSchema", false, false, true);
- }
- else if (ob.@Facets[n50].GetType() == typeof(System.Xml.Schema.XmlSchemaMaxInclusiveFacet)) {
- WriteObject_XmlSchemaMaxInclusiveFacet (((System.Xml.Schema.XmlSchemaMaxInclusiveFacet) ob.@Facets[n50]), "maxInclusive", "http://www.w3.org/2001/XMLSchema", false, false, true);
- }
- else if (ob.@Facets[n50].GetType() == typeof(System.Xml.Schema.XmlSchemaMaxExclusiveFacet)) {
- WriteObject_XmlSchemaMaxExclusiveFacet (((System.Xml.Schema.XmlSchemaMaxExclusiveFacet) ob.@Facets[n50]), "maxExclusive", "http://www.w3.org/2001/XMLSchema", false, false, true);
- }
- else if (ob.@Facets[n50].GetType() == typeof(System.Xml.Schema.XmlSchemaMinExclusiveFacet)) {
- WriteObject_XmlSchemaMinExclusiveFacet (((System.Xml.Schema.XmlSchemaMinExclusiveFacet) ob.@Facets[n50]), "minExclusive", "http://www.w3.org/2001/XMLSchema", false, false, true);
- }
- else if (ob.@Facets[n50].GetType() == typeof(System.Xml.Schema.XmlSchemaEnumerationFacet)) {
- WriteObject_XmlSchemaEnumerationFacet (((System.Xml.Schema.XmlSchemaEnumerationFacet) ob.@Facets[n50]), "enumeration", "http://www.w3.org/2001/XMLSchema", false, false, true);
- }
- else if (ob.@Facets[n50].GetType() == typeof(System.Xml.Schema.XmlSchemaTotalDigitsFacet)) {
- WriteObject_XmlSchemaTotalDigitsFacet (((System.Xml.Schema.XmlSchemaTotalDigitsFacet) ob.@Facets[n50]), "totalDigits", "http://www.w3.org/2001/XMLSchema", false, false, true);
- }
- else if (ob.@Facets[n50].GetType() == typeof(System.Xml.Schema.XmlSchemaMinInclusiveFacet)) {
- WriteObject_XmlSchemaMinInclusiveFacet (((System.Xml.Schema.XmlSchemaMinInclusiveFacet) ob.@Facets[n50]), "minInclusive", "http://www.w3.org/2001/XMLSchema", false, false, true);
- }
- else if (ob.@Facets[n50].GetType() == typeof(System.Xml.Schema.XmlSchemaWhiteSpaceFacet)) {
- WriteObject_XmlSchemaWhiteSpaceFacet (((System.Xml.Schema.XmlSchemaWhiteSpaceFacet) ob.@Facets[n50]), "whiteSpace", "http://www.w3.org/2001/XMLSchema", false, false, true);
- }
- else if (ob.@Facets[n50].GetType() == typeof(System.Xml.Schema.XmlSchemaPatternFacet)) {
- WriteObject_XmlSchemaPatternFacet (((System.Xml.Schema.XmlSchemaPatternFacet) ob.@Facets[n50]), "pattern", "http://www.w3.org/2001/XMLSchema", false, false, true);
- }
- else throw CreateUnknownTypeException (ob.@Facets[n50]);
- }
- }
- if (writeWrappingElem) WriteEndElement (ob);
- }
- void WriteObject_XmlSchemaUse (System.Xml.Schema.XmlSchemaUse ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
- {
- System.Type type = ob.GetType ();
- if (type == typeof(System.Xml.Schema.XmlSchemaUse))
- ;
- else {
- throw CreateUnknownTypeException (ob);
- }
- if (writeWrappingElem) {
- WriteStartElement (element, namesp, ob);
- }
- if (needType) WriteXsiType("XmlSchemaUse", "");
- Writer.WriteString (GetEnumValue_XmlSchemaUse (ob));
- if (writeWrappingElem) WriteEndElement (ob);
- }
- string GetEnumValue_XmlSchemaUse (System.Xml.Schema.XmlSchemaUse val)
- {
- switch (val)
- {
- case System.Xml.Schema.XmlSchemaUse.Optional: return "optional";
- case System.Xml.Schema.XmlSchemaUse.Prohibited: return "prohibited";
- case System.Xml.Schema.XmlSchemaUse.Required: return "required";
- default: return ((long)val).ToString(CultureInfo.InvariantCulture);
- }
- }
- void WriteObject_XmlSchemaAppInfo (System.Xml.Schema.XmlSchemaAppInfo ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
- {
- if (ob == null)
- {
- if (isNullable)
- WriteNullTagLiteral(element, namesp);
- return;
- }
- System.Type type = ob.GetType ();
- if (type == typeof(System.Xml.Schema.XmlSchemaAppInfo))
- ;
- else {
- throw CreateUnknownTypeException (ob);
- }
- if (writeWrappingElem) {
- WriteStartElement (element, namesp, ob);
- }
- if (needType) WriteXsiType("XmlSchemaAppInfo", "http://www.w3.org/2001/XMLSchema");
- WriteNamespaceDeclarations ((XmlSerializerNamespaces) ob.@Namespaces);
- WriteAttribute ("source", "", ob.@Source);
- if (ob.@Markup != null) {
- foreach (XmlNode o51 in ob.@Markup) {
- XmlElement o52 = o51 as XmlElement;
- if (o52 == null) throw CreateUnknownTypeException (o52);
- WriteElementLiteral (o52, "", "", false, true);
- }
- }
- if (writeWrappingElem) WriteEndElement (ob);
- }
- void WriteObject_XmlSchemaDocumentation (System.Xml.Schema.XmlSchemaDocumentation ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
- {
- if (ob == null)
- {
- if (isNullable)
- WriteNullTagLiteral(element, namesp);
- return;
- }
- System.Type type = ob.GetType ();
- if (type == typeof(System.Xml.Schema.XmlSchemaDocumentation))
- ;
- else {
- throw CreateUnknownTypeException (ob);
- }
- if (writeWrappingElem) {
- WriteStartElement (element, namesp, ob);
- }
- if (needType) WriteXsiType("XmlSchemaDocumentation", "http://www.w3.org/2001/XMLSchema");
- WriteNamespaceDeclarations ((XmlSerializerNamespaces) ob.@Namespaces);
- WriteAttribute ("source", "", ob.@Source);
- WriteAttribute ("xml:lang", "", ob.@Language);
- if (ob.@Markup != null) {
- foreach (XmlNode o53 in ob.@Markup) {
- XmlElement o54 = o53 as XmlElement;
- if (o54 == null) throw CreateUnknownTypeException (o54);
- WriteElementLiteral (o54, "", "", false, true);
- }
- }
- if (writeWrappingElem) WriteEndElement (ob);
- }
- void WriteObject_XmlSchemaAttributeGroupRef (System.Xml.Schema.XmlSchemaAttributeGroupRef ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
- {
- if (ob == null)
- {
- if (isNullable)
- WriteNullTagLiteral(element, namesp);
- return;
- }
- System.Type type = ob.GetType ();
- if (type == typeof(System.Xml.Schema.XmlSchemaAttributeGroupRef))
- ;
- else {
- throw CreateUnknownTypeException (ob);
- }
- if (writeWrappingElem) {
- WriteStartElement (element, namesp, ob);
- }
- if (needType) WriteXsiType("XmlSchemaAttributeGroupRef", "http://www.w3.org/2001/XMLSchema");
- WriteNamespaceDeclarations ((XmlSerializerNamespaces) ob.@Namespaces);
- ICollection o55 = ob.@UnhandledAttributes;
- if (o55 != null) {
- foreach (XmlAttribute o56 in o55)
- if (o56.NamespaceURI != xmlNamespace)
- WriteXmlAttribute (o56, ob);
- }
- WriteAttribute ("id", "", ob.@Id);
- WriteAttribute ("ref", "", FromXmlQualifiedName (ob.@RefName));
- WriteObject_XmlSchemaAnnotation (ob.@Annotation, "annotation", "http://www.w3.org/2001/XMLSchema", false, false, true);
- if (writeWrappingElem) WriteEndElement (ob);
- }
- void WriteObject_XmlSchemaAnyAttribute (System.Xml.Schema.XmlSchemaAnyAttribute ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
- {
- if (ob == null)
- {
- if (isNullable)
- WriteNullTagLiteral(element, namesp);
- return;
- }
- System.Type type = ob.GetType ();
- if (type == typeof(System.Xml.Schema.XmlSchemaAnyAttribute))
- ;
- else {
- throw CreateUnknownTypeException (ob);
- }
- if (writeWrappingElem) {
- WriteStartElement (element, namesp, ob);
- }
- if (needType) WriteXsiType("XmlSchemaAnyAttribute", "http://www.w3.org/2001/XMLSchema");
- WriteNamespaceDeclarations ((XmlSerializerNamespaces) ob.@Namespaces);
- ICollection o57 = ob.@UnhandledAttributes;
- if (o57 != null) {
- foreach (XmlAttribute o58 in o57)
- if (o58.NamespaceURI != xmlNamespace)
- WriteXmlAttribute (o58, ob);
- }
- WriteAttribute ("id", "", ob.@Id);
- WriteAttribute ("namespace", "", ob.@Namespace);
- if (ob.@ProcessContents != ((System.Xml.Schema.XmlSchemaContentProcessing) System.Xml.Schema.XmlSchemaContentProcessing.None)) {
- WriteAttribute ("processContents", "", GetEnumValue_XmlSchemaContentProcessing (ob.@ProcessContents));
- }
- WriteObject_XmlSchemaAnnotation (ob.@Annotation, "annotation", "http://www.w3.org/2001/XMLSchema", false, false, true);
- if (writeWrappingElem) WriteEndElement (ob);
- }
- void WriteObject_XmlSchemaSequence (System.Xml.Schema.XmlSchemaSequence ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
- {
- if (ob == null)
- {
- if (isNullable)
- WriteNullTagLiteral(element, namesp);
- return;
- }
- System.Type type = ob.GetType ();
- if (type == typeof(System.Xml.Schema.XmlSchemaSequence))
- ;
- else {
- throw CreateUnknownTypeException (ob);
- }
- if (writeWrappingElem) {
- WriteStartElement (element, namesp, ob);
- }
- if (needType) WriteXsiType("XmlSchemaSequence", "http://www.w3.org/2001/XMLSchema");
- WriteNamespaceDeclarations ((XmlSerializerNamespaces) ob.@Namespaces);
- ICollection o59 = ob.@UnhandledAttributes;
- if (o59 != null) {
- foreach (XmlAttribute o60 in o59)
- if (o60.NamespaceURI != xmlNamespace)
- WriteXmlAttribute (o60, ob);
- }
- WriteAttribute ("id", "", ob.@Id);
- WriteAttribute ("minOccurs", "", ob.@MinOccursString);
- WriteAttribute ("maxOccurs", "", ob.@MaxOccursString);
- WriteObject_XmlSchemaAnnotation (ob.@Annotation, "annotation", "http://www.w3.org/2001/XMLSchema", false, false, true);
- if (ob.@Items != null) {
- for (int n61 = 0; n61 < [email protected]; n61++) {
- if (ob.@Items[n61] == null) { }
- else if (ob.@Items[n61].GetType() == typeof(System.Xml.Schema.XmlSchemaSequence)) {
- WriteObject_XmlSchemaSequence (((System.Xml.Schema.XmlSchemaSequence) ob.@Items[n61]), "sequence", "http://www.w3.org/2001/XMLSchema", false, false, true);
- }
- else if (ob.@Items[n61].GetType() == typeof(System.Xml.Schema.XmlSchemaChoice)) {
- WriteObject_XmlSchemaChoice (((System.Xml.Schema.XmlSchemaChoice) ob.@Items[n61]), "choice", "http://www.w3.org/2001/XMLSchema", false, false, true);
- }
- else if (ob.@Items[n61].GetType() == typeof(System.Xml.Schema.XmlSchemaGroupRef)) {
- WriteObject_XmlSchemaGroupRef (((System.Xml.Schema.XmlSchemaGroupRef) ob.@Items[n61]), "group", "http://www.w3.org/2001/XMLSchema", false, false, true);
- }
- else if (ob.@Items[n61].GetType() == typeof(System.Xml.Schema.XmlSchemaElement)) {
- WriteObject_XmlSchemaElement (((System.Xml.Schema.XmlSchemaElement) ob.@Items[n61]), "element", "http://www.w3.org/2001/XMLSchema", false, false, true);
- }
- else if (ob.@Items[n61].GetType() == typeof(System.Xml.Schema.XmlSchemaAny)) {
- WriteObject_XmlSchemaAny (((System.Xml.Schema.XmlSchemaAny) ob.@Items[n61]), "any", "http://www.w3.org/2001/XMLSchema", false, false, true);
- }
- else throw CreateUnknownTypeException (ob.@Items[n61]);
- }
- }
- if (writeWrappingElem) WriteEndElement (ob);
- }
- void WriteObject_XmlSchemaChoice (System.Xml.Schema.XmlSchemaChoice ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
- {
- if (ob == null)
- {
- if (isNullable)
- WriteNullTagLiteral(element, namesp);
- return;
- }
- System.Type type = ob.GetType ();
- if (type == typeof(System.Xml.Schema.XmlSchemaChoice))
- ;
- else {
- throw CreateUnknownTypeException (ob);
- }
- if (writeWrappingElem) {
- WriteStartElement (element, namesp, ob);
- }
- if (needType) WriteXsiType("XmlSchemaChoice", "http://www.w3.org/2001/XMLSchema");
- WriteNamespaceDeclarations ((XmlSerializerNamespaces) ob.@Namespaces);
- ICollection o62 = ob.@UnhandledAttributes;
- if (o62 != null) {
- foreach (XmlAttribute o63 in o62)
- if (o63.NamespaceURI != xmlNamespace)
- WriteXmlAttribute (o63, ob);
- }
- WriteAttribute ("id", "", ob.@Id);
- WriteAttribute ("minOccurs", "", ob.@MinOccursString);
- WriteAttribute ("maxOccurs", "", ob.@MaxOccursString);
- WriteObject_XmlSchemaAnnotation (ob.@Annotation, "annotation", "http://www.w3.org/2001/XMLSchema", false, false, true);
- if (ob.@Items != null) {
- for (int n64 = 0; n64 < [email protected]; n64++) {
- if (ob.@Items[n64] == null) { }
- else if (ob.@Items[n64].GetType() == typeof(System.Xml.Schema.XmlSchemaGroupRef)) {
- WriteObject_XmlSchemaGroupRef (((System.Xml.Schema.XmlSchemaGroupRef) ob.@Items[n64]), "group", "http://www.w3.org/2001/XMLSchema", false, false, true);
- }
- else if (ob.@Items[n64].GetType() == typeof(System.Xml.Schema.XmlSchemaElement)) {
- WriteObject_XmlSchemaElement (((System.Xml.Schema.XmlSchemaElement) ob.@Items[n64]), "element", "http://www.w3.org/2001/XMLSchema", false, false, true);
- }
- else if (ob.@Items[n64].GetType() == typeof(System.Xml.Schema.XmlSchemaAny)) {
- WriteObject_XmlSchemaAny (((System.Xml.Schema.XmlSchemaAny) ob.@Items[n64]), "any", "http://www.w3.org/2001/XMLSchema", false, false, true);
- }
- else if (ob.@Items[n64].GetType() == typeof(System.Xml.Schema.XmlSchemaSequence)) {
- WriteObject_XmlSchemaSequence (((System.Xml.Schema.XmlSchemaSequence) ob.@Items[n64]), "sequence", "http://www.w3.org/2001/XMLSchema", false, false, true);
- }
- else if (ob.@Items[n64].GetType() == typeof(System.Xml.Schema.XmlSchemaChoice)) {
- WriteObject_XmlSchemaChoice (((System.Xml.Schema.XmlSchemaChoice) ob.@Items[n64]), "choice", "http://www.w3.org/2001/XMLSchema", false, false, true);
- }
- else throw CreateUnknownTypeException (ob.@Items[n64]);
- }
- }
- if (writeWrappingElem) WriteEndElement (ob);
- }
- void WriteObject_XmlSchemaAll (System.Xml.Schema.XmlSchemaAll ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
- {
- if (ob == null)
- {
- if (isNullable)
- WriteNullTagLiteral(element, namesp);
- return;
- }
- System.Type type = ob.GetType ();
- if (type == typeof(System.Xml.Schema.XmlSchemaAll))
- ;
- else {
- throw CreateUnknownTypeException (ob);
- }
- if (writeWrappingElem) {
- WriteStartElement (element, namesp, ob);
- }
- if (needType) WriteXsiType("XmlSchemaAll", "http://www.w3.org/2001/XMLSchema");
- WriteNamespaceDeclarations ((XmlSerializerNamespaces) ob.@Namespaces);
- ICollection o65 = ob.@UnhandledAttributes;
- if (o65 != null) {
- foreach (XmlAttribute o66 in o65)
- if (o66.NamespaceURI != xmlNamespace)
- WriteXmlAttribute (o66, ob);
- }
- WriteAttribute ("id", "", ob.@Id);
- WriteAttribute ("minOccurs", "", ob.@MinOccursString);
- WriteAttribute ("maxOccurs", "", ob.@MaxOccursString);
- WriteObject_XmlSchemaAnnotation (ob.@Annotation, "annotation", "http://www.w3.org/2001/XMLSchema", false, false, true);
- if (ob.@Items != null) {
- for (int n67 = 0; n67 < [email protected]; n67++) {
- WriteObject_XmlSchemaElement (((System.Xml.Schema.XmlSchemaElement) ob.@Items[n67]), "element", "http://www.w3.org/2001/XMLSchema", false, false, true);
- }
- }
- if (writeWrappingElem) WriteEndElement (ob);
- }
- void WriteObject_XmlSchemaComplexContent (System.Xml.Schema.XmlSchemaComplexContent ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
- {
- if (ob == null)
- {
- if (isNullable)
- WriteNullTagLiteral(element, namesp);
- return;
- }
- System.Type type = ob.GetType ();
- if (type == typeof(System.Xml.Schema.XmlSchemaComplexContent))
- ;
- else {
- throw CreateUnknownTypeException (ob);
- }
- if (writeWrappingElem) {
- WriteStartElement (element, namesp, ob);
- }
- if (needType) WriteXsiType("XmlSchemaComplexContent", "http://www.w3.org/2001/XMLSchema");
- WriteNamespaceDeclarations ((XmlSerializerNamespaces) ob.@Namespaces);
- ICollection o68 = ob.@UnhandledAttributes;
- if (o68 != null) {
- foreach (XmlAttribute o69 in o68)
- if (o69.NamespaceURI != xmlNamespace)
- WriteXmlAttribute (o69, ob);
- }
- WriteAttribute ("id", "", ob.@Id);
- WriteAttribute ("mixed", "", (ob.@IsMixed?"true":"false"));
- WriteObject_XmlSchemaAnnotation (ob.@Annotation, "annotation", "http://www.w3.org/2001/XMLSchema", false, false, true);
- if (ob.@Content is System.Xml.Schema.XmlSchemaComplexContentExtension) {
- WriteObject_XmlSchemaComplexContentExtension (((System.Xml.Schema.XmlSchemaComplexContentExtension) ob.@Content), "extension", "http://www.w3.org/2001/XMLSchema", false, false, true);
- }
- else if (ob.@Content is System.Xml.Schema.XmlSchemaComplexContentRestriction) {
- WriteObject_XmlSchemaComplexContentRestriction (((System.Xml.Schema.XmlSchemaComplexContentRestriction) ob.@Content), "restriction", "http://www.w3.org/2001/XMLSchema", false, false, true);
- }
- if (writeWrappingElem) WriteEndElement (ob);
- }
- void WriteObject_XmlSchemaSimpleContent (System.Xml.Schema.XmlSchemaSimpleContent ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
- {
- if (ob == null)
- {
- if (isNullable)
- WriteNullTagLiteral(element, namesp);
- return;
- }
- System.Type type = ob.GetType ();
- if (type == typeof(System.Xml.Schema.XmlSchemaSimpleContent))
- ;
- else {
- throw CreateUnknownTypeException (ob);
- }
- if (writeWrappingElem) {
- WriteStartElement (element, namesp, ob);
- }
- if (needType) WriteXsiType("XmlSchemaSimpleContent", "http://www.w3.org/2001/XMLSchema");
- WriteNamespaceDeclarations ((XmlSerializerNamespaces) ob.@Namespaces);
- ICollection o70 = ob.@UnhandledAttributes;
- if (o70 != null) {
- foreach (XmlAttribute o71 in o70)
- if (o71.NamespaceURI != xmlNamespace)
- WriteXmlAttribute (o71, ob);
- }
- WriteAttribute ("id", "", ob.@Id);
- WriteObject_XmlSchemaAnnotation (ob.@Annotation, "annotation", "http://www.w3.org/2001/XMLSchema", false, false, true);
- if (ob.@Content is System.Xml.Schema.XmlSchemaSimpleContentExtension) {
- WriteObject_XmlSchemaSimpleContentExtension (((System.Xml.Schema.XmlSchemaSimpleContentExtension) ob.@Content), "extension", "http://www.w3.org/2001/XMLSchema", false, false, true);
- }
- else if (ob.@Content is System.Xml.Schema.XmlSchemaSimpleContentRestriction) {
- WriteObject_XmlSchemaSimpleContentRestriction (((System.Xml.Schema.XmlSchemaSimpleContentRestriction) ob.@Content), "restriction", "http://www.w3.org/2001/XMLSchema", false, false, true);
- }
- if (writeWrappingElem) WriteEndElement (ob);
- }
- void WriteObject_XmlSchemaGroupRef (System.Xml.Schema.XmlSchemaGroupRef ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
- {
- if (ob == null)
- {
- if (isNullable)
- WriteNullTagLiteral(element, namesp);
- return;
- }
- System.Type type = ob.GetType ();
- if (type == typeof(System.Xml.Schema.XmlSchemaGroupRef))
- ;
- else {
- throw CreateUnknownTypeException (ob);
- }
- if (writeWrappingElem) {
- WriteStartElement (element, namesp, ob);
- }
- if (needType) WriteXsiType("XmlSchemaGroupRef", "http://www.w3.org/2001/XMLSchema");
- WriteNamespaceDeclarations ((XmlSerializerNamespaces) ob.@Namespaces);
- ICollection o72 = ob.@UnhandledAttributes;
- if (o72 != null) {
- foreach (XmlAttribute o73 in o72)
- if (o73.NamespaceURI != xmlNamespace)
- WriteXmlAttribute (o73, ob);
- }
- WriteAttribute ("id", "", ob.@Id);
- WriteAttribute ("minOccurs", "", ob.@MinOccursString);
- WriteAttribute ("maxOccurs", "", ob.@MaxOccursString);
- WriteAttribute ("ref", "", FromXmlQualifiedName (ob.@RefName));
- WriteObject_XmlSchemaAnnotation (ob.@Annotation, "annotation", "http://www.w3.org/2001/XMLSchema", false, false, true);
- if (writeWrappingElem) WriteEndElement (ob);
- }
- void WriteObject_XmlSchemaXPath (System.Xml.Schema.XmlSchemaXPath ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
- {
- if (ob == null)
- {
- if (isNullable)
- WriteNullTagLiteral(element, namesp);
- return;
- }
- System.Type type = ob.GetType ();
- if (type == typeof(System.Xml.Schema.XmlSchemaXPath))
- ;
- else {
- throw CreateUnknownTypeException (ob);
- }
- if (writeWrappingElem) {
- WriteStartElement (element, namesp, ob);
- }
- if (needType) WriteXsiType("XmlSchemaXPath", "http://www.w3.org/2001/XMLSchema");
- WriteNamespaceDeclarations ((XmlSerializerNamespaces) ob.@Namespaces);
- ICollection o74 = ob.@UnhandledAttributes;
- if (o74 != null) {
- foreach (XmlAttribute o75 in o74)
- if (o75.NamespaceURI != xmlNamespace)
- WriteXmlAttribute (o75, ob);
- }
- WriteAttribute ("id", "", ob.@Id);
- if (ob.@XPath != null) {
- WriteAttribute ("xpath", "", ob.@XPath);
- }
- WriteObject_XmlSchemaAnnotation (ob.@Annotation, "annotation", "http://www.w3.org/2001/XMLSchema", false, false, true);
- if (writeWrappingElem) WriteEndElement (ob);
- }
- void WriteObject_XmlSchemaMaxLengthFacet (System.Xml.Schema.XmlSchemaMaxLengthFacet ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
- {
- if (ob == null)
- {
- if (isNullable)
- WriteNullTagLiteral(element, namesp);
- return;
- }
- System.Type type = ob.GetType ();
- if (type == typeof(System.Xml.Schema.XmlSchemaMaxLengthFacet))
- ;
- else {
- throw CreateUnknownTypeException (ob);
- }
- if (writeWrappingElem) {
- WriteStartElement (element, namesp, ob);
- }
- if (needType) WriteXsiType("XmlSchemaMaxLengthFacet", "http://www.w3.org/2001/XMLSchema");
- WriteNamespaceDeclarations ((XmlSerializerNamespaces) ob.@Namespaces);
- ICollection o76 = ob.@UnhandledAttributes;
- if (o76 != null) {
- foreach (XmlAttribute o77 in o76)
- if (o77.NamespaceURI != xmlNamespace)
- WriteXmlAttribute (o77, ob);
- }
- WriteAttribute ("id", "", ob.@Id);
- WriteAttribute ("value", "", ob.@Value);
- if (ob.@IsFixed != false) {
- WriteAttribute ("fixed", "", (ob.@IsFixed?"true":"false"));
- }
- WriteObject_XmlSchemaAnnotation (ob.@Annotation, "annotation", "http://www.w3.org/2001/XMLSchema", false, false, true);
- if (writeWrappingElem) WriteEndElement (ob);
- }
- void WriteObject_XmlSchemaMinLengthFacet (System.Xml.Schema.XmlSchemaMinLengthFacet ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
- {
- if (ob == null)
- {
- if (isNullable)
- WriteNullTagLiteral(element, namesp);
- return;
- }
- System.Type type = ob.GetType ();
- if (type == typeof(System.Xml.Schema.XmlSchemaMinLengthFacet))
- ;
- else {
- throw CreateUnknownTypeException (ob);
- }
- if (writeWrappingElem) {
- WriteStartElement (element, namesp, ob);
- }
- if (needType) WriteXsiType("XmlSchemaMinLengthFacet", "http://www.w3.org/2001/XMLSchema");
- WriteNamespaceDeclarations ((XmlSerializerNamespaces) ob.@Namespaces);
- ICollection o78 = ob.@UnhandledAttributes;
- if (o78 != null) {
- foreach (XmlAttribute o79 in o78)
- if (o79.NamespaceURI != xmlNamespace)
- WriteXmlAttribute (o79, ob);
- }
- WriteAttribute ("id", "", ob.@Id);
- WriteAttribute ("value", "", ob.@Value);
- if (ob.@IsFixed != false) {
- WriteAttribute ("fixed", "", (ob.@IsFixed?"true":"false"));
- }
- WriteObject_XmlSchemaAnnotation (ob.@Annotation, "annotation", "http://www.w3.org/2001/XMLSchema", false, false, true);
- if (writeWrappingElem) WriteEndElement (ob);
- }
- void WriteObject_XmlSchemaLengthFacet (System.Xml.Schema.XmlSchemaLengthFacet ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
- {
- if (ob == null)
- {
- if (isNullable)
- WriteNullTagLiteral(element, namesp);
- return;
- }
- System.Type type = ob.GetType ();
- if (type == typeof(System.Xml.Schema.XmlSchemaLengthFacet))
- ;
- else {
- throw CreateUnknownTypeException (ob);
- }
- if (writeWrappingElem) {
- WriteStartElement (element, namesp, ob);
- }
- if (needType) WriteXsiType("XmlSchemaLengthFacet", "http://www.w3.org/2001/XMLSchema");
- WriteNamespaceDeclarations ((XmlSerializerNamespaces) ob.@Namespaces);
- ICollection o80 = ob.@UnhandledAttributes;
- if (o80 != null) {
- foreach (XmlAttribute o81 in o80)
- if (o81.NamespaceURI != xmlNamespace)
- WriteXmlAttribute (o81, ob);
- }
- WriteAttribute ("id", "", ob.@Id);
- WriteAttribute ("value", "", ob.@Value);
- if (ob.@IsFixed != false) {
- WriteAttribute ("fixed", "", (ob.@IsFixed?"true":"false"));
- }
- WriteObject_XmlSchemaAnnotation (ob.@Annotation, "annotation", "http://www.w3.org/2001/XMLSchema", false, false, true);
- if (writeWrappingElem) WriteEndElement (ob);
- }
- void WriteObject_XmlSchemaFractionDigitsFacet (System.Xml.Schema.XmlSchemaFractionDigitsFacet ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
- {
- if (ob == null)
- {
- if (isNullable)
- WriteNullTagLiteral(element, namesp);
- return;
- }
- System.Type type = ob.GetType ();
- if (type == typeof(System.Xml.Schema.XmlSchemaFractionDigitsFacet))
- ;
- else {
- throw CreateUnknownTypeException (ob);
- }
- if (writeWrappingElem) {
- WriteStartElement (element, namesp, ob);
- }
- if (needType) WriteXsiType("XmlSchemaFractionDigitsFacet", "http://www.w3.org/2001/XMLSchema");
- WriteNamespaceDeclarations ((XmlSerializerNamespaces) ob.@Namespaces);
- ICollection o82 = ob.@UnhandledAttributes;
- if (o82 != null) {
- foreach (XmlAttribute o83 in o82)
- if (o83.NamespaceURI != xmlNamespace)
- WriteXmlAttribute (o83, ob);
- }
- WriteAttribute ("id", "", ob.@Id);
- WriteAttribute ("value", "", ob.@Value);
- if (ob.@IsFixed != false) {
- WriteAttribute ("fixed", "", (ob.@IsFixed?"true":"false"));
- }
- WriteObject_XmlSchemaAnnotation (ob.@Annotation, "annotation", "http://www.w3.org/2001/XMLSchema", false, false, true);
- if (writeWrappingElem) WriteEndElement (ob);
- }
- void WriteObject_XmlSchemaMaxInclusiveFacet (System.Xml.Schema.XmlSchemaMaxInclusiveFacet ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
- {
- if (ob == null)
- {
- if (isNullable)
- WriteNullTagLiteral(element, namesp);
- return;
- }
- System.Type type = ob.GetType ();
- if (type == typeof(System.Xml.Schema.XmlSchemaMaxInclusiveFacet))
- ;
- else {
- throw CreateUnknownTypeException (ob);
- }
- if (writeWrappingElem) {
- WriteStartElement (element, namesp, ob);
- }
- if (needType) WriteXsiType("XmlSchemaMaxInclusiveFacet", "http://www.w3.org/2001/XMLSchema");
- WriteNamespaceDeclarations ((XmlSerializerNamespaces) ob.@Namespaces);
- ICollection o84 = ob.@UnhandledAttributes;
- if (o84 != null) {
- foreach (XmlAttribute o85 in o84)
- if (o85.NamespaceURI != xmlNamespace)
- WriteXmlAttribute (o85, ob);
- }
- WriteAttribute ("id", "", ob.@Id);
- WriteAttribute ("value", "", ob.@Value);
- if (ob.@IsFixed != false) {
- WriteAttribute ("fixed", "", (ob.@IsFixed?"true":"false"));
- }
- WriteObject_XmlSchemaAnnotation (ob.@Annotation, "annotation", "http://www.w3.org/2001/XMLSchema", false, false, true);
- if (writeWrappingElem) WriteEndElement (ob);
- }
- void WriteObject_XmlSchemaMaxExclusiveFacet (System.Xml.Schema.XmlSchemaMaxExclusiveFacet ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
- {
- if (ob == null)
- {
- if (isNullable)
- WriteNullTagLiteral(element, namesp);
- return;
- }
- System.Type type = ob.GetType ();
- if (type == typeof(System.Xml.Schema.XmlSchemaMaxExclusiveFacet))
- ;
- else {
- throw CreateUnknownTypeException (ob);
- }
- if (writeWrappingElem) {
- WriteStartElement (element, namesp, ob);
- }
- if (needType) WriteXsiType("XmlSchemaMaxExclusiveFacet", "http://www.w3.org/2001/XMLSchema");
- WriteNamespaceDeclarations ((XmlSerializerNamespaces) ob.@Namespaces);
- ICollection o86 = ob.@UnhandledAttributes;
- if (o86 != null) {
- foreach (XmlAttribute o87 in o86)
- if (o87.NamespaceURI != xmlNamespace)
- WriteXmlAttribute (o87, ob);
- }
- WriteAttribute ("id", "", ob.@Id);
- WriteAttribute ("value", "", ob.@Value);
- if (ob.@IsFixed != false) {
- WriteAttribute ("fixed", "", (ob.@IsFixed?"true":"false"));
- }
- WriteObject_XmlSchemaAnnotation (ob.@Annotation, "annotation", "http://www.w3.org/2001/XMLSchema", false, false, true);
- if (writeWrappingElem) WriteEndElement (ob);
- }
- void WriteObject_XmlSchemaMinExclusiveFacet (System.Xml.Schema.XmlSchemaMinExclusiveFacet ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
- {
- if (ob == null)
- {
- if (isNullable)
- WriteNullTagLiteral(element, namesp);
- return;
- }
- System.Type type = ob.GetType ();
- if (type == typeof(System.Xml.Schema.XmlSchemaMinExclusiveFacet))
- ;
- else {
- throw CreateUnknownTypeException (ob);
- }
- if (writeWrappingElem) {
- WriteStartElement (element, namesp, ob);
- }
- if (needType) WriteXsiType("XmlSchemaMinExclusiveFacet", "http://www.w3.org/2001/XMLSchema");
- WriteNamespaceDeclarations ((XmlSerializerNamespaces) ob.@Namespaces);
- ICollection o88 = ob.@UnhandledAttributes;
- if (o88 != null) {
- foreach (XmlAttribute o89 in o88)
- if (o89.NamespaceURI != xmlNamespace)
- WriteXmlAttribute (o89, ob);
- }
- WriteAttribute ("id", "", ob.@Id);
- WriteAttribute ("value", "", ob.@Value);
- if (ob.@IsFixed != false) {
- WriteAttribute ("fixed", "", (ob.@IsFixed?"true":"false"));
- }
- WriteObject_XmlSchemaAnnotation (ob.@Annotation, "annotation", "http://www.w3.org/2001/XMLSchema", false, false, true);
- if (writeWrappingElem) WriteEndElement (ob);
- }
- void WriteObject_XmlSchemaEnumerationFacet (System.Xml.Schema.XmlSchemaEnumerationFacet ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
- {
- if (ob == null)
- {
- if (isNullable)
- WriteNullTagLiteral(element, namesp);
- return;
- }
- System.Type type = ob.GetType ();
- if (type == typeof(System.Xml.Schema.XmlSchemaEnumerationFacet))
- ;
- else {
- throw CreateUnknownTypeException (ob);
- }
- if (writeWrappingElem) {
- WriteStartElement (element, namesp, ob);
- }
- if (needType) WriteXsiType("XmlSchemaEnumerationFacet", "http://www.w3.org/2001/XMLSchema");
- WriteNamespaceDeclarations ((XmlSerializerNamespaces) ob.@Namespaces);
- ICollection o90 = ob.@UnhandledAttributes;
- if (o90 != null) {
- foreach (XmlAttribute o91 in o90)
- if (o91.NamespaceURI != xmlNamespace)
- WriteXmlAttribute (o91, ob);
- }
- WriteAttribute ("id", "", ob.@Id);
- WriteAttribute ("value", "", ob.@Value);
- if (ob.@IsFixed != false) {
- WriteAttribute ("fixed", "", (ob.@IsFixed?"true":"false"));
- }
- WriteObject_XmlSchemaAnnotation (ob.@Annotation, "annotation", "http://www.w3.org/2001/XMLSchema", false, false, true);
- if (writeWrappingElem) WriteEndElement (ob);
- }
- void WriteObject_XmlSchemaTotalDigitsFacet (System.Xml.Schema.XmlSchemaTotalDigitsFacet ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
- {
- if (ob == null)
- {
- if (isNullable)
- WriteNullTagLiteral(element, namesp);
- return;
- }
- System.Type type = ob.GetType ();
- if (type == typeof(System.Xml.Schema.XmlSchemaTotalDigitsFacet))
- ;
- else {
- throw CreateUnknownTypeException (ob);
- }
- if (writeWrappingElem) {
- WriteStartElement (element, namesp, ob);
- }
- if (needType) WriteXsiType("XmlSchemaTotalDigitsFacet", "http://www.w3.org/2001/XMLSchema");
- WriteNamespaceDeclarations ((XmlSerializerNamespaces) ob.@Namespaces);
- ICollection o92 = ob.@UnhandledAttributes;
- if (o92 != null) {
- foreach (XmlAttribute o93 in o92)
- if (o93.NamespaceURI != xmlNamespace)
- WriteXmlAttribute (o93, ob);
- }
- WriteAttribute ("id", "", ob.@Id);
- WriteAttribute ("value", "", ob.@Value);
- if (ob.@IsFixed != false) {
- WriteAttribute ("fixed", "", (ob.@IsFixed?"true":"false"));
- }
- WriteObject_XmlSchemaAnnotation (ob.@Annotation, "annotation", "http://www.w3.org/2001/XMLSchema", false, false, true);
- if (writeWrappingElem) WriteEndElement (ob);
- }
- void WriteObject_XmlSchemaMinInclusiveFacet (System.Xml.Schema.XmlSchemaMinInclusiveFacet ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
- {
- if (ob == null)
- {
- if (isNullable)
- WriteNullTagLiteral(element, namesp);
- return;
- }
- System.Type type = ob.GetType ();
- if (type == typeof(System.Xml.Schema.XmlSchemaMinInclusiveFacet))
- ;
- else {
- throw CreateUnknownTypeException (ob);
- }
- if (writeWrappingElem) {
- WriteStartElement (element, namesp, ob);
- }
- if (needType) WriteXsiType("XmlSchemaMinInclusiveFacet", "http://www.w3.org/2001/XMLSchema");
- WriteNamespaceDeclarations ((XmlSerializerNamespaces) ob.@Namespaces);
- ICollection o94 = ob.@UnhandledAttributes;
- if (o94 != null) {
- foreach (XmlAttribute o95 in o94)
- if (o95.NamespaceURI != xmlNamespace)
- WriteXmlAttribute (o95, ob);
- }
- WriteAttribute ("id", "", ob.@Id);
- WriteAttribute ("value", "", ob.@Value);
- if (ob.@IsFixed != false) {
- WriteAttribute ("fixed", "", (ob.@IsFixed?"true":"false"));
- }
- WriteObject_XmlSchemaAnnotation (ob.@Annotation, "annotation", "http://www.w3.org/2001/XMLSchema", false, false, true);
- if (writeWrappingElem) WriteEndElement (ob);
- }
- void WriteObject_XmlSchemaWhiteSpaceFacet (System.Xml.Schema.XmlSchemaWhiteSpaceFacet ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
- {
- if (ob == null)
- {
- if (isNullable)
- WriteNullTagLiteral(element, namesp);
- return;
- }
- System.Type type = ob.GetType ();
- if (type == typeof(System.Xml.Schema.XmlSchemaWhiteSpaceFacet))
- ;
- else {
- throw CreateUnknownTypeException (ob);
- }
- if (writeWrappingElem) {
- WriteStartElement (element, namesp, ob);
- }
- if (needType) WriteXsiType("XmlSchemaWhiteSpaceFacet", "http://www.w3.org/2001/XMLSchema");
- WriteNamespaceDeclarations ((XmlSerializerNamespaces) ob.@Namespaces);
- ICollection o96 = ob.@UnhandledAttributes;
- if (o96 != null) {
- foreach (XmlAttribute o97 in o96)
- if (o97.NamespaceURI != xmlNamespace)
- WriteXmlAttribute (o97, ob);
- }
- WriteAttribute ("id", "", ob.@Id);
- WriteAttribute ("value", "", ob.@Value);
- if (ob.@IsFixed != false) {
- WriteAttribute ("fixed", "", (ob.@IsFixed?"true":"false"));
- }
- WriteObject_XmlSchemaAnnotation (ob.@Annotation, "annotation", "http://www.w3.org/2001/XMLSchema", false, false, true);
- if (writeWrappingElem) WriteEndElement (ob);
- }
- void WriteObject_XmlSchemaPatternFacet (System.Xml.Schema.XmlSchemaPatternFacet ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
- {
- if (ob == null)
- {
- if (isNullable)
- WriteNullTagLiteral(element, namesp);
- return;
- }
- System.Type type = ob.GetType ();
- if (type == typeof(System.Xml.Schema.XmlSchemaPatternFacet))
- ;
- else {
- throw CreateUnknownTypeException (ob);
- }
- if (writeWrappingElem) {
- WriteStartElement (element, namesp, ob);
- }
- if (needType) WriteXsiType("XmlSchemaPatternFacet", "http://www.w3.org/2001/XMLSchema");
- WriteNamespaceDeclarations ((XmlSerializerNamespaces) ob.@Namespaces);
- ICollection o98 = ob.@UnhandledAttributes;
- if (o98 != null) {
- foreach (XmlAttribute o99 in o98)
- if (o99.NamespaceURI != xmlNamespace)
- WriteXmlAttribute (o99, ob);
- }
- WriteAttribute ("id", "", ob.@Id);
- WriteAttribute ("value", "", ob.@Value);
- if (ob.@IsFixed != false) {
- WriteAttribute ("fixed", "", (ob.@IsFixed?"true":"false"));
- }
- WriteObject_XmlSchemaAnnotation (ob.@Annotation, "annotation", "http://www.w3.org/2001/XMLSchema", false, false, true);
- if (writeWrappingElem) WriteEndElement (ob);
- }
- void WriteObject_XmlSchemaContentProcessing (System.Xml.Schema.XmlSchemaContentProcessing ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
- {
- System.Type type = ob.GetType ();
- if (type == typeof(System.Xml.Schema.XmlSchemaContentProcessing))
- ;
- else {
- throw CreateUnknownTypeException (ob);
- }
- if (writeWrappingElem) {
- WriteStartElement (element, namesp, ob);
- }
- if (needType) WriteXsiType("XmlSchemaContentProcessing", "");
- Writer.WriteString (GetEnumValue_XmlSchemaContentProcessing (ob));
- if (writeWrappingElem) WriteEndElement (ob);
- }
- string GetEnumValue_XmlSchemaContentProcessing (System.Xml.Schema.XmlSchemaContentProcessing val)
- {
- switch (val)
- {
- case System.Xml.Schema.XmlSchemaContentProcessing.Skip: return "skip";
- case System.Xml.Schema.XmlSchemaContentProcessing.Lax: return "lax";
- case System.Xml.Schema.XmlSchemaContentProcessing.Strict: return "strict";
- default: return ((long)val).ToString(CultureInfo.InvariantCulture);
- }
- }
- void WriteObject_XmlSchemaAny (System.Xml.Schema.XmlSchemaAny ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
- {
- if (ob == null)
- {
- if (isNullable)
- WriteNullTagLiteral(element, namesp);
- return;
- }
- System.Type type = ob.GetType ();
- if (type == typeof(System.Xml.Schema.XmlSchemaAny))
- ;
- else {
- throw CreateUnknownTypeException (ob);
- }
- if (writeWrappingElem) {
- WriteStartElement (element, namesp, ob);
- }
- if (needType) WriteXsiType("XmlSchemaAny", "http://www.w3.org/2001/XMLSchema");
- WriteNamespaceDeclarations ((XmlSerializerNamespaces) ob.@Namespaces);
- ICollection o100 = ob.@UnhandledAttributes;
- if (o100 != null) {
- foreach (XmlAttribute o101 in o100)
- if (o101.NamespaceURI != xmlNamespace)
- WriteXmlAttribute (o101, ob);
- }
- WriteAttribute ("id", "", ob.@Id);
- WriteAttribute ("minOccurs", "", ob.@MinOccursString);
- WriteAttribute ("maxOccurs", "", ob.@MaxOccursString);
- WriteAttribute ("namespace", "", ob.@Namespace);
- if (ob.@ProcessContents != ((System.Xml.Schema.XmlSchemaContentProcessing) System.Xml.Schema.XmlSchemaContentProcessing.None)) {
- WriteAttribute ("processContents", "", GetEnumValue_XmlSchemaContentProcessing (ob.@ProcessContents));
- }
- WriteObject_XmlSchemaAnnotation (ob.@Annotation, "annotation", "http://www.w3.org/2001/XMLSchema", false, false, true);
- if (writeWrappingElem) WriteEndElement (ob);
- }
- void WriteObject_XmlSchemaComplexContentExtension (System.Xml.Schema.XmlSchemaComplexContentExtension ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
- {
- if (ob == null)
- {
- if (isNullable)
- WriteNullTagLiteral(element, namesp);
- return;
- }
- System.Type type = ob.GetType ();
- if (type == typeof(System.Xml.Schema.XmlSchemaComplexContentExtension))
- ;
- else {
- throw CreateUnknownTypeException (ob);
- }
- if (writeWrappingElem) {
- WriteStartElement (element, namesp, ob);
- }
- if (needType) WriteXsiType("XmlSchemaComplexContentExtension", "http://www.w3.org/2001/XMLSchema");
- WriteNamespaceDeclarations ((XmlSerializerNamespaces) ob.@Namespaces);
- ICollection o102 = ob.@UnhandledAttributes;
- if (o102 != null) {
- foreach (XmlAttribute o103 in o102)
- if (o103.NamespaceURI != xmlNamespace)
- WriteXmlAttribute (o103, ob);
- }
- WriteAttribute ("id", "", ob.@Id);
- WriteAttribute ("base", "", FromXmlQualifiedName (ob.@BaseTypeName));
- WriteObject_XmlSchemaAnnotation (ob.@Annotation, "annotation", "http://www.w3.org/2001/XMLSchema", false, false, true);
- if (ob.@Particle is System.Xml.Schema.XmlSchemaGroupRef) {
- WriteObject_XmlSchemaGroupRef (((System.Xml.Schema.XmlSchemaGroupRef) ob.@Particle), "group", "http://www.w3.org/2001/XMLSchema", false, false, true);
- }
- else if (ob.@Particle is System.Xml.Schema.XmlSchemaSequence) {
- WriteObject_XmlSchemaSequence (((System.Xml.Schema.XmlSchemaSequence) ob.@Particle), "sequence", "http://www.w3.org/2001/XMLSchema", false, false, true);
- }
- else if (ob.@Particle is System.Xml.Schema.XmlSchemaChoice) {
- WriteObject_XmlSchemaChoice (((System.Xml.Schema.XmlSchemaChoice) ob.@Particle), "choice", "http://www.w3.org/2001/XMLSchema", false, false, true);
- }
- else if (ob.@Particle is System.Xml.Schema.XmlSchemaAll) {
- WriteObject_XmlSchemaAll (((System.Xml.Schema.XmlSchemaAll) ob.@Particle), "all", "http://www.w3.org/2001/XMLSchema", false, false, true);
- }
- if (ob.@Attributes != null) {
- for (int n104 = 0; n104 < [email protected]; n104++) {
- if (ob.@Attributes[n104] == null) { }
- else if (ob.@Attributes[n104].GetType() == typeof(System.Xml.Schema.XmlSchemaAttribute)) {
- WriteObject_XmlSchemaAttribute (((System.Xml.Schema.XmlSchemaAttribute) ob.@Attributes[n104]), "attribute", "http://www.w3.org/2001/XMLSchema", false, false, true);
- }
- else if (ob.@Attributes[n104].GetType() == typeof(System.Xml.Schema.XmlSchemaAttributeGroupRef)) {
- WriteObject_XmlSchemaAttributeGroupRef (((System.Xml.Schema.XmlSchemaAttributeGroupRef) ob.@Attributes[n104]), "attributeGroup", "http://www.w3.org/2001/XMLSchema", false, false, true);
- }
- else throw CreateUnknownTypeException (ob.@Attributes[n104]);
- }
- }
- WriteObject_XmlSchemaAnyAttribute (ob.@AnyAttribute, "anyAttribute", "http://www.w3.org/2001/XMLSchema", false, false, true);
- if (writeWrappingElem) WriteEndElement (ob);
- }
- void WriteObject_XmlSchemaComplexContentRestriction (System.Xml.Schema.XmlSchemaComplexContentRestriction ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
- {
- if (ob == null)
- {
- if (isNullable)
- WriteNullTagLiteral(element, namesp);
- return;
- }
- System.Type type = ob.GetType ();
- if (type == typeof(System.Xml.Schema.XmlSchemaComplexContentRestriction))
- ;
- else {
- throw CreateUnknownTypeException (ob);
- }
- if (writeWrappingElem) {
- WriteStartElement (element, namesp, ob);
- }
- if (needType) WriteXsiType("XmlSchemaComplexContentRestriction", "http://www.w3.org/2001/XMLSchema");
- WriteNamespaceDeclarations ((XmlSerializerNamespaces) ob.@Namespaces);
- ICollection o105 = ob.@UnhandledAttributes;
- if (o105 != null) {
- foreach (XmlAttribute o106 in o105)
- if (o106.NamespaceURI != xmlNamespace)
- WriteXmlAttribute (o106, ob);
- }
- WriteAttribute ("id", "", ob.@Id);
- WriteAttribute ("base", "", FromXmlQualifiedName (ob.@BaseTypeName));
- WriteObject_XmlSchemaAnnotation (ob.@Annotation, "annotation", "http://www.w3.org/2001/XMLSchema", false, false, true);
- if (ob.@Particle is System.Xml.Schema.XmlSchemaSequence) {
- WriteObject_XmlSchemaSequence (((System.Xml.Schema.XmlSchemaSequence) ob.@Particle), "sequence", "http://www.w3.org/2001/XMLSchema", false, false, true);
- }
- else if (ob.@Particle is System.Xml.Schema.XmlSchemaChoice) {
- WriteObject_XmlSchemaChoice (((System.Xml.Schema.XmlSchemaChoice) ob.@Particle), "choice", "http://www.w3.org/2001/XMLSchema", false, false, true);
- }
- else if (ob.@Particle is System.Xml.Schema.XmlSchemaGroupRef) {
- WriteObject_XmlSchemaGroupRef (((System.Xml.Schema.XmlSchemaGroupRef) ob.@Particle), "group", "http://www.w3.org/2001/XMLSchema", false, false, true);
- }
- else if (ob.@Particle is System.Xml.Schema.XmlSchemaAll) {
- WriteObject_XmlSchemaAll (((System.Xml.Schema.XmlSchemaAll) ob.@Particle), "all", "http://www.w3.org/2001/XMLSchema", false, false, true);
- }
- if (ob.@Attributes != null) {
- for (int n107 = 0; n107 < [email protected]; n107++) {
- if (ob.@Attributes[n107] == null) { }
- else if (ob.@Attributes[n107].GetType() == typeof(System.Xml.Schema.XmlSchemaAttributeGroupRef)) {
- WriteObject_XmlSchemaAttributeGroupRef (((System.Xml.Schema.XmlSchemaAttributeGroupRef) ob.@Attributes[n107]), "attributeGroup", "http://www.w3.org/2001/XMLSchema", false, false, true);
- }
- else if (ob.@Attributes[n107].GetType() == typeof(System.Xml.Schema.XmlSchemaAttribute)) {
- WriteObject_XmlSchemaAttribute (((System.Xml.Schema.XmlSchemaAttribute) ob.@Attributes[n107]), "attribute", "http://www.w3.org/2001/XMLSchema", false, false, true);
- }
- else throw CreateUnknownTypeException (ob.@Attributes[n107]);
- }
- }
- WriteObject_XmlSchemaAnyAttribute (ob.@AnyAttribute, "anyAttribute", "http://www.w3.org/2001/XMLSchema", false, false, true);
- if (writeWrappingElem) WriteEndElement (ob);
- }
- void WriteObject_XmlSchemaSimpleContentExtension (System.Xml.Schema.XmlSchemaSimpleContentExtension ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
- {
- if (ob == null)
- {
- if (isNullable)
- WriteNullTagLiteral(element, namesp);
- return;
- }
- System.Type type = ob.GetType ();
- if (type == typeof(System.Xml.Schema.XmlSchemaSimpleContentExtension))
- ;
- else {
- throw CreateUnknownTypeException (ob);
- }
- if (writeWrappingElem) {
- WriteStartElement (element, namesp, ob);
- }
- if (needType) WriteXsiType("XmlSchemaSimpleContentExtension", "http://www.w3.org/2001/XMLSchema");
- WriteNamespaceDeclarations ((XmlSerializerNamespaces) ob.@Namespaces);
- ICollection o108 = ob.@UnhandledAttributes;
- if (o108 != null) {
- foreach (XmlAttribute o109 in o108)
- if (o109.NamespaceURI != xmlNamespace)
- WriteXmlAttribute (o109, ob);
- }
- WriteAttribute ("id", "", ob.@Id);
- WriteAttribute ("base", "", FromXmlQualifiedName (ob.@BaseTypeName));
- WriteObject_XmlSchemaAnnotation (ob.@Annotation, "annotation", "http://www.w3.org/2001/XMLSchema", false, false, true);
- if (ob.@Attributes != null) {
- for (int n110 = 0; n110 < [email protected]; n110++) {
- if (ob.@Attributes[n110] == null) { }
- else if (ob.@Attributes[n110].GetType() == typeof(System.Xml.Schema.XmlSchemaAttributeGroupRef)) {
- WriteObject_XmlSchemaAttributeGroupRef (((System.Xml.Schema.XmlSchemaAttributeGroupRef) ob.@Attributes[n110]), "attributeGroup", "http://www.w3.org/2001/XMLSchema", false, false, true);
- }
- else if (ob.@Attributes[n110].GetType() == typeof(System.Xml.Schema.XmlSchemaAttribute)) {
- WriteObject_XmlSchemaAttribute (((System.Xml.Schema.XmlSchemaAttribute) ob.@Attributes[n110]), "attribute", "http://www.w3.org/2001/XMLSchema", false, false, true);
- }
- else throw CreateUnknownTypeException (ob.@Attributes[n110]);
- }
- }
- WriteObject_XmlSchemaAnyAttribute (ob.@AnyAttribute, "anyAttribute", "http://www.w3.org/2001/XMLSchema", false, false, true);
- if (writeWrappingElem) WriteEndElement (ob);
- }
- void WriteObject_XmlSchemaSimpleContentRestriction (System.Xml.Schema.XmlSchemaSimpleContentRestriction ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
- {
- if (ob == null)
- {
- if (isNullable)
- WriteNullTagLiteral(element, namesp);
- return;
- }
- System.Type type = ob.GetType ();
- if (type == typeof(System.Xml.Schema.XmlSchemaSimpleContentRestriction))
- ;
- else {
- throw CreateUnknownTypeException (ob);
- }
- if (writeWrappingElem) {
- WriteStartElement (element, namesp, ob);
- }
- if (needType) WriteXsiType("XmlSchemaSimpleContentRestriction", "http://www.w3.org/2001/XMLSchema");
- WriteNamespaceDeclarations ((XmlSerializerNamespaces) ob.@Namespaces);
- ICollection o111 = ob.@UnhandledAttributes;
- if (o111 != null) {
- foreach (XmlAttribute o112 in o111)
- if (o112.NamespaceURI != xmlNamespace)
- WriteXmlAttribute (o112, ob);
- }
- WriteAttribute ("id", "", ob.@Id);
- WriteAttribute ("base", "", FromXmlQualifiedName (ob.@BaseTypeName));
- WriteObject_XmlSchemaAnnotation (ob.@Annotation, "annotation", "http://www.w3.org/2001/XMLSchema", false, false, true);
- WriteObject_XmlSchemaSimpleType (ob.@BaseType, "simpleType", "http://www.w3.org/2001/XMLSchema", false, false, true);
- if (ob.@Facets != null) {
- for (int n113 = 0; n113 < [email protected]; n113++) {
- if (ob.@Facets[n113] == null) { }
- else if (ob.@Facets[n113].GetType() == typeof(System.Xml.Schema.XmlSchemaEnumerationFacet)) {
- WriteObject_XmlSchemaEnumerationFacet (((System.Xml.Schema.XmlSchemaEnumerationFacet) ob.@Facets[n113]), "enumeration", "http://www.w3.org/2001/XMLSchema", false, false, true);
- }
- else if (ob.@Facets[n113].GetType() == typeof(System.Xml.Schema.XmlSchemaMaxLengthFacet)) {
- WriteObject_XmlSchemaMaxLengthFacet (((System.Xml.Schema.XmlSchemaMaxLengthFacet) ob.@Facets[n113]), "maxLength", "http://www.w3.org/2001/XMLSchema", false, false, true);
- }
- else if (ob.@Facets[n113].GetType() == typeof(System.Xml.Schema.XmlSchemaMinLengthFacet)) {
- WriteObject_XmlSchemaMinLengthFacet (((System.Xml.Schema.XmlSchemaMinLengthFacet) ob.@Facets[n113]), "minLength", "http://www.w3.org/2001/XMLSchema", false, false, true);
- }
- else if (ob.@Facets[n113].GetType() == typeof(System.Xml.Schema.XmlSchemaLengthFacet)) {
- WriteObject_XmlSchemaLengthFacet (((System.Xml.Schema.XmlSchemaLengthFacet) ob.@Facets[n113]), "length", "http://www.w3.org/2001/XMLSchema", false, false, true);
- }
- else if (ob.@Facets[n113].GetType() == typeof(System.Xml.Schema.XmlSchemaFractionDigitsFacet)) {
- WriteObject_XmlSchemaFractionDigitsFacet (((System.Xml.Schema.XmlSchemaFractionDigitsFacet) ob.@Facets[n113]), "fractionDigits", "http://www.w3.org/2001/XMLSchema", false, false, true);
- }
- else if (ob.@Facets[n113].GetType() == typeof(System.Xml.Schema.XmlSchemaTotalDigitsFacet)) {
- WriteObject_XmlSchemaTotalDigitsFacet (((System.Xml.Schema.XmlSchemaTotalDigitsFacet) ob.@Facets[n113]), "totalDigits", "http://www.w3.org/2001/XMLSchema", false, false, true);
- }
- else if (ob.@Facets[n113].GetType() == typeof(System.Xml.Schema.XmlSchemaMaxInclusiveFacet)) {
- WriteObject_XmlSchemaMaxInclusiveFacet (((System.Xml.Schema.XmlSchemaMaxInclusiveFacet) ob.@Facets[n113]), "maxInclusive", "http://www.w3.org/2001/XMLSchema", false, false, true);
- }
- else if (ob.@Facets[n113].GetType() == typeof(System.Xml.Schema.XmlSchemaMaxExclusiveFacet)) {
- WriteObject_XmlSchemaMaxExclusiveFacet (((System.Xml.Schema.XmlSchemaMaxExclusiveFacet) ob.@Facets[n113]), "maxExclusive", "http://www.w3.org/2001/XMLSchema", false, false, true);
- }
- else if (ob.@Facets[n113].GetType() == typeof(System.Xml.Schema.XmlSchemaMinInclusiveFacet)) {
- WriteObject_XmlSchemaMinInclusiveFacet (((System.Xml.Schema.XmlSchemaMinInclusiveFacet) ob.@Facets[n113]), "minInclusive", "http://www.w3.org/2001/XMLSchema", false, false, true);
- }
- else if (ob.@Facets[n113].GetType() == typeof(System.Xml.Schema.XmlSchemaMinExclusiveFacet)) {
- WriteObject_XmlSchemaMinExclusiveFacet (((System.Xml.Schema.XmlSchemaMinExclusiveFacet) ob.@Facets[n113]), "minExclusive", "http://www.w3.org/2001/XMLSchema", false, false, true);
- }
- else if (ob.@Facets[n113].GetType() == typeof(System.Xml.Schema.XmlSchemaWhiteSpaceFacet)) {
- WriteObject_XmlSchemaWhiteSpaceFacet (((System.Xml.Schema.XmlSchemaWhiteSpaceFacet) ob.@Facets[n113]), "whiteSpace", "http://www.w3.org/2001/XMLSchema", false, false, true);
- }
- else if (ob.@Facets[n113].GetType() == typeof(System.Xml.Schema.XmlSchemaPatternFacet)) {
- WriteObject_XmlSchemaPatternFacet (((System.Xml.Schema.XmlSchemaPatternFacet) ob.@Facets[n113]), "pattern", "http://www.w3.org/2001/XMLSchema", false, false, true);
- }
- else throw CreateUnknownTypeException (ob.@Facets[n113]);
- }
- }
- if (ob.@Attributes != null) {
- for (int n114 = 0; n114 < [email protected]; n114++) {
- if (ob.@Attributes[n114] == null) { }
- else if (ob.@Attributes[n114].GetType() == typeof(System.Xml.Schema.XmlSchemaAttributeGroupRef)) {
- WriteObject_XmlSchemaAttributeGroupRef (((System.Xml.Schema.XmlSchemaAttributeGroupRef) ob.@Attributes[n114]), "attributeGroup", "http://www.w3.org/2001/XMLSchema", false, false, true);
- }
- else if (ob.@Attributes[n114].GetType() == typeof(System.Xml.Schema.XmlSchemaAttribute)) {
- WriteObject_XmlSchemaAttribute (((System.Xml.Schema.XmlSchemaAttribute) ob.@Attributes[n114]), "attribute", "http://www.w3.org/2001/XMLSchema", false, false, true);
- }
- else throw CreateUnknownTypeException (ob.@Attributes[n114]);
- }
- }
- WriteObject_XmlSchemaAnyAttribute (ob.@AnyAttribute, "anyAttribute", "http://www.w3.org/2001/XMLSchema", false, false, true);
- if (writeWrappingElem) WriteEndElement (ob);
- }
- protected override void InitCallbacks ()
- {
- }
- }
- }
|