3 using System.Xml.Schema;
\r
4 using System.Xml.Serialization;
\r
6 using System.Collections;
\r
7 using System.Globalization;
\r
9 namespace System.Xml.Schema
\r
12 internal class XmlSchemaSerializationWriter : XmlSerializationWriter
\r
14 const string xmlNamespace = "http://www.w3.org/2000/xmlns/";
\r
15 public void WriteRoot_XmlSchema (object o)
\r
17 WriteStartDocument ();
\r
18 System.Xml.Schema.XmlSchema ob = (System.Xml.Schema.XmlSchema) o;
\r
20 WriteObject_XmlSchema (ob, "schema", "http://www.w3.org/2001/XMLSchema", true, false, true);
\r
23 void WriteObject_XmlSchema (System.Xml.Schema.XmlSchema ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
\r
28 WriteNullTagLiteral(element, namesp);
\r
32 System.Type type = ob.GetType ();
\r
33 if (type == typeof(System.Xml.Schema.XmlSchema))
\r
36 throw CreateUnknownTypeException (ob);
\r
39 if (writeWrappingElem) {
\r
40 WriteStartElement (element, namesp, ob);
\r
43 if (needType) WriteXsiType("XmlSchema", "http://www.w3.org/2001/XMLSchema");
\r
45 WriteNamespaceDeclarations ((XmlSerializerNamespaces) ob.@Namespaces);
\r
47 ICollection o0 = ob.@UnhandledAttributes;
\r
49 foreach (XmlAttribute o1 in o0)
\r
50 if (o1.NamespaceURI != xmlNamespace)
\r
51 WriteXmlAttribute (o1, ob);
\r
54 if (ob.@AttributeFormDefault != ((System.Xml.Schema.XmlSchemaForm) System.Xml.Schema.XmlSchemaForm.None)) {
\r
55 WriteAttribute ("attributeFormDefault", "", GetEnumValue_XmlSchemaForm (ob.@AttributeFormDefault));
\r
57 if (ob.@BlockDefault != ((System.Xml.Schema.XmlSchemaDerivationMethod) System.Xml.Schema.XmlSchemaDerivationMethod.None)) {
\r
58 WriteAttribute ("blockDefault", "", GetEnumValue_XmlSchemaDerivationMethod (ob.@BlockDefault));
\r
60 if (ob.@FinalDefault != ((System.Xml.Schema.XmlSchemaDerivationMethod) System.Xml.Schema.XmlSchemaDerivationMethod.None)) {
\r
61 WriteAttribute ("finalDefault", "", GetEnumValue_XmlSchemaDerivationMethod (ob.@FinalDefault));
\r
63 if (ob.@ElementFormDefault != ((System.Xml.Schema.XmlSchemaForm) System.Xml.Schema.XmlSchemaForm.None)) {
\r
64 WriteAttribute ("elementFormDefault", "", GetEnumValue_XmlSchemaForm (ob.@ElementFormDefault));
\r
66 WriteAttribute ("targetNamespace", "", ob.@TargetNamespace);
\r
67 WriteAttribute ("version", "", ob.@Version);
\r
68 WriteAttribute ("id", "", ob.@Id);
\r
70 if (ob.@Includes != null) {
\r
71 for (int n2 = 0; n2 < ob.@Includes.Count; n2++) {
\r
72 if (ob.@Includes[n2] == null) { }
\r
73 else if (ob.@Includes[n2].GetType() == typeof(System.Xml.Schema.XmlSchemaInclude)) {
\r
74 WriteObject_XmlSchemaInclude (((System.Xml.Schema.XmlSchemaInclude) ob.@Includes[n2]), "include", "http://www.w3.org/2001/XMLSchema", false, false, true);
\r
76 else if (ob.@Includes[n2].GetType() == typeof(System.Xml.Schema.XmlSchemaImport)) {
\r
77 WriteObject_XmlSchemaImport (((System.Xml.Schema.XmlSchemaImport) ob.@Includes[n2]), "import", "http://www.w3.org/2001/XMLSchema", false, false, true);
\r
79 else if (ob.@Includes[n2].GetType() == typeof(System.Xml.Schema.XmlSchemaRedefine)) {
\r
80 WriteObject_XmlSchemaRedefine (((System.Xml.Schema.XmlSchemaRedefine) ob.@Includes[n2]), "redefine", "http://www.w3.org/2001/XMLSchema", false, false, true);
\r
82 else throw CreateUnknownTypeException (ob.@Includes[n2]);
\r
85 if (ob.@Items != null) {
\r
86 for (int n3 = 0; n3 < ob.@Items.Count; n3++) {
\r
87 if (ob.@Items[n3] == null) { }
\r
88 else if (ob.@Items[n3].GetType() == typeof(System.Xml.Schema.XmlSchemaElement)) {
\r
89 WriteObject_XmlSchemaElement (((System.Xml.Schema.XmlSchemaElement) ob.@Items[n3]), "element", "http://www.w3.org/2001/XMLSchema", false, false, true);
\r
91 else if (ob.@Items[n3].GetType() == typeof(System.Xml.Schema.XmlSchemaSimpleType)) {
\r
92 WriteObject_XmlSchemaSimpleType (((System.Xml.Schema.XmlSchemaSimpleType) ob.@Items[n3]), "simpleType", "http://www.w3.org/2001/XMLSchema", false, false, true);
\r
94 else if (ob.@Items[n3].GetType() == typeof(System.Xml.Schema.XmlSchemaAttribute)) {
\r
95 WriteObject_XmlSchemaAttribute (((System.Xml.Schema.XmlSchemaAttribute) ob.@Items[n3]), "attribute", "http://www.w3.org/2001/XMLSchema", false, false, true);
\r
97 else if (ob.@Items[n3].GetType() == typeof(System.Xml.Schema.XmlSchemaAnnotation)) {
\r
98 WriteObject_XmlSchemaAnnotation (((System.Xml.Schema.XmlSchemaAnnotation) ob.@Items[n3]), "annotation", "http://www.w3.org/2001/XMLSchema", false, false, true);
\r
100 else if (ob.@Items[n3].GetType() == typeof(System.Xml.Schema.XmlSchemaAttributeGroup)) {
\r
101 WriteObject_XmlSchemaAttributeGroup (((System.Xml.Schema.XmlSchemaAttributeGroup) ob.@Items[n3]), "attributeGroup", "http://www.w3.org/2001/XMLSchema", false, false, true);
\r
103 else if (ob.@Items[n3].GetType() == typeof(System.Xml.Schema.XmlSchemaGroup)) {
\r
104 WriteObject_XmlSchemaGroup (((System.Xml.Schema.XmlSchemaGroup) ob.@Items[n3]), "group", "http://www.w3.org/2001/XMLSchema", false, false, true);
\r
106 else if (ob.@Items[n3].GetType() == typeof(System.Xml.Schema.XmlSchemaComplexType)) {
\r
107 WriteObject_XmlSchemaComplexType (((System.Xml.Schema.XmlSchemaComplexType) ob.@Items[n3]), "complexType", "http://www.w3.org/2001/XMLSchema", false, false, true);
\r
109 else if (ob.@Items[n3].GetType() == typeof(System.Xml.Schema.XmlSchemaNotation)) {
\r
110 WriteObject_XmlSchemaNotation (((System.Xml.Schema.XmlSchemaNotation) ob.@Items[n3]), "notation", "http://www.w3.org/2001/XMLSchema", false, false, true);
\r
112 else throw CreateUnknownTypeException (ob.@Items[n3]);
\r
115 if (writeWrappingElem) WriteEndElement (ob);
\r
118 void WriteObject_XmlSchemaForm (System.Xml.Schema.XmlSchemaForm ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
\r
120 System.Type type = ob.GetType ();
\r
121 if (type == typeof(System.Xml.Schema.XmlSchemaForm))
\r
124 throw CreateUnknownTypeException (ob);
\r
127 if (writeWrappingElem) {
\r
128 WriteStartElement (element, namesp, ob);
\r
131 if (needType) WriteXsiType("XmlSchemaForm", "");
\r
133 Writer.WriteString (GetEnumValue_XmlSchemaForm (ob));
\r
134 if (writeWrappingElem) WriteEndElement (ob);
\r
137 string GetEnumValue_XmlSchemaForm (System.Xml.Schema.XmlSchemaForm val)
\r
141 case System.Xml.Schema.XmlSchemaForm.Qualified: return "qualified";
\r
142 case System.Xml.Schema.XmlSchemaForm.Unqualified: return "unqualified";
\r
143 default: return ((long)val).ToString(CultureInfo.InvariantCulture);
\r
147 void WriteObject_XmlSchemaDerivationMethod (System.Xml.Schema.XmlSchemaDerivationMethod ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
\r
149 System.Type type = ob.GetType ();
\r
150 if (type == typeof(System.Xml.Schema.XmlSchemaDerivationMethod))
\r
153 throw CreateUnknownTypeException (ob);
\r
156 if (writeWrappingElem) {
\r
157 WriteStartElement (element, namesp, ob);
\r
160 if (needType) WriteXsiType("XmlSchemaDerivationMethod", "");
\r
162 Writer.WriteString (GetEnumValue_XmlSchemaDerivationMethod (ob));
\r
163 if (writeWrappingElem) WriteEndElement (ob);
\r
166 string GetEnumValue_XmlSchemaDerivationMethod (System.Xml.Schema.XmlSchemaDerivationMethod val)
\r
170 case System.Xml.Schema.XmlSchemaDerivationMethod.Empty: return "";
\r
171 case System.Xml.Schema.XmlSchemaDerivationMethod.Substitution: return "substitution";
\r
172 case System.Xml.Schema.XmlSchemaDerivationMethod.Extension: return "extension";
\r
173 case System.Xml.Schema.XmlSchemaDerivationMethod.Restriction: return "restriction";
\r
174 case System.Xml.Schema.XmlSchemaDerivationMethod.List: return "list";
\r
175 case System.Xml.Schema.XmlSchemaDerivationMethod.Union: return "union";
\r
176 case System.Xml.Schema.XmlSchemaDerivationMethod.All: return "#all";
\r
178 System.Text.StringBuilder sb = new System.Text.StringBuilder ();
\r
179 string[] enumNames = val.ToString().Split (',');
\r
180 foreach (string name in enumNames)
\r
182 switch (name.Trim())
\r
184 case "Empty": sb.Append ("").Append (' '); break;
\r
185 case "Substitution": sb.Append ("substitution").Append (' '); break;
\r
186 case "Extension": sb.Append ("extension").Append (' '); break;
\r
187 case "Restriction": sb.Append ("restriction").Append (' '); break;
\r
188 case "List": sb.Append ("list").Append (' '); break;
\r
189 case "Union": sb.Append ("union").Append (' '); break;
\r
190 case "All": sb.Append ("#all").Append (' '); break;
\r
191 default: sb.Append (name.Trim()).Append (' '); break;
\r
194 return sb.ToString ().Trim();
\r
198 void WriteObject_XmlSchemaInclude (System.Xml.Schema.XmlSchemaInclude ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
\r
203 WriteNullTagLiteral(element, namesp);
\r
207 System.Type type = ob.GetType ();
\r
208 if (type == typeof(System.Xml.Schema.XmlSchemaInclude))
\r
211 throw CreateUnknownTypeException (ob);
\r
214 if (writeWrappingElem) {
\r
215 WriteStartElement (element, namesp, ob);
\r
218 if (needType) WriteXsiType("XmlSchemaInclude", "http://www.w3.org/2001/XMLSchema");
\r
220 WriteNamespaceDeclarations ((XmlSerializerNamespaces) ob.@Namespaces);
\r
222 ICollection o4 = ob.@UnhandledAttributes;
\r
224 foreach (XmlAttribute o5 in o4)
\r
225 if (o5.NamespaceURI != xmlNamespace)
\r
226 WriteXmlAttribute (o5, ob);
\r
229 WriteAttribute ("schemaLocation", "", ob.@SchemaLocation);
\r
230 WriteAttribute ("id", "", ob.@Id);
\r
232 WriteObject_XmlSchemaAnnotation (ob.@Annotation, "annotation", "http://www.w3.org/2001/XMLSchema", false, false, true);
\r
233 if (writeWrappingElem) WriteEndElement (ob);
\r
236 void WriteObject_XmlSchemaImport (System.Xml.Schema.XmlSchemaImport ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
\r
241 WriteNullTagLiteral(element, namesp);
\r
245 System.Type type = ob.GetType ();
\r
246 if (type == typeof(System.Xml.Schema.XmlSchemaImport))
\r
249 throw CreateUnknownTypeException (ob);
\r
252 if (writeWrappingElem) {
\r
253 WriteStartElement (element, namesp, ob);
\r
256 if (needType) WriteXsiType("XmlSchemaImport", "http://www.w3.org/2001/XMLSchema");
\r
258 WriteNamespaceDeclarations ((XmlSerializerNamespaces) ob.@Namespaces);
\r
260 ICollection o6 = ob.@UnhandledAttributes;
\r
262 foreach (XmlAttribute o7 in o6)
\r
263 if (o7.NamespaceURI != xmlNamespace)
\r
264 WriteXmlAttribute (o7, ob);
\r
267 WriteAttribute ("schemaLocation", "", ob.@SchemaLocation);
\r
268 WriteAttribute ("id", "", ob.@Id);
\r
269 WriteAttribute ("namespace", "", ob.@Namespace);
\r
271 WriteObject_XmlSchemaAnnotation (ob.@Annotation, "annotation", "http://www.w3.org/2001/XMLSchema", false, false, true);
\r
272 if (writeWrappingElem) WriteEndElement (ob);
\r
275 void WriteObject_XmlSchemaRedefine (System.Xml.Schema.XmlSchemaRedefine ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
\r
280 WriteNullTagLiteral(element, namesp);
\r
284 System.Type type = ob.GetType ();
\r
285 if (type == typeof(System.Xml.Schema.XmlSchemaRedefine))
\r
288 throw CreateUnknownTypeException (ob);
\r
291 if (writeWrappingElem) {
\r
292 WriteStartElement (element, namesp, ob);
\r
295 if (needType) WriteXsiType("XmlSchemaRedefine", "http://www.w3.org/2001/XMLSchema");
\r
297 WriteNamespaceDeclarations ((XmlSerializerNamespaces) ob.@Namespaces);
\r
299 ICollection o8 = ob.@UnhandledAttributes;
\r
301 foreach (XmlAttribute o9 in o8)
\r
302 if (o9.NamespaceURI != xmlNamespace)
\r
303 WriteXmlAttribute (o9, ob);
\r
306 WriteAttribute ("schemaLocation", "", ob.@SchemaLocation);
\r
307 WriteAttribute ("id", "", ob.@Id);
\r
309 if (ob.@Items != null) {
\r
310 for (int n10 = 0; n10 < ob.@Items.Count; n10++) {
\r
311 if (ob.@Items[n10] == null) { }
\r
312 else if (ob.@Items[n10].GetType() == typeof(System.Xml.Schema.XmlSchemaGroup)) {
\r
313 WriteObject_XmlSchemaGroup (((System.Xml.Schema.XmlSchemaGroup) ob.@Items[n10]), "group", "http://www.w3.org/2001/XMLSchema", false, false, true);
\r
315 else if (ob.@Items[n10].GetType() == typeof(System.Xml.Schema.XmlSchemaComplexType)) {
\r
316 WriteObject_XmlSchemaComplexType (((System.Xml.Schema.XmlSchemaComplexType) ob.@Items[n10]), "complexType", "http://www.w3.org/2001/XMLSchema", false, false, true);
\r
318 else if (ob.@Items[n10].GetType() == typeof(System.Xml.Schema.XmlSchemaSimpleType)) {
\r
319 WriteObject_XmlSchemaSimpleType (((System.Xml.Schema.XmlSchemaSimpleType) ob.@Items[n10]), "simpleType", "http://www.w3.org/2001/XMLSchema", false, false, true);
\r
321 else if (ob.@Items[n10].GetType() == typeof(System.Xml.Schema.XmlSchemaAnnotation)) {
\r
322 WriteObject_XmlSchemaAnnotation (((System.Xml.Schema.XmlSchemaAnnotation) ob.@Items[n10]), "annotation", "http://www.w3.org/2001/XMLSchema", false, false, true);
\r
324 else if (ob.@Items[n10].GetType() == typeof(System.Xml.Schema.XmlSchemaAttributeGroup)) {
\r
325 WriteObject_XmlSchemaAttributeGroup (((System.Xml.Schema.XmlSchemaAttributeGroup) ob.@Items[n10]), "attributeGroup", "http://www.w3.org/2001/XMLSchema", false, false, true);
\r
327 else throw CreateUnknownTypeException (ob.@Items[n10]);
\r
330 if (writeWrappingElem) WriteEndElement (ob);
\r
333 void WriteObject_XmlSchemaElement (System.Xml.Schema.XmlSchemaElement ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
\r
338 WriteNullTagLiteral(element, namesp);
\r
342 System.Type type = ob.GetType ();
\r
343 if (type == typeof(System.Xml.Schema.XmlSchemaElement))
\r
346 throw CreateUnknownTypeException (ob);
\r
349 if (writeWrappingElem) {
\r
350 WriteStartElement (element, namesp, ob);
\r
353 if (needType) WriteXsiType("XmlSchemaElement", "http://www.w3.org/2001/XMLSchema");
\r
355 WriteNamespaceDeclarations ((XmlSerializerNamespaces) ob.@Namespaces);
\r
357 ICollection o11 = ob.@UnhandledAttributes;
\r
359 foreach (XmlAttribute o12 in o11)
\r
360 if (o12.NamespaceURI != xmlNamespace)
\r
361 WriteXmlAttribute (o12, ob);
\r
364 WriteAttribute ("id", "", ob.@Id);
\r
365 WriteAttribute ("minOccurs", "", ob.@MinOccursString);
\r
366 WriteAttribute ("maxOccurs", "", ob.@MaxOccursString);
\r
367 if (ob.@IsAbstract != false) {
\r
368 WriteAttribute ("abstract", "", (ob.@IsAbstract?"true":"false"));
\r
370 if (ob.@Block != ((System.Xml.Schema.XmlSchemaDerivationMethod) System.Xml.Schema.XmlSchemaDerivationMethod.None)) {
\r
371 WriteAttribute ("block", "", GetEnumValue_XmlSchemaDerivationMethod (ob.@Block));
\r
373 if (ob.@DefaultValue != null) {
\r
374 WriteAttribute ("default", "", ob.@DefaultValue);
\r
376 if (ob.@Final != ((System.Xml.Schema.XmlSchemaDerivationMethod) System.Xml.Schema.XmlSchemaDerivationMethod.None)) {
\r
377 WriteAttribute ("final", "", GetEnumValue_XmlSchemaDerivationMethod (ob.@Final));
\r
379 if (ob.@FixedValue != null) {
\r
380 WriteAttribute ("fixed", "", ob.@FixedValue);
\r
382 if (ob.@Form != ((System.Xml.Schema.XmlSchemaForm) System.Xml.Schema.XmlSchemaForm.None)) {
\r
383 WriteAttribute ("form", "", GetEnumValue_XmlSchemaForm (ob.@Form));
\r
385 if (ob.@Name != null) {
\r
386 WriteAttribute ("name", "", ob.@Name);
\r
388 if (ob.@IsNillable != false) {
\r
389 WriteAttribute ("nillable", "", (ob.@IsNillable?"true":"false"));
\r
391 WriteAttribute ("ref", "", FromXmlQualifiedName (ob.@RefName));
\r
392 WriteAttribute ("substitutionGroup", "", FromXmlQualifiedName (ob.@SubstitutionGroup));
\r
393 WriteAttribute ("type", "", FromXmlQualifiedName (ob.@SchemaTypeName));
\r
395 WriteObject_XmlSchemaAnnotation (ob.@Annotation, "annotation", "http://www.w3.org/2001/XMLSchema", false, false, true);
\r
396 if (ob.@SchemaType is System.Xml.Schema.XmlSchemaSimpleType) {
\r
397 WriteObject_XmlSchemaSimpleType (((System.Xml.Schema.XmlSchemaSimpleType) ob.@SchemaType), "simpleType", "http://www.w3.org/2001/XMLSchema", false, false, true);
\r
399 else if (ob.@SchemaType is System.Xml.Schema.XmlSchemaComplexType) {
\r
400 WriteObject_XmlSchemaComplexType (((System.Xml.Schema.XmlSchemaComplexType) ob.@SchemaType), "complexType", "http://www.w3.org/2001/XMLSchema", false, false, true);
\r
402 if (ob.@Constraints != null) {
\r
403 for (int n13 = 0; n13 < ob.@Constraints.Count; n13++) {
\r
404 if (ob.@Constraints[n13] == null) { }
\r
405 else if (ob.@Constraints[n13].GetType() == typeof(System.Xml.Schema.XmlSchemaKeyref)) {
\r
406 WriteObject_XmlSchemaKeyref (((System.Xml.Schema.XmlSchemaKeyref) ob.@Constraints[n13]), "keyref", "http://www.w3.org/2001/XMLSchema", false, false, true);
\r
408 else if (ob.@Constraints[n13].GetType() == typeof(System.Xml.Schema.XmlSchemaKey)) {
\r
409 WriteObject_XmlSchemaKey (((System.Xml.Schema.XmlSchemaKey) ob.@Constraints[n13]), "key", "http://www.w3.org/2001/XMLSchema", false, false, true);
\r
411 else if (ob.@Constraints[n13].GetType() == typeof(System.Xml.Schema.XmlSchemaUnique)) {
\r
412 WriteObject_XmlSchemaUnique (((System.Xml.Schema.XmlSchemaUnique) ob.@Constraints[n13]), "unique", "http://www.w3.org/2001/XMLSchema", false, false, true);
\r
414 else throw CreateUnknownTypeException (ob.@Constraints[n13]);
\r
417 if (writeWrappingElem) WriteEndElement (ob);
\r
420 void WriteObject_XmlSchemaSimpleType (System.Xml.Schema.XmlSchemaSimpleType ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
\r
425 WriteNullTagLiteral(element, namesp);
\r
429 System.Type type = ob.GetType ();
\r
430 if (type == typeof(System.Xml.Schema.XmlSchemaSimpleType))
\r
433 throw CreateUnknownTypeException (ob);
\r
436 if (writeWrappingElem) {
\r
437 WriteStartElement (element, namesp, ob);
\r
440 if (needType) WriteXsiType("XmlSchemaSimpleType", "http://www.w3.org/2001/XMLSchema");
\r
442 WriteNamespaceDeclarations ((XmlSerializerNamespaces) ob.@Namespaces);
\r
444 ICollection o14 = ob.@UnhandledAttributes;
\r
446 foreach (XmlAttribute o15 in o14)
\r
447 if (o15.NamespaceURI != xmlNamespace)
\r
448 WriteXmlAttribute (o15, ob);
\r
451 WriteAttribute ("id", "", ob.@Id);
\r
452 WriteAttribute ("name", "", ob.@Name);
\r
453 if (ob.@Final != ((System.Xml.Schema.XmlSchemaDerivationMethod) System.Xml.Schema.XmlSchemaDerivationMethod.None)) {
\r
454 WriteAttribute ("final", "", GetEnumValue_XmlSchemaDerivationMethod (ob.@Final));
\r
457 WriteObject_XmlSchemaAnnotation (ob.@Annotation, "annotation", "http://www.w3.org/2001/XMLSchema", false, false, true);
\r
458 if (ob.@Content is System.Xml.Schema.XmlSchemaSimpleTypeUnion) {
\r
459 WriteObject_XmlSchemaSimpleTypeUnion (((System.Xml.Schema.XmlSchemaSimpleTypeUnion) ob.@Content), "union", "http://www.w3.org/2001/XMLSchema", false, false, true);
\r
461 else if (ob.@Content is System.Xml.Schema.XmlSchemaSimpleTypeList) {
\r
462 WriteObject_XmlSchemaSimpleTypeList (((System.Xml.Schema.XmlSchemaSimpleTypeList) ob.@Content), "list", "http://www.w3.org/2001/XMLSchema", false, false, true);
\r
464 else if (ob.@Content is System.Xml.Schema.XmlSchemaSimpleTypeRestriction) {
\r
465 WriteObject_XmlSchemaSimpleTypeRestriction (((System.Xml.Schema.XmlSchemaSimpleTypeRestriction) ob.@Content), "restriction", "http://www.w3.org/2001/XMLSchema", false, false, true);
\r
467 if (writeWrappingElem) WriteEndElement (ob);
\r
470 void WriteObject_XmlSchemaAttribute (System.Xml.Schema.XmlSchemaAttribute ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
\r
475 WriteNullTagLiteral(element, namesp);
\r
479 System.Type type = ob.GetType ();
\r
480 if (type == typeof(System.Xml.Schema.XmlSchemaAttribute))
\r
483 throw CreateUnknownTypeException (ob);
\r
486 if (writeWrappingElem) {
\r
487 WriteStartElement (element, namesp, ob);
\r
490 if (needType) WriteXsiType("XmlSchemaAttribute", "http://www.w3.org/2001/XMLSchema");
\r
492 WriteNamespaceDeclarations ((XmlSerializerNamespaces) ob.@Namespaces);
\r
494 ICollection o16 = ob.@UnhandledAttributes;
\r
496 foreach (XmlAttribute o17 in o16)
\r
497 if (o17.NamespaceURI != xmlNamespace)
\r
498 WriteXmlAttribute (o17, ob);
\r
501 WriteAttribute ("id", "", ob.@Id);
\r
502 if (ob.@DefaultValue != null) {
\r
503 WriteAttribute ("default", "", ob.@DefaultValue);
\r
505 if (ob.@FixedValue != null) {
\r
506 WriteAttribute ("fixed", "", ob.@FixedValue);
\r
508 if (ob.@Form != ((System.Xml.Schema.XmlSchemaForm) System.Xml.Schema.XmlSchemaForm.None)) {
\r
509 WriteAttribute ("form", "", GetEnumValue_XmlSchemaForm (ob.@Form));
\r
511 WriteAttribute ("name", "", ob.@Name);
\r
512 WriteAttribute ("ref", "", FromXmlQualifiedName (ob.@RefName));
\r
513 WriteAttribute ("type", "", FromXmlQualifiedName (ob.@SchemaTypeName));
\r
514 if (ob.@Use != ((System.Xml.Schema.XmlSchemaUse) System.Xml.Schema.XmlSchemaUse.None)) {
\r
515 WriteAttribute ("use", "", GetEnumValue_XmlSchemaUse (ob.@Use));
\r
518 WriteObject_XmlSchemaAnnotation (ob.@Annotation, "annotation", "http://www.w3.org/2001/XMLSchema", false, false, true);
\r
519 WriteObject_XmlSchemaSimpleType (ob.@SchemaType, "simpleType", "http://www.w3.org/2001/XMLSchema", false, false, true);
\r
520 if (writeWrappingElem) WriteEndElement (ob);
\r
523 void WriteObject_XmlSchemaAnnotation (System.Xml.Schema.XmlSchemaAnnotation ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
\r
528 WriteNullTagLiteral(element, namesp);
\r
532 System.Type type = ob.GetType ();
\r
533 if (type == typeof(System.Xml.Schema.XmlSchemaAnnotation))
\r
536 throw CreateUnknownTypeException (ob);
\r
539 if (writeWrappingElem) {
\r
540 WriteStartElement (element, namesp, ob);
\r
543 if (needType) WriteXsiType("XmlSchemaAnnotation", "http://www.w3.org/2001/XMLSchema");
\r
545 WriteNamespaceDeclarations ((XmlSerializerNamespaces) ob.@Namespaces);
\r
547 ICollection o18 = ob.@UnhandledAttributes;
\r
549 foreach (XmlAttribute o19 in o18)
\r
550 if (o19.NamespaceURI != xmlNamespace)
\r
551 WriteXmlAttribute (o19, ob);
\r
554 WriteAttribute ("id", "", ob.@Id);
\r
556 if (ob.@Items != null) {
\r
557 for (int n20 = 0; n20 < ob.@Items.Count; n20++) {
\r
558 if (ob.@Items[n20] == null) { }
\r
559 else if (ob.@Items[n20].GetType() == typeof(System.Xml.Schema.XmlSchemaAppInfo)) {
\r
560 WriteObject_XmlSchemaAppInfo (((System.Xml.Schema.XmlSchemaAppInfo) ob.@Items[n20]), "appinfo", "http://www.w3.org/2001/XMLSchema", false, false, true);
\r
562 else if (ob.@Items[n20].GetType() == typeof(System.Xml.Schema.XmlSchemaDocumentation)) {
\r
563 WriteObject_XmlSchemaDocumentation (((System.Xml.Schema.XmlSchemaDocumentation) ob.@Items[n20]), "documentation", "http://www.w3.org/2001/XMLSchema", false, false, true);
\r
565 else throw CreateUnknownTypeException (ob.@Items[n20]);
\r
568 if (writeWrappingElem) WriteEndElement (ob);
\r
571 void WriteObject_XmlSchemaAttributeGroup (System.Xml.Schema.XmlSchemaAttributeGroup ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
\r
576 WriteNullTagLiteral(element, namesp);
\r
580 System.Type type = ob.GetType ();
\r
581 if (type == typeof(System.Xml.Schema.XmlSchemaAttributeGroup))
\r
584 throw CreateUnknownTypeException (ob);
\r
587 if (writeWrappingElem) {
\r
588 WriteStartElement (element, namesp, ob);
\r
591 if (needType) WriteXsiType("XmlSchemaAttributeGroup", "http://www.w3.org/2001/XMLSchema");
\r
593 WriteNamespaceDeclarations ((XmlSerializerNamespaces) ob.@Namespaces);
\r
595 ICollection o21 = ob.@UnhandledAttributes;
\r
597 foreach (XmlAttribute o22 in o21)
\r
598 if (o22.NamespaceURI != xmlNamespace)
\r
599 WriteXmlAttribute (o22, ob);
\r
602 WriteAttribute ("id", "", ob.@Id);
\r
603 WriteAttribute ("name", "", ob.@Name);
\r
605 WriteObject_XmlSchemaAnnotation (ob.@Annotation, "annotation", "http://www.w3.org/2001/XMLSchema", false, false, true);
\r
606 if (ob.@Attributes != null) {
\r
607 for (int n23 = 0; n23 < ob.@Attributes.Count; n23++) {
\r
608 if (ob.@Attributes[n23] == null) { }
\r
609 else if (ob.@Attributes[n23].GetType() == typeof(System.Xml.Schema.XmlSchemaAttribute)) {
\r
610 WriteObject_XmlSchemaAttribute (((System.Xml.Schema.XmlSchemaAttribute) ob.@Attributes[n23]), "attribute", "http://www.w3.org/2001/XMLSchema", false, false, true);
\r
612 else if (ob.@Attributes[n23].GetType() == typeof(System.Xml.Schema.XmlSchemaAttributeGroupRef)) {
\r
613 WriteObject_XmlSchemaAttributeGroupRef (((System.Xml.Schema.XmlSchemaAttributeGroupRef) ob.@Attributes[n23]), "attributeGroup", "http://www.w3.org/2001/XMLSchema", false, false, true);
\r
615 else throw CreateUnknownTypeException (ob.@Attributes[n23]);
\r
618 WriteObject_XmlSchemaAnyAttribute (ob.@AnyAttribute, "anyAttribute", "http://www.w3.org/2001/XMLSchema", false, false, true);
\r
619 if (writeWrappingElem) WriteEndElement (ob);
\r
622 void WriteObject_XmlSchemaGroup (System.Xml.Schema.XmlSchemaGroup ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
\r
627 WriteNullTagLiteral(element, namesp);
\r
631 System.Type type = ob.GetType ();
\r
632 if (type == typeof(System.Xml.Schema.XmlSchemaGroup))
\r
635 throw CreateUnknownTypeException (ob);
\r
638 if (writeWrappingElem) {
\r
639 WriteStartElement (element, namesp, ob);
\r
642 if (needType) WriteXsiType("XmlSchemaGroup", "http://www.w3.org/2001/XMLSchema");
\r
644 WriteNamespaceDeclarations ((XmlSerializerNamespaces) ob.@Namespaces);
\r
646 ICollection o24 = ob.@UnhandledAttributes;
\r
648 foreach (XmlAttribute o25 in o24)
\r
649 if (o25.NamespaceURI != xmlNamespace)
\r
650 WriteXmlAttribute (o25, ob);
\r
653 WriteAttribute ("id", "", ob.@Id);
\r
654 WriteAttribute ("name", "", ob.@Name);
\r
656 WriteObject_XmlSchemaAnnotation (ob.@Annotation, "annotation", "http://www.w3.org/2001/XMLSchema", false, false, true);
\r
657 if (ob.@Particle is System.Xml.Schema.XmlSchemaSequence) {
\r
658 WriteObject_XmlSchemaSequence (((System.Xml.Schema.XmlSchemaSequence) ob.@Particle), "sequence", "http://www.w3.org/2001/XMLSchema", false, false, true);
\r
660 else if (ob.@Particle is System.Xml.Schema.XmlSchemaChoice) {
\r
661 WriteObject_XmlSchemaChoice (((System.Xml.Schema.XmlSchemaChoice) ob.@Particle), "choice", "http://www.w3.org/2001/XMLSchema", false, false, true);
\r
663 else if (ob.@Particle is System.Xml.Schema.XmlSchemaAll) {
\r
664 WriteObject_XmlSchemaAll (((System.Xml.Schema.XmlSchemaAll) ob.@Particle), "all", "http://www.w3.org/2001/XMLSchema", false, false, true);
\r
666 if (writeWrappingElem) WriteEndElement (ob);
\r
669 void WriteObject_XmlSchemaComplexType (System.Xml.Schema.XmlSchemaComplexType ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
\r
674 WriteNullTagLiteral(element, namesp);
\r
678 System.Type type = ob.GetType ();
\r
679 if (type == typeof(System.Xml.Schema.XmlSchemaComplexType))
\r
682 throw CreateUnknownTypeException (ob);
\r
685 if (writeWrappingElem) {
\r
686 WriteStartElement (element, namesp, ob);
\r
689 if (needType) WriteXsiType("XmlSchemaComplexType", "http://www.w3.org/2001/XMLSchema");
\r
691 WriteNamespaceDeclarations ((XmlSerializerNamespaces) ob.@Namespaces);
\r
693 ICollection o26 = ob.@UnhandledAttributes;
\r
695 foreach (XmlAttribute o27 in o26)
\r
696 if (o27.NamespaceURI != xmlNamespace)
\r
697 WriteXmlAttribute (o27, ob);
\r
700 WriteAttribute ("id", "", ob.@Id);
\r
701 WriteAttribute ("name", "", ob.@Name);
\r
702 if (ob.@Final != ((System.Xml.Schema.XmlSchemaDerivationMethod) System.Xml.Schema.XmlSchemaDerivationMethod.None)) {
\r
703 WriteAttribute ("final", "", GetEnumValue_XmlSchemaDerivationMethod (ob.@Final));
\r
705 if (ob.@IsAbstract != false) {
\r
706 WriteAttribute ("abstract", "", (ob.@IsAbstract?"true":"false"));
\r
708 if (ob.@Block != ((System.Xml.Schema.XmlSchemaDerivationMethod) System.Xml.Schema.XmlSchemaDerivationMethod.None)) {
\r
709 WriteAttribute ("block", "", GetEnumValue_XmlSchemaDerivationMethod (ob.@Block));
\r
711 if (ob.@IsMixed != false) {
\r
712 WriteAttribute ("mixed", "", (ob.@IsMixed?"true":"false"));
\r
715 WriteObject_XmlSchemaAnnotation (ob.@Annotation, "annotation", "http://www.w3.org/2001/XMLSchema", false, false, true);
\r
716 if (ob.@ContentModel is System.Xml.Schema.XmlSchemaComplexContent) {
\r
717 WriteObject_XmlSchemaComplexContent (((System.Xml.Schema.XmlSchemaComplexContent) ob.@ContentModel), "complexContent", "http://www.w3.org/2001/XMLSchema", false, false, true);
\r
719 else if (ob.@ContentModel is System.Xml.Schema.XmlSchemaSimpleContent) {
\r
720 WriteObject_XmlSchemaSimpleContent (((System.Xml.Schema.XmlSchemaSimpleContent) ob.@ContentModel), "simpleContent", "http://www.w3.org/2001/XMLSchema", false, false, true);
\r
722 if (ob.@Particle is System.Xml.Schema.XmlSchemaAll) {
\r
723 WriteObject_XmlSchemaAll (((System.Xml.Schema.XmlSchemaAll) ob.@Particle), "all", "http://www.w3.org/2001/XMLSchema", false, false, true);
\r
725 else if (ob.@Particle is System.Xml.Schema.XmlSchemaGroupRef) {
\r
726 WriteObject_XmlSchemaGroupRef (((System.Xml.Schema.XmlSchemaGroupRef) ob.@Particle), "group", "http://www.w3.org/2001/XMLSchema", false, false, true);
\r
728 else if (ob.@Particle is System.Xml.Schema.XmlSchemaSequence) {
\r
729 WriteObject_XmlSchemaSequence (((System.Xml.Schema.XmlSchemaSequence) ob.@Particle), "sequence", "http://www.w3.org/2001/XMLSchema", false, false, true);
\r
731 else if (ob.@Particle is System.Xml.Schema.XmlSchemaChoice) {
\r
732 WriteObject_XmlSchemaChoice (((System.Xml.Schema.XmlSchemaChoice) ob.@Particle), "choice", "http://www.w3.org/2001/XMLSchema", false, false, true);
\r
734 if (ob.@Attributes != null) {
\r
735 for (int n28 = 0; n28 < ob.@Attributes.Count; n28++) {
\r
736 if (ob.@Attributes[n28] == null) { }
\r
737 else if (ob.@Attributes[n28].GetType() == typeof(System.Xml.Schema.XmlSchemaAttributeGroupRef)) {
\r
738 WriteObject_XmlSchemaAttributeGroupRef (((System.Xml.Schema.XmlSchemaAttributeGroupRef) ob.@Attributes[n28]), "attributeGroup", "http://www.w3.org/2001/XMLSchema", false, false, true);
\r
740 else if (ob.@Attributes[n28].GetType() == typeof(System.Xml.Schema.XmlSchemaAttribute)) {
\r
741 WriteObject_XmlSchemaAttribute (((System.Xml.Schema.XmlSchemaAttribute) ob.@Attributes[n28]), "attribute", "http://www.w3.org/2001/XMLSchema", false, false, true);
\r
743 else throw CreateUnknownTypeException (ob.@Attributes[n28]);
\r
746 WriteObject_XmlSchemaAnyAttribute (ob.@AnyAttribute, "anyAttribute", "http://www.w3.org/2001/XMLSchema", false, false, true);
\r
747 if (writeWrappingElem) WriteEndElement (ob);
\r
750 void WriteObject_XmlSchemaNotation (System.Xml.Schema.XmlSchemaNotation ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
\r
755 WriteNullTagLiteral(element, namesp);
\r
759 System.Type type = ob.GetType ();
\r
760 if (type == typeof(System.Xml.Schema.XmlSchemaNotation))
\r
763 throw CreateUnknownTypeException (ob);
\r
766 if (writeWrappingElem) {
\r
767 WriteStartElement (element, namesp, ob);
\r
770 if (needType) WriteXsiType("XmlSchemaNotation", "http://www.w3.org/2001/XMLSchema");
\r
772 WriteNamespaceDeclarations ((XmlSerializerNamespaces) ob.@Namespaces);
\r
774 ICollection o29 = ob.@UnhandledAttributes;
\r
776 foreach (XmlAttribute o30 in o29)
\r
777 if (o30.NamespaceURI != xmlNamespace)
\r
778 WriteXmlAttribute (o30, ob);
\r
781 WriteAttribute ("id", "", ob.@Id);
\r
782 WriteAttribute ("name", "", ob.@Name);
\r
783 WriteAttribute ("public", "", ob.@Public);
\r
784 WriteAttribute ("system", "", ob.@System);
\r
786 WriteObject_XmlSchemaAnnotation (ob.@Annotation, "annotation", "http://www.w3.org/2001/XMLSchema", false, false, true);
\r
787 if (writeWrappingElem) WriteEndElement (ob);
\r
790 void WriteObject_XmlSchemaKeyref (System.Xml.Schema.XmlSchemaKeyref ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
\r
795 WriteNullTagLiteral(element, namesp);
\r
799 System.Type type = ob.GetType ();
\r
800 if (type == typeof(System.Xml.Schema.XmlSchemaKeyref))
\r
803 throw CreateUnknownTypeException (ob);
\r
806 if (writeWrappingElem) {
\r
807 WriteStartElement (element, namesp, ob);
\r
810 if (needType) WriteXsiType("XmlSchemaKeyref", "http://www.w3.org/2001/XMLSchema");
\r
812 WriteNamespaceDeclarations ((XmlSerializerNamespaces) ob.@Namespaces);
\r
814 ICollection o31 = ob.@UnhandledAttributes;
\r
816 foreach (XmlAttribute o32 in o31)
\r
817 if (o32.NamespaceURI != xmlNamespace)
\r
818 WriteXmlAttribute (o32, ob);
\r
821 WriteAttribute ("id", "", ob.@Id);
\r
822 WriteAttribute ("name", "", ob.@Name);
\r
823 WriteAttribute ("refer", "", FromXmlQualifiedName (ob.@Refer));
\r
825 WriteObject_XmlSchemaAnnotation (ob.@Annotation, "annotation", "http://www.w3.org/2001/XMLSchema", false, false, true);
\r
826 WriteObject_XmlSchemaXPath (ob.@Selector, "selector", "http://www.w3.org/2001/XMLSchema", false, false, true);
\r
827 if (ob.@Fields != null) {
\r
828 for (int n33 = 0; n33 < ob.@Fields.Count; n33++) {
\r
829 WriteObject_XmlSchemaXPath (((System.Xml.Schema.XmlSchemaXPath) ob.@Fields[n33]), "field", "http://www.w3.org/2001/XMLSchema", false, false, true);
\r
832 if (writeWrappingElem) WriteEndElement (ob);
\r
835 void WriteObject_XmlSchemaKey (System.Xml.Schema.XmlSchemaKey ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
\r
840 WriteNullTagLiteral(element, namesp);
\r
844 System.Type type = ob.GetType ();
\r
845 if (type == typeof(System.Xml.Schema.XmlSchemaKey))
\r
848 throw CreateUnknownTypeException (ob);
\r
851 if (writeWrappingElem) {
\r
852 WriteStartElement (element, namesp, ob);
\r
855 if (needType) WriteXsiType("XmlSchemaKey", "http://www.w3.org/2001/XMLSchema");
\r
857 WriteNamespaceDeclarations ((XmlSerializerNamespaces) ob.@Namespaces);
\r
859 ICollection o34 = ob.@UnhandledAttributes;
\r
861 foreach (XmlAttribute o35 in o34)
\r
862 if (o35.NamespaceURI != xmlNamespace)
\r
863 WriteXmlAttribute (o35, ob);
\r
866 WriteAttribute ("id", "", ob.@Id);
\r
867 WriteAttribute ("name", "", ob.@Name);
\r
869 WriteObject_XmlSchemaAnnotation (ob.@Annotation, "annotation", "http://www.w3.org/2001/XMLSchema", false, false, true);
\r
870 WriteObject_XmlSchemaXPath (ob.@Selector, "selector", "http://www.w3.org/2001/XMLSchema", false, false, true);
\r
871 if (ob.@Fields != null) {
\r
872 for (int n36 = 0; n36 < ob.@Fields.Count; n36++) {
\r
873 WriteObject_XmlSchemaXPath (((System.Xml.Schema.XmlSchemaXPath) ob.@Fields[n36]), "field", "http://www.w3.org/2001/XMLSchema", false, false, true);
\r
876 if (writeWrappingElem) WriteEndElement (ob);
\r
879 void WriteObject_XmlSchemaUnique (System.Xml.Schema.XmlSchemaUnique ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
\r
884 WriteNullTagLiteral(element, namesp);
\r
888 System.Type type = ob.GetType ();
\r
889 if (type == typeof(System.Xml.Schema.XmlSchemaUnique))
\r
892 throw CreateUnknownTypeException (ob);
\r
895 if (writeWrappingElem) {
\r
896 WriteStartElement (element, namesp, ob);
\r
899 if (needType) WriteXsiType("XmlSchemaUnique", "http://www.w3.org/2001/XMLSchema");
\r
901 WriteNamespaceDeclarations ((XmlSerializerNamespaces) ob.@Namespaces);
\r
903 ICollection o37 = ob.@UnhandledAttributes;
\r
905 foreach (XmlAttribute o38 in o37)
\r
906 if (o38.NamespaceURI != xmlNamespace)
\r
907 WriteXmlAttribute (o38, ob);
\r
910 WriteAttribute ("id", "", ob.@Id);
\r
911 WriteAttribute ("name", "", ob.@Name);
\r
913 WriteObject_XmlSchemaAnnotation (ob.@Annotation, "annotation", "http://www.w3.org/2001/XMLSchema", false, false, true);
\r
914 WriteObject_XmlSchemaXPath (ob.@Selector, "selector", "http://www.w3.org/2001/XMLSchema", false, false, true);
\r
915 if (ob.@Fields != null) {
\r
916 for (int n39 = 0; n39 < ob.@Fields.Count; n39++) {
\r
917 WriteObject_XmlSchemaXPath (((System.Xml.Schema.XmlSchemaXPath) ob.@Fields[n39]), "field", "http://www.w3.org/2001/XMLSchema", false, false, true);
\r
920 if (writeWrappingElem) WriteEndElement (ob);
\r
923 void WriteObject_XmlSchemaSimpleTypeUnion (System.Xml.Schema.XmlSchemaSimpleTypeUnion ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
\r
928 WriteNullTagLiteral(element, namesp);
\r
932 System.Type type = ob.GetType ();
\r
933 if (type == typeof(System.Xml.Schema.XmlSchemaSimpleTypeUnion))
\r
936 throw CreateUnknownTypeException (ob);
\r
939 if (writeWrappingElem) {
\r
940 WriteStartElement (element, namesp, ob);
\r
943 if (needType) WriteXsiType("XmlSchemaSimpleTypeUnion", "http://www.w3.org/2001/XMLSchema");
\r
945 WriteNamespaceDeclarations ((XmlSerializerNamespaces) ob.@Namespaces);
\r
947 ICollection o40 = ob.@UnhandledAttributes;
\r
949 foreach (XmlAttribute o41 in o40)
\r
950 if (o41.NamespaceURI != xmlNamespace)
\r
951 WriteXmlAttribute (o41, ob);
\r
954 WriteAttribute ("id", "", ob.@Id);
\r
956 if (ob.@MemberTypes != null) {
\r
957 System.Text.StringBuilder s43 = new System.Text.StringBuilder();
\r
958 for (int n44 = 0; n44 < ob.@MemberTypes.Length; n44++) {
\r
959 s43.Append (FromXmlQualifiedName (ob.@MemberTypes[n44])).Append (" ");
\r
961 s42 = s43.ToString ().Trim ();
\r
963 WriteAttribute ("memberTypes", "", s42);
\r
965 WriteObject_XmlSchemaAnnotation (ob.@Annotation, "annotation", "http://www.w3.org/2001/XMLSchema", false, false, true);
\r
966 if (ob.@BaseTypes != null) {
\r
967 for (int n45 = 0; n45 < ob.@BaseTypes.Count; n45++) {
\r
968 WriteObject_XmlSchemaSimpleType (((System.Xml.Schema.XmlSchemaSimpleType) ob.@BaseTypes[n45]), "simpleType", "http://www.w3.org/2001/XMLSchema", false, false, true);
\r
971 if (writeWrappingElem) WriteEndElement (ob);
\r
974 void WriteObject_XmlSchemaSimpleTypeList (System.Xml.Schema.XmlSchemaSimpleTypeList ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
\r
979 WriteNullTagLiteral(element, namesp);
\r
983 System.Type type = ob.GetType ();
\r
984 if (type == typeof(System.Xml.Schema.XmlSchemaSimpleTypeList))
\r
987 throw CreateUnknownTypeException (ob);
\r
990 if (writeWrappingElem) {
\r
991 WriteStartElement (element, namesp, ob);
\r
994 if (needType) WriteXsiType("XmlSchemaSimpleTypeList", "http://www.w3.org/2001/XMLSchema");
\r
996 WriteNamespaceDeclarations ((XmlSerializerNamespaces) ob.@Namespaces);
\r
998 ICollection o46 = ob.@UnhandledAttributes;
\r
1000 foreach (XmlAttribute o47 in o46)
\r
1001 if (o47.NamespaceURI != xmlNamespace)
\r
1002 WriteXmlAttribute (o47, ob);
\r
1005 WriteAttribute ("id", "", ob.@Id);
\r
1006 WriteAttribute ("itemType", "", FromXmlQualifiedName (ob.@ItemTypeName));
\r
1008 WriteObject_XmlSchemaAnnotation (ob.@Annotation, "annotation", "http://www.w3.org/2001/XMLSchema", false, false, true);
\r
1009 WriteObject_XmlSchemaSimpleType (ob.@ItemType, "simpleType", "http://www.w3.org/2001/XMLSchema", false, false, true);
\r
1010 if (writeWrappingElem) WriteEndElement (ob);
\r
1013 void WriteObject_XmlSchemaSimpleTypeRestriction (System.Xml.Schema.XmlSchemaSimpleTypeRestriction ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
\r
1018 WriteNullTagLiteral(element, namesp);
\r
1022 System.Type type = ob.GetType ();
\r
1023 if (type == typeof(System.Xml.Schema.XmlSchemaSimpleTypeRestriction))
\r
1026 throw CreateUnknownTypeException (ob);
\r
1029 if (writeWrappingElem) {
\r
1030 WriteStartElement (element, namesp, ob);
\r
1033 if (needType) WriteXsiType("XmlSchemaSimpleTypeRestriction", "http://www.w3.org/2001/XMLSchema");
\r
1035 WriteNamespaceDeclarations ((XmlSerializerNamespaces) ob.@Namespaces);
\r
1037 ICollection o48 = ob.@UnhandledAttributes;
\r
1038 if (o48 != null) {
\r
1039 foreach (XmlAttribute o49 in o48)
\r
1040 if (o49.NamespaceURI != xmlNamespace)
\r
1041 WriteXmlAttribute (o49, ob);
\r
1044 WriteAttribute ("id", "", ob.@Id);
\r
1045 WriteAttribute ("base", "", FromXmlQualifiedName (ob.@BaseTypeName));
\r
1047 WriteObject_XmlSchemaAnnotation (ob.@Annotation, "annotation", "http://www.w3.org/2001/XMLSchema", false, false, true);
\r
1048 WriteObject_XmlSchemaSimpleType (ob.@BaseType, "simpleType", "http://www.w3.org/2001/XMLSchema", false, false, true);
\r
1049 if (ob.@Facets != null) {
\r
1050 for (int n50 = 0; n50 < ob.@Facets.Count; n50++) {
\r
1051 if (ob.@Facets[n50] == null) { }
\r
1052 else if (ob.@Facets[n50].GetType() == typeof(System.Xml.Schema.XmlSchemaMaxLengthFacet)) {
\r
1053 WriteObject_XmlSchemaMaxLengthFacet (((System.Xml.Schema.XmlSchemaMaxLengthFacet) ob.@Facets[n50]), "maxLength", "http://www.w3.org/2001/XMLSchema", false, false, true);
\r
1055 else if (ob.@Facets[n50].GetType() == typeof(System.Xml.Schema.XmlSchemaMinLengthFacet)) {
\r
1056 WriteObject_XmlSchemaMinLengthFacet (((System.Xml.Schema.XmlSchemaMinLengthFacet) ob.@Facets[n50]), "minLength", "http://www.w3.org/2001/XMLSchema", false, false, true);
\r
1058 else if (ob.@Facets[n50].GetType() == typeof(System.Xml.Schema.XmlSchemaLengthFacet)) {
\r
1059 WriteObject_XmlSchemaLengthFacet (((System.Xml.Schema.XmlSchemaLengthFacet) ob.@Facets[n50]), "length", "http://www.w3.org/2001/XMLSchema", false, false, true);
\r
1061 else if (ob.@Facets[n50].GetType() == typeof(System.Xml.Schema.XmlSchemaFractionDigitsFacet)) {
\r
1062 WriteObject_XmlSchemaFractionDigitsFacet (((System.Xml.Schema.XmlSchemaFractionDigitsFacet) ob.@Facets[n50]), "fractionDigits", "http://www.w3.org/2001/XMLSchema", false, false, true);
\r
1064 else if (ob.@Facets[n50].GetType() == typeof(System.Xml.Schema.XmlSchemaMaxInclusiveFacet)) {
\r
1065 WriteObject_XmlSchemaMaxInclusiveFacet (((System.Xml.Schema.XmlSchemaMaxInclusiveFacet) ob.@Facets[n50]), "maxInclusive", "http://www.w3.org/2001/XMLSchema", false, false, true);
\r
1067 else if (ob.@Facets[n50].GetType() == typeof(System.Xml.Schema.XmlSchemaMaxExclusiveFacet)) {
\r
1068 WriteObject_XmlSchemaMaxExclusiveFacet (((System.Xml.Schema.XmlSchemaMaxExclusiveFacet) ob.@Facets[n50]), "maxExclusive", "http://www.w3.org/2001/XMLSchema", false, false, true);
\r
1070 else if (ob.@Facets[n50].GetType() == typeof(System.Xml.Schema.XmlSchemaMinExclusiveFacet)) {
\r
1071 WriteObject_XmlSchemaMinExclusiveFacet (((System.Xml.Schema.XmlSchemaMinExclusiveFacet) ob.@Facets[n50]), "minExclusive", "http://www.w3.org/2001/XMLSchema", false, false, true);
\r
1073 else if (ob.@Facets[n50].GetType() == typeof(System.Xml.Schema.XmlSchemaEnumerationFacet)) {
\r
1074 WriteObject_XmlSchemaEnumerationFacet (((System.Xml.Schema.XmlSchemaEnumerationFacet) ob.@Facets[n50]), "enumeration", "http://www.w3.org/2001/XMLSchema", false, false, true);
\r
1076 else if (ob.@Facets[n50].GetType() == typeof(System.Xml.Schema.XmlSchemaTotalDigitsFacet)) {
\r
1077 WriteObject_XmlSchemaTotalDigitsFacet (((System.Xml.Schema.XmlSchemaTotalDigitsFacet) ob.@Facets[n50]), "totalDigits", "http://www.w3.org/2001/XMLSchema", false, false, true);
\r
1079 else if (ob.@Facets[n50].GetType() == typeof(System.Xml.Schema.XmlSchemaMinInclusiveFacet)) {
\r
1080 WriteObject_XmlSchemaMinInclusiveFacet (((System.Xml.Schema.XmlSchemaMinInclusiveFacet) ob.@Facets[n50]), "minInclusive", "http://www.w3.org/2001/XMLSchema", false, false, true);
\r
1082 else if (ob.@Facets[n50].GetType() == typeof(System.Xml.Schema.XmlSchemaWhiteSpaceFacet)) {
\r
1083 WriteObject_XmlSchemaWhiteSpaceFacet (((System.Xml.Schema.XmlSchemaWhiteSpaceFacet) ob.@Facets[n50]), "whiteSpace", "http://www.w3.org/2001/XMLSchema", false, false, true);
\r
1085 else if (ob.@Facets[n50].GetType() == typeof(System.Xml.Schema.XmlSchemaPatternFacet)) {
\r
1086 WriteObject_XmlSchemaPatternFacet (((System.Xml.Schema.XmlSchemaPatternFacet) ob.@Facets[n50]), "pattern", "http://www.w3.org/2001/XMLSchema", false, false, true);
\r
1088 else throw CreateUnknownTypeException (ob.@Facets[n50]);
\r
1091 if (writeWrappingElem) WriteEndElement (ob);
\r
1094 void WriteObject_XmlSchemaUse (System.Xml.Schema.XmlSchemaUse ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
\r
1096 System.Type type = ob.GetType ();
\r
1097 if (type == typeof(System.Xml.Schema.XmlSchemaUse))
\r
1100 throw CreateUnknownTypeException (ob);
\r
1103 if (writeWrappingElem) {
\r
1104 WriteStartElement (element, namesp, ob);
\r
1107 if (needType) WriteXsiType("XmlSchemaUse", "");
\r
1109 Writer.WriteString (GetEnumValue_XmlSchemaUse (ob));
\r
1110 if (writeWrappingElem) WriteEndElement (ob);
\r
1113 string GetEnumValue_XmlSchemaUse (System.Xml.Schema.XmlSchemaUse val)
\r
1117 case System.Xml.Schema.XmlSchemaUse.Optional: return "optional";
\r
1118 case System.Xml.Schema.XmlSchemaUse.Prohibited: return "prohibited";
\r
1119 case System.Xml.Schema.XmlSchemaUse.Required: return "required";
\r
1120 default: return ((long)val).ToString(CultureInfo.InvariantCulture);
\r
1124 void WriteObject_XmlSchemaAppInfo (System.Xml.Schema.XmlSchemaAppInfo ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
\r
1129 WriteNullTagLiteral(element, namesp);
\r
1133 System.Type type = ob.GetType ();
\r
1134 if (type == typeof(System.Xml.Schema.XmlSchemaAppInfo))
\r
1137 throw CreateUnknownTypeException (ob);
\r
1140 if (writeWrappingElem) {
\r
1141 WriteStartElement (element, namesp, ob);
\r
1144 if (needType) WriteXsiType("XmlSchemaAppInfo", "http://www.w3.org/2001/XMLSchema");
\r
1146 WriteNamespaceDeclarations ((XmlSerializerNamespaces) ob.@Namespaces);
\r
1148 WriteAttribute ("source", "", ob.@Source);
\r
1150 if (ob.@Markup != null) {
\r
1151 foreach (XmlNode o51 in ob.@Markup) {
\r
1153 if (o52 is XmlElement) {
\r
1154 WriteElementLiteral (o52, "", "", false, true);
1155 } else o52.WriteTo (Writer);
\r
1158 if (writeWrappingElem) WriteEndElement (ob);
\r
1161 void WriteObject_XmlSchemaDocumentation (System.Xml.Schema.XmlSchemaDocumentation ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
\r
1166 WriteNullTagLiteral(element, namesp);
\r
1170 System.Type type = ob.GetType ();
\r
1171 if (type == typeof(System.Xml.Schema.XmlSchemaDocumentation))
\r
1174 throw CreateUnknownTypeException (ob);
\r
1177 if (writeWrappingElem) {
\r
1178 WriteStartElement (element, namesp, ob);
\r
1181 if (needType) WriteXsiType("XmlSchemaDocumentation", "http://www.w3.org/2001/XMLSchema");
\r
1183 WriteNamespaceDeclarations ((XmlSerializerNamespaces) ob.@Namespaces);
\r
1185 WriteAttribute ("source", "", ob.@Source);
\r
1186 WriteAttribute ("xml:lang", "", ob.@Language);
\r
1188 if (ob.@Markup != null) {
\r
1189 foreach (XmlNode o53 in ob.@Markup) {
\r
1191 if (o54 is XmlElement) {
\r
1192 WriteElementLiteral (o54, "", "", false, true);
1193 } else o54.WriteTo (Writer);
\r
1196 if (writeWrappingElem) WriteEndElement (ob);
\r
1199 void WriteObject_XmlSchemaAttributeGroupRef (System.Xml.Schema.XmlSchemaAttributeGroupRef ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
\r
1204 WriteNullTagLiteral(element, namesp);
\r
1208 System.Type type = ob.GetType ();
\r
1209 if (type == typeof(System.Xml.Schema.XmlSchemaAttributeGroupRef))
\r
1212 throw CreateUnknownTypeException (ob);
\r
1215 if (writeWrappingElem) {
\r
1216 WriteStartElement (element, namesp, ob);
\r
1219 if (needType) WriteXsiType("XmlSchemaAttributeGroupRef", "http://www.w3.org/2001/XMLSchema");
\r
1221 WriteNamespaceDeclarations ((XmlSerializerNamespaces) ob.@Namespaces);
\r
1223 ICollection o55 = ob.@UnhandledAttributes;
\r
1224 if (o55 != null) {
\r
1225 foreach (XmlAttribute o56 in o55)
\r
1226 if (o56.NamespaceURI != xmlNamespace)
\r
1227 WriteXmlAttribute (o56, ob);
\r
1230 WriteAttribute ("id", "", ob.@Id);
\r
1231 WriteAttribute ("ref", "", FromXmlQualifiedName (ob.@RefName));
\r
1233 WriteObject_XmlSchemaAnnotation (ob.@Annotation, "annotation", "http://www.w3.org/2001/XMLSchema", false, false, true);
\r
1234 if (writeWrappingElem) WriteEndElement (ob);
\r
1237 void WriteObject_XmlSchemaAnyAttribute (System.Xml.Schema.XmlSchemaAnyAttribute ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
\r
1242 WriteNullTagLiteral(element, namesp);
\r
1246 System.Type type = ob.GetType ();
\r
1247 if (type == typeof(System.Xml.Schema.XmlSchemaAnyAttribute))
\r
1250 throw CreateUnknownTypeException (ob);
\r
1253 if (writeWrappingElem) {
\r
1254 WriteStartElement (element, namesp, ob);
\r
1257 if (needType) WriteXsiType("XmlSchemaAnyAttribute", "http://www.w3.org/2001/XMLSchema");
\r
1259 WriteNamespaceDeclarations ((XmlSerializerNamespaces) ob.@Namespaces);
\r
1261 ICollection o57 = ob.@UnhandledAttributes;
\r
1262 if (o57 != null) {
\r
1263 foreach (XmlAttribute o58 in o57)
\r
1264 if (o58.NamespaceURI != xmlNamespace)
\r
1265 WriteXmlAttribute (o58, ob);
\r
1268 WriteAttribute ("id", "", ob.@Id);
\r
1269 WriteAttribute ("namespace", "", ob.@Namespace);
\r
1270 if (ob.@ProcessContents != ((System.Xml.Schema.XmlSchemaContentProcessing) System.Xml.Schema.XmlSchemaContentProcessing.None)) {
\r
1271 WriteAttribute ("processContents", "", GetEnumValue_XmlSchemaContentProcessing (ob.@ProcessContents));
\r
1274 WriteObject_XmlSchemaAnnotation (ob.@Annotation, "annotation", "http://www.w3.org/2001/XMLSchema", false, false, true);
\r
1275 if (writeWrappingElem) WriteEndElement (ob);
\r
1278 void WriteObject_XmlSchemaSequence (System.Xml.Schema.XmlSchemaSequence ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
\r
1283 WriteNullTagLiteral(element, namesp);
\r
1287 System.Type type = ob.GetType ();
\r
1288 if (type == typeof(System.Xml.Schema.XmlSchemaSequence))
\r
1291 throw CreateUnknownTypeException (ob);
\r
1294 if (writeWrappingElem) {
\r
1295 WriteStartElement (element, namesp, ob);
\r
1298 if (needType) WriteXsiType("XmlSchemaSequence", "http://www.w3.org/2001/XMLSchema");
\r
1300 WriteNamespaceDeclarations ((XmlSerializerNamespaces) ob.@Namespaces);
\r
1302 ICollection o59 = ob.@UnhandledAttributes;
\r
1303 if (o59 != null) {
\r
1304 foreach (XmlAttribute o60 in o59)
\r
1305 if (o60.NamespaceURI != xmlNamespace)
\r
1306 WriteXmlAttribute (o60, ob);
\r
1309 WriteAttribute ("id", "", ob.@Id);
\r
1310 WriteAttribute ("minOccurs", "", ob.@MinOccursString);
\r
1311 WriteAttribute ("maxOccurs", "", ob.@MaxOccursString);
\r
1313 WriteObject_XmlSchemaAnnotation (ob.@Annotation, "annotation", "http://www.w3.org/2001/XMLSchema", false, false, true);
\r
1314 if (ob.@Items != null) {
\r
1315 for (int n61 = 0; n61 < ob.@Items.Count; n61++) {
\r
1316 if (ob.@Items[n61] == null) { }
\r
1317 else if (ob.@Items[n61].GetType() == typeof(System.Xml.Schema.XmlSchemaSequence)) {
\r
1318 WriteObject_XmlSchemaSequence (((System.Xml.Schema.XmlSchemaSequence) ob.@Items[n61]), "sequence", "http://www.w3.org/2001/XMLSchema", false, false, true);
\r
1320 else if (ob.@Items[n61].GetType() == typeof(System.Xml.Schema.XmlSchemaChoice)) {
\r
1321 WriteObject_XmlSchemaChoice (((System.Xml.Schema.XmlSchemaChoice) ob.@Items[n61]), "choice", "http://www.w3.org/2001/XMLSchema", false, false, true);
\r
1323 else if (ob.@Items[n61].GetType() == typeof(System.Xml.Schema.XmlSchemaGroupRef)) {
\r
1324 WriteObject_XmlSchemaGroupRef (((System.Xml.Schema.XmlSchemaGroupRef) ob.@Items[n61]), "group", "http://www.w3.org/2001/XMLSchema", false, false, true);
\r
1326 else if (ob.@Items[n61].GetType() == typeof(System.Xml.Schema.XmlSchemaElement)) {
\r
1327 WriteObject_XmlSchemaElement (((System.Xml.Schema.XmlSchemaElement) ob.@Items[n61]), "element", "http://www.w3.org/2001/XMLSchema", false, false, true);
\r
1329 else if (ob.@Items[n61].GetType() == typeof(System.Xml.Schema.XmlSchemaAny)) {
\r
1330 WriteObject_XmlSchemaAny (((System.Xml.Schema.XmlSchemaAny) ob.@Items[n61]), "any", "http://www.w3.org/2001/XMLSchema", false, false, true);
\r
1332 else throw CreateUnknownTypeException (ob.@Items[n61]);
\r
1335 if (writeWrappingElem) WriteEndElement (ob);
\r
1338 void WriteObject_XmlSchemaChoice (System.Xml.Schema.XmlSchemaChoice ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
\r
1343 WriteNullTagLiteral(element, namesp);
\r
1347 System.Type type = ob.GetType ();
\r
1348 if (type == typeof(System.Xml.Schema.XmlSchemaChoice))
\r
1351 throw CreateUnknownTypeException (ob);
\r
1354 if (writeWrappingElem) {
\r
1355 WriteStartElement (element, namesp, ob);
\r
1358 if (needType) WriteXsiType("XmlSchemaChoice", "http://www.w3.org/2001/XMLSchema");
\r
1360 WriteNamespaceDeclarations ((XmlSerializerNamespaces) ob.@Namespaces);
\r
1362 ICollection o62 = ob.@UnhandledAttributes;
\r
1363 if (o62 != null) {
\r
1364 foreach (XmlAttribute o63 in o62)
\r
1365 if (o63.NamespaceURI != xmlNamespace)
\r
1366 WriteXmlAttribute (o63, ob);
\r
1369 WriteAttribute ("id", "", ob.@Id);
\r
1370 WriteAttribute ("minOccurs", "", ob.@MinOccursString);
\r
1371 WriteAttribute ("maxOccurs", "", ob.@MaxOccursString);
\r
1373 WriteObject_XmlSchemaAnnotation (ob.@Annotation, "annotation", "http://www.w3.org/2001/XMLSchema", false, false, true);
\r
1374 if (ob.@Items != null) {
\r
1375 for (int n64 = 0; n64 < ob.@Items.Count; n64++) {
\r
1376 if (ob.@Items[n64] == null) { }
\r
1377 else if (ob.@Items[n64].GetType() == typeof(System.Xml.Schema.XmlSchemaGroupRef)) {
\r
1378 WriteObject_XmlSchemaGroupRef (((System.Xml.Schema.XmlSchemaGroupRef) ob.@Items[n64]), "group", "http://www.w3.org/2001/XMLSchema", false, false, true);
\r
1380 else if (ob.@Items[n64].GetType() == typeof(System.Xml.Schema.XmlSchemaElement)) {
\r
1381 WriteObject_XmlSchemaElement (((System.Xml.Schema.XmlSchemaElement) ob.@Items[n64]), "element", "http://www.w3.org/2001/XMLSchema", false, false, true);
\r
1383 else if (ob.@Items[n64].GetType() == typeof(System.Xml.Schema.XmlSchemaAny)) {
\r
1384 WriteObject_XmlSchemaAny (((System.Xml.Schema.XmlSchemaAny) ob.@Items[n64]), "any", "http://www.w3.org/2001/XMLSchema", false, false, true);
\r
1386 else if (ob.@Items[n64].GetType() == typeof(System.Xml.Schema.XmlSchemaSequence)) {
\r
1387 WriteObject_XmlSchemaSequence (((System.Xml.Schema.XmlSchemaSequence) ob.@Items[n64]), "sequence", "http://www.w3.org/2001/XMLSchema", false, false, true);
\r
1389 else if (ob.@Items[n64].GetType() == typeof(System.Xml.Schema.XmlSchemaChoice)) {
\r
1390 WriteObject_XmlSchemaChoice (((System.Xml.Schema.XmlSchemaChoice) ob.@Items[n64]), "choice", "http://www.w3.org/2001/XMLSchema", false, false, true);
\r
1392 else throw CreateUnknownTypeException (ob.@Items[n64]);
\r
1395 if (writeWrappingElem) WriteEndElement (ob);
\r
1398 void WriteObject_XmlSchemaAll (System.Xml.Schema.XmlSchemaAll ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
\r
1403 WriteNullTagLiteral(element, namesp);
\r
1407 System.Type type = ob.GetType ();
\r
1408 if (type == typeof(System.Xml.Schema.XmlSchemaAll))
\r
1411 throw CreateUnknownTypeException (ob);
\r
1414 if (writeWrappingElem) {
\r
1415 WriteStartElement (element, namesp, ob);
\r
1418 if (needType) WriteXsiType("XmlSchemaAll", "http://www.w3.org/2001/XMLSchema");
\r
1420 WriteNamespaceDeclarations ((XmlSerializerNamespaces) ob.@Namespaces);
\r
1422 ICollection o65 = ob.@UnhandledAttributes;
\r
1423 if (o65 != null) {
\r
1424 foreach (XmlAttribute o66 in o65)
\r
1425 if (o66.NamespaceURI != xmlNamespace)
\r
1426 WriteXmlAttribute (o66, ob);
\r
1429 WriteAttribute ("id", "", ob.@Id);
\r
1430 WriteAttribute ("minOccurs", "", ob.@MinOccursString);
\r
1431 WriteAttribute ("maxOccurs", "", ob.@MaxOccursString);
\r
1433 WriteObject_XmlSchemaAnnotation (ob.@Annotation, "annotation", "http://www.w3.org/2001/XMLSchema", false, false, true);
\r
1434 if (ob.@Items != null) {
\r
1435 for (int n67 = 0; n67 < ob.@Items.Count; n67++) {
\r
1436 WriteObject_XmlSchemaElement (((System.Xml.Schema.XmlSchemaElement) ob.@Items[n67]), "element", "http://www.w3.org/2001/XMLSchema", false, false, true);
\r
1439 if (writeWrappingElem) WriteEndElement (ob);
\r
1442 void WriteObject_XmlSchemaComplexContent (System.Xml.Schema.XmlSchemaComplexContent ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
\r
1447 WriteNullTagLiteral(element, namesp);
\r
1451 System.Type type = ob.GetType ();
\r
1452 if (type == typeof(System.Xml.Schema.XmlSchemaComplexContent))
\r
1455 throw CreateUnknownTypeException (ob);
\r
1458 if (writeWrappingElem) {
\r
1459 WriteStartElement (element, namesp, ob);
\r
1462 if (needType) WriteXsiType("XmlSchemaComplexContent", "http://www.w3.org/2001/XMLSchema");
\r
1464 WriteNamespaceDeclarations ((XmlSerializerNamespaces) ob.@Namespaces);
\r
1466 ICollection o68 = ob.@UnhandledAttributes;
\r
1467 if (o68 != null) {
\r
1468 foreach (XmlAttribute o69 in o68)
\r
1469 if (o69.NamespaceURI != xmlNamespace)
\r
1470 WriteXmlAttribute (o69, ob);
\r
1473 WriteAttribute ("id", "", ob.@Id);
\r
1474 WriteAttribute ("mixed", "", (ob.@IsMixed?"true":"false"));
\r
1476 WriteObject_XmlSchemaAnnotation (ob.@Annotation, "annotation", "http://www.w3.org/2001/XMLSchema", false, false, true);
\r
1477 if (ob.@Content is System.Xml.Schema.XmlSchemaComplexContentExtension) {
\r
1478 WriteObject_XmlSchemaComplexContentExtension (((System.Xml.Schema.XmlSchemaComplexContentExtension) ob.@Content), "extension", "http://www.w3.org/2001/XMLSchema", false, false, true);
\r
1480 else if (ob.@Content is System.Xml.Schema.XmlSchemaComplexContentRestriction) {
\r
1481 WriteObject_XmlSchemaComplexContentRestriction (((System.Xml.Schema.XmlSchemaComplexContentRestriction) ob.@Content), "restriction", "http://www.w3.org/2001/XMLSchema", false, false, true);
\r
1483 if (writeWrappingElem) WriteEndElement (ob);
\r
1486 void WriteObject_XmlSchemaSimpleContent (System.Xml.Schema.XmlSchemaSimpleContent ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
\r
1491 WriteNullTagLiteral(element, namesp);
\r
1495 System.Type type = ob.GetType ();
\r
1496 if (type == typeof(System.Xml.Schema.XmlSchemaSimpleContent))
\r
1499 throw CreateUnknownTypeException (ob);
\r
1502 if (writeWrappingElem) {
\r
1503 WriteStartElement (element, namesp, ob);
\r
1506 if (needType) WriteXsiType("XmlSchemaSimpleContent", "http://www.w3.org/2001/XMLSchema");
\r
1508 WriteNamespaceDeclarations ((XmlSerializerNamespaces) ob.@Namespaces);
\r
1510 ICollection o70 = ob.@UnhandledAttributes;
\r
1511 if (o70 != null) {
\r
1512 foreach (XmlAttribute o71 in o70)
\r
1513 if (o71.NamespaceURI != xmlNamespace)
\r
1514 WriteXmlAttribute (o71, ob);
\r
1517 WriteAttribute ("id", "", ob.@Id);
\r
1519 WriteObject_XmlSchemaAnnotation (ob.@Annotation, "annotation", "http://www.w3.org/2001/XMLSchema", false, false, true);
\r
1520 if (ob.@Content is System.Xml.Schema.XmlSchemaSimpleContentExtension) {
\r
1521 WriteObject_XmlSchemaSimpleContentExtension (((System.Xml.Schema.XmlSchemaSimpleContentExtension) ob.@Content), "extension", "http://www.w3.org/2001/XMLSchema", false, false, true);
\r
1523 else if (ob.@Content is System.Xml.Schema.XmlSchemaSimpleContentRestriction) {
\r
1524 WriteObject_XmlSchemaSimpleContentRestriction (((System.Xml.Schema.XmlSchemaSimpleContentRestriction) ob.@Content), "restriction", "http://www.w3.org/2001/XMLSchema", false, false, true);
\r
1526 if (writeWrappingElem) WriteEndElement (ob);
\r
1529 void WriteObject_XmlSchemaGroupRef (System.Xml.Schema.XmlSchemaGroupRef ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
\r
1534 WriteNullTagLiteral(element, namesp);
\r
1538 System.Type type = ob.GetType ();
\r
1539 if (type == typeof(System.Xml.Schema.XmlSchemaGroupRef))
\r
1542 throw CreateUnknownTypeException (ob);
\r
1545 if (writeWrappingElem) {
\r
1546 WriteStartElement (element, namesp, ob);
\r
1549 if (needType) WriteXsiType("XmlSchemaGroupRef", "http://www.w3.org/2001/XMLSchema");
\r
1551 WriteNamespaceDeclarations ((XmlSerializerNamespaces) ob.@Namespaces);
\r
1553 ICollection o72 = ob.@UnhandledAttributes;
\r
1554 if (o72 != null) {
\r
1555 foreach (XmlAttribute o73 in o72)
\r
1556 if (o73.NamespaceURI != xmlNamespace)
\r
1557 WriteXmlAttribute (o73, ob);
\r
1560 WriteAttribute ("id", "", ob.@Id);
\r
1561 WriteAttribute ("minOccurs", "", ob.@MinOccursString);
\r
1562 WriteAttribute ("maxOccurs", "", ob.@MaxOccursString);
\r
1563 WriteAttribute ("ref", "", FromXmlQualifiedName (ob.@RefName));
\r
1565 WriteObject_XmlSchemaAnnotation (ob.@Annotation, "annotation", "http://www.w3.org/2001/XMLSchema", false, false, true);
\r
1566 if (writeWrappingElem) WriteEndElement (ob);
\r
1569 void WriteObject_XmlSchemaXPath (System.Xml.Schema.XmlSchemaXPath ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
\r
1574 WriteNullTagLiteral(element, namesp);
\r
1578 System.Type type = ob.GetType ();
\r
1579 if (type == typeof(System.Xml.Schema.XmlSchemaXPath))
\r
1582 throw CreateUnknownTypeException (ob);
\r
1585 if (writeWrappingElem) {
\r
1586 WriteStartElement (element, namesp, ob);
\r
1589 if (needType) WriteXsiType("XmlSchemaXPath", "http://www.w3.org/2001/XMLSchema");
\r
1591 WriteNamespaceDeclarations ((XmlSerializerNamespaces) ob.@Namespaces);
\r
1593 ICollection o74 = ob.@UnhandledAttributes;
\r
1594 if (o74 != null) {
\r
1595 foreach (XmlAttribute o75 in o74)
\r
1596 if (o75.NamespaceURI != xmlNamespace)
\r
1597 WriteXmlAttribute (o75, ob);
\r
1600 WriteAttribute ("id", "", ob.@Id);
\r
1601 if (ob.@XPath != null) {
\r
1602 WriteAttribute ("xpath", "", ob.@XPath);
\r
1605 WriteObject_XmlSchemaAnnotation (ob.@Annotation, "annotation", "http://www.w3.org/2001/XMLSchema", false, false, true);
\r
1606 if (writeWrappingElem) WriteEndElement (ob);
\r
1609 void WriteObject_XmlSchemaMaxLengthFacet (System.Xml.Schema.XmlSchemaMaxLengthFacet ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
\r
1614 WriteNullTagLiteral(element, namesp);
\r
1618 System.Type type = ob.GetType ();
\r
1619 if (type == typeof(System.Xml.Schema.XmlSchemaMaxLengthFacet))
\r
1622 throw CreateUnknownTypeException (ob);
\r
1625 if (writeWrappingElem) {
\r
1626 WriteStartElement (element, namesp, ob);
\r
1629 if (needType) WriteXsiType("XmlSchemaMaxLengthFacet", "http://www.w3.org/2001/XMLSchema");
\r
1631 WriteNamespaceDeclarations ((XmlSerializerNamespaces) ob.@Namespaces);
\r
1633 ICollection o76 = ob.@UnhandledAttributes;
\r
1634 if (o76 != null) {
\r
1635 foreach (XmlAttribute o77 in o76)
\r
1636 if (o77.NamespaceURI != xmlNamespace)
\r
1637 WriteXmlAttribute (o77, ob);
\r
1640 WriteAttribute ("id", "", ob.@Id);
\r
1641 WriteAttribute ("value", "", ob.@Value);
\r
1642 if (ob.@IsFixed != false) {
\r
1643 WriteAttribute ("fixed", "", (ob.@IsFixed?"true":"false"));
\r
1646 WriteObject_XmlSchemaAnnotation (ob.@Annotation, "annotation", "http://www.w3.org/2001/XMLSchema", false, false, true);
\r
1647 if (writeWrappingElem) WriteEndElement (ob);
\r
1650 void WriteObject_XmlSchemaMinLengthFacet (System.Xml.Schema.XmlSchemaMinLengthFacet ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
\r
1655 WriteNullTagLiteral(element, namesp);
\r
1659 System.Type type = ob.GetType ();
\r
1660 if (type == typeof(System.Xml.Schema.XmlSchemaMinLengthFacet))
\r
1663 throw CreateUnknownTypeException (ob);
\r
1666 if (writeWrappingElem) {
\r
1667 WriteStartElement (element, namesp, ob);
\r
1670 if (needType) WriteXsiType("XmlSchemaMinLengthFacet", "http://www.w3.org/2001/XMLSchema");
\r
1672 WriteNamespaceDeclarations ((XmlSerializerNamespaces) ob.@Namespaces);
\r
1674 ICollection o78 = ob.@UnhandledAttributes;
\r
1675 if (o78 != null) {
\r
1676 foreach (XmlAttribute o79 in o78)
\r
1677 if (o79.NamespaceURI != xmlNamespace)
\r
1678 WriteXmlAttribute (o79, ob);
\r
1681 WriteAttribute ("id", "", ob.@Id);
\r
1682 WriteAttribute ("value", "", ob.@Value);
\r
1683 if (ob.@IsFixed != false) {
\r
1684 WriteAttribute ("fixed", "", (ob.@IsFixed?"true":"false"));
\r
1687 WriteObject_XmlSchemaAnnotation (ob.@Annotation, "annotation", "http://www.w3.org/2001/XMLSchema", false, false, true);
\r
1688 if (writeWrappingElem) WriteEndElement (ob);
\r
1691 void WriteObject_XmlSchemaLengthFacet (System.Xml.Schema.XmlSchemaLengthFacet ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
\r
1696 WriteNullTagLiteral(element, namesp);
\r
1700 System.Type type = ob.GetType ();
\r
1701 if (type == typeof(System.Xml.Schema.XmlSchemaLengthFacet))
\r
1704 throw CreateUnknownTypeException (ob);
\r
1707 if (writeWrappingElem) {
\r
1708 WriteStartElement (element, namesp, ob);
\r
1711 if (needType) WriteXsiType("XmlSchemaLengthFacet", "http://www.w3.org/2001/XMLSchema");
\r
1713 WriteNamespaceDeclarations ((XmlSerializerNamespaces) ob.@Namespaces);
\r
1715 ICollection o80 = ob.@UnhandledAttributes;
\r
1716 if (o80 != null) {
\r
1717 foreach (XmlAttribute o81 in o80)
\r
1718 if (o81.NamespaceURI != xmlNamespace)
\r
1719 WriteXmlAttribute (o81, ob);
\r
1722 WriteAttribute ("id", "", ob.@Id);
\r
1723 WriteAttribute ("value", "", ob.@Value);
\r
1724 if (ob.@IsFixed != false) {
\r
1725 WriteAttribute ("fixed", "", (ob.@IsFixed?"true":"false"));
\r
1728 WriteObject_XmlSchemaAnnotation (ob.@Annotation, "annotation", "http://www.w3.org/2001/XMLSchema", false, false, true);
\r
1729 if (writeWrappingElem) WriteEndElement (ob);
\r
1732 void WriteObject_XmlSchemaFractionDigitsFacet (System.Xml.Schema.XmlSchemaFractionDigitsFacet ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
\r
1737 WriteNullTagLiteral(element, namesp);
\r
1741 System.Type type = ob.GetType ();
\r
1742 if (type == typeof(System.Xml.Schema.XmlSchemaFractionDigitsFacet))
\r
1745 throw CreateUnknownTypeException (ob);
\r
1748 if (writeWrappingElem) {
\r
1749 WriteStartElement (element, namesp, ob);
\r
1752 if (needType) WriteXsiType("XmlSchemaFractionDigitsFacet", "http://www.w3.org/2001/XMLSchema");
\r
1754 WriteNamespaceDeclarations ((XmlSerializerNamespaces) ob.@Namespaces);
\r
1756 ICollection o82 = ob.@UnhandledAttributes;
\r
1757 if (o82 != null) {
\r
1758 foreach (XmlAttribute o83 in o82)
\r
1759 if (o83.NamespaceURI != xmlNamespace)
\r
1760 WriteXmlAttribute (o83, ob);
\r
1763 WriteAttribute ("id", "", ob.@Id);
\r
1764 WriteAttribute ("value", "", ob.@Value);
\r
1765 if (ob.@IsFixed != false) {
\r
1766 WriteAttribute ("fixed", "", (ob.@IsFixed?"true":"false"));
\r
1769 WriteObject_XmlSchemaAnnotation (ob.@Annotation, "annotation", "http://www.w3.org/2001/XMLSchema", false, false, true);
\r
1770 if (writeWrappingElem) WriteEndElement (ob);
\r
1773 void WriteObject_XmlSchemaMaxInclusiveFacet (System.Xml.Schema.XmlSchemaMaxInclusiveFacet ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
\r
1778 WriteNullTagLiteral(element, namesp);
\r
1782 System.Type type = ob.GetType ();
\r
1783 if (type == typeof(System.Xml.Schema.XmlSchemaMaxInclusiveFacet))
\r
1786 throw CreateUnknownTypeException (ob);
\r
1789 if (writeWrappingElem) {
\r
1790 WriteStartElement (element, namesp, ob);
\r
1793 if (needType) WriteXsiType("XmlSchemaMaxInclusiveFacet", "http://www.w3.org/2001/XMLSchema");
\r
1795 WriteNamespaceDeclarations ((XmlSerializerNamespaces) ob.@Namespaces);
\r
1797 ICollection o84 = ob.@UnhandledAttributes;
\r
1798 if (o84 != null) {
\r
1799 foreach (XmlAttribute o85 in o84)
\r
1800 if (o85.NamespaceURI != xmlNamespace)
\r
1801 WriteXmlAttribute (o85, ob);
\r
1804 WriteAttribute ("id", "", ob.@Id);
\r
1805 WriteAttribute ("value", "", ob.@Value);
\r
1806 if (ob.@IsFixed != false) {
\r
1807 WriteAttribute ("fixed", "", (ob.@IsFixed?"true":"false"));
\r
1810 WriteObject_XmlSchemaAnnotation (ob.@Annotation, "annotation", "http://www.w3.org/2001/XMLSchema", false, false, true);
\r
1811 if (writeWrappingElem) WriteEndElement (ob);
\r
1814 void WriteObject_XmlSchemaMaxExclusiveFacet (System.Xml.Schema.XmlSchemaMaxExclusiveFacet ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
\r
1819 WriteNullTagLiteral(element, namesp);
\r
1823 System.Type type = ob.GetType ();
\r
1824 if (type == typeof(System.Xml.Schema.XmlSchemaMaxExclusiveFacet))
\r
1827 throw CreateUnknownTypeException (ob);
\r
1830 if (writeWrappingElem) {
\r
1831 WriteStartElement (element, namesp, ob);
\r
1834 if (needType) WriteXsiType("XmlSchemaMaxExclusiveFacet", "http://www.w3.org/2001/XMLSchema");
\r
1836 WriteNamespaceDeclarations ((XmlSerializerNamespaces) ob.@Namespaces);
\r
1838 ICollection o86 = ob.@UnhandledAttributes;
\r
1839 if (o86 != null) {
\r
1840 foreach (XmlAttribute o87 in o86)
\r
1841 if (o87.NamespaceURI != xmlNamespace)
\r
1842 WriteXmlAttribute (o87, ob);
\r
1845 WriteAttribute ("id", "", ob.@Id);
\r
1846 WriteAttribute ("value", "", ob.@Value);
\r
1847 if (ob.@IsFixed != false) {
\r
1848 WriteAttribute ("fixed", "", (ob.@IsFixed?"true":"false"));
\r
1851 WriteObject_XmlSchemaAnnotation (ob.@Annotation, "annotation", "http://www.w3.org/2001/XMLSchema", false, false, true);
\r
1852 if (writeWrappingElem) WriteEndElement (ob);
\r
1855 void WriteObject_XmlSchemaMinExclusiveFacet (System.Xml.Schema.XmlSchemaMinExclusiveFacet ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
\r
1860 WriteNullTagLiteral(element, namesp);
\r
1864 System.Type type = ob.GetType ();
\r
1865 if (type == typeof(System.Xml.Schema.XmlSchemaMinExclusiveFacet))
\r
1868 throw CreateUnknownTypeException (ob);
\r
1871 if (writeWrappingElem) {
\r
1872 WriteStartElement (element, namesp, ob);
\r
1875 if (needType) WriteXsiType("XmlSchemaMinExclusiveFacet", "http://www.w3.org/2001/XMLSchema");
\r
1877 WriteNamespaceDeclarations ((XmlSerializerNamespaces) ob.@Namespaces);
\r
1879 ICollection o88 = ob.@UnhandledAttributes;
\r
1880 if (o88 != null) {
\r
1881 foreach (XmlAttribute o89 in o88)
\r
1882 if (o89.NamespaceURI != xmlNamespace)
\r
1883 WriteXmlAttribute (o89, ob);
\r
1886 WriteAttribute ("id", "", ob.@Id);
\r
1887 WriteAttribute ("value", "", ob.@Value);
\r
1888 if (ob.@IsFixed != false) {
\r
1889 WriteAttribute ("fixed", "", (ob.@IsFixed?"true":"false"));
\r
1892 WriteObject_XmlSchemaAnnotation (ob.@Annotation, "annotation", "http://www.w3.org/2001/XMLSchema", false, false, true);
\r
1893 if (writeWrappingElem) WriteEndElement (ob);
\r
1896 void WriteObject_XmlSchemaEnumerationFacet (System.Xml.Schema.XmlSchemaEnumerationFacet ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
\r
1901 WriteNullTagLiteral(element, namesp);
\r
1905 System.Type type = ob.GetType ();
\r
1906 if (type == typeof(System.Xml.Schema.XmlSchemaEnumerationFacet))
\r
1909 throw CreateUnknownTypeException (ob);
\r
1912 if (writeWrappingElem) {
\r
1913 WriteStartElement (element, namesp, ob);
\r
1916 if (needType) WriteXsiType("XmlSchemaEnumerationFacet", "http://www.w3.org/2001/XMLSchema");
\r
1918 WriteNamespaceDeclarations ((XmlSerializerNamespaces) ob.@Namespaces);
\r
1920 ICollection o90 = ob.@UnhandledAttributes;
\r
1921 if (o90 != null) {
\r
1922 foreach (XmlAttribute o91 in o90)
\r
1923 if (o91.NamespaceURI != xmlNamespace)
\r
1924 WriteXmlAttribute (o91, ob);
\r
1927 WriteAttribute ("id", "", ob.@Id);
\r
1928 WriteAttribute ("value", "", ob.@Value);
\r
1929 if (ob.@IsFixed != false) {
\r
1930 WriteAttribute ("fixed", "", (ob.@IsFixed?"true":"false"));
\r
1933 WriteObject_XmlSchemaAnnotation (ob.@Annotation, "annotation", "http://www.w3.org/2001/XMLSchema", false, false, true);
\r
1934 if (writeWrappingElem) WriteEndElement (ob);
\r
1937 void WriteObject_XmlSchemaTotalDigitsFacet (System.Xml.Schema.XmlSchemaTotalDigitsFacet ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
\r
1942 WriteNullTagLiteral(element, namesp);
\r
1946 System.Type type = ob.GetType ();
\r
1947 if (type == typeof(System.Xml.Schema.XmlSchemaTotalDigitsFacet))
\r
1950 throw CreateUnknownTypeException (ob);
\r
1953 if (writeWrappingElem) {
\r
1954 WriteStartElement (element, namesp, ob);
\r
1957 if (needType) WriteXsiType("XmlSchemaTotalDigitsFacet", "http://www.w3.org/2001/XMLSchema");
\r
1959 WriteNamespaceDeclarations ((XmlSerializerNamespaces) ob.@Namespaces);
\r
1961 ICollection o92 = ob.@UnhandledAttributes;
\r
1962 if (o92 != null) {
\r
1963 foreach (XmlAttribute o93 in o92)
\r
1964 if (o93.NamespaceURI != xmlNamespace)
\r
1965 WriteXmlAttribute (o93, ob);
\r
1968 WriteAttribute ("id", "", ob.@Id);
\r
1969 WriteAttribute ("value", "", ob.@Value);
\r
1970 if (ob.@IsFixed != false) {
\r
1971 WriteAttribute ("fixed", "", (ob.@IsFixed?"true":"false"));
\r
1974 WriteObject_XmlSchemaAnnotation (ob.@Annotation, "annotation", "http://www.w3.org/2001/XMLSchema", false, false, true);
\r
1975 if (writeWrappingElem) WriteEndElement (ob);
\r
1978 void WriteObject_XmlSchemaMinInclusiveFacet (System.Xml.Schema.XmlSchemaMinInclusiveFacet ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
\r
1983 WriteNullTagLiteral(element, namesp);
\r
1987 System.Type type = ob.GetType ();
\r
1988 if (type == typeof(System.Xml.Schema.XmlSchemaMinInclusiveFacet))
\r
1991 throw CreateUnknownTypeException (ob);
\r
1994 if (writeWrappingElem) {
\r
1995 WriteStartElement (element, namesp, ob);
\r
1998 if (needType) WriteXsiType("XmlSchemaMinInclusiveFacet", "http://www.w3.org/2001/XMLSchema");
\r
2000 WriteNamespaceDeclarations ((XmlSerializerNamespaces) ob.@Namespaces);
\r
2002 ICollection o94 = ob.@UnhandledAttributes;
\r
2003 if (o94 != null) {
\r
2004 foreach (XmlAttribute o95 in o94)
\r
2005 if (o95.NamespaceURI != xmlNamespace)
\r
2006 WriteXmlAttribute (o95, ob);
\r
2009 WriteAttribute ("id", "", ob.@Id);
\r
2010 WriteAttribute ("value", "", ob.@Value);
\r
2011 if (ob.@IsFixed != false) {
\r
2012 WriteAttribute ("fixed", "", (ob.@IsFixed?"true":"false"));
\r
2015 WriteObject_XmlSchemaAnnotation (ob.@Annotation, "annotation", "http://www.w3.org/2001/XMLSchema", false, false, true);
\r
2016 if (writeWrappingElem) WriteEndElement (ob);
\r
2019 void WriteObject_XmlSchemaWhiteSpaceFacet (System.Xml.Schema.XmlSchemaWhiteSpaceFacet ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
\r
2024 WriteNullTagLiteral(element, namesp);
\r
2028 System.Type type = ob.GetType ();
\r
2029 if (type == typeof(System.Xml.Schema.XmlSchemaWhiteSpaceFacet))
\r
2032 throw CreateUnknownTypeException (ob);
\r
2035 if (writeWrappingElem) {
\r
2036 WriteStartElement (element, namesp, ob);
\r
2039 if (needType) WriteXsiType("XmlSchemaWhiteSpaceFacet", "http://www.w3.org/2001/XMLSchema");
\r
2041 WriteNamespaceDeclarations ((XmlSerializerNamespaces) ob.@Namespaces);
\r
2043 ICollection o96 = ob.@UnhandledAttributes;
\r
2044 if (o96 != null) {
\r
2045 foreach (XmlAttribute o97 in o96)
\r
2046 if (o97.NamespaceURI != xmlNamespace)
\r
2047 WriteXmlAttribute (o97, ob);
\r
2050 WriteAttribute ("id", "", ob.@Id);
\r
2051 WriteAttribute ("value", "", ob.@Value);
\r
2052 if (ob.@IsFixed != false) {
\r
2053 WriteAttribute ("fixed", "", (ob.@IsFixed?"true":"false"));
\r
2056 WriteObject_XmlSchemaAnnotation (ob.@Annotation, "annotation", "http://www.w3.org/2001/XMLSchema", false, false, true);
\r
2057 if (writeWrappingElem) WriteEndElement (ob);
\r
2060 void WriteObject_XmlSchemaPatternFacet (System.Xml.Schema.XmlSchemaPatternFacet ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
\r
2065 WriteNullTagLiteral(element, namesp);
\r
2069 System.Type type = ob.GetType ();
\r
2070 if (type == typeof(System.Xml.Schema.XmlSchemaPatternFacet))
\r
2073 throw CreateUnknownTypeException (ob);
\r
2076 if (writeWrappingElem) {
\r
2077 WriteStartElement (element, namesp, ob);
\r
2080 if (needType) WriteXsiType("XmlSchemaPatternFacet", "http://www.w3.org/2001/XMLSchema");
\r
2082 WriteNamespaceDeclarations ((XmlSerializerNamespaces) ob.@Namespaces);
\r
2084 ICollection o98 = ob.@UnhandledAttributes;
\r
2085 if (o98 != null) {
\r
2086 foreach (XmlAttribute o99 in o98)
\r
2087 if (o99.NamespaceURI != xmlNamespace)
\r
2088 WriteXmlAttribute (o99, ob);
\r
2091 WriteAttribute ("id", "", ob.@Id);
\r
2092 WriteAttribute ("value", "", ob.@Value);
\r
2093 if (ob.@IsFixed != false) {
\r
2094 WriteAttribute ("fixed", "", (ob.@IsFixed?"true":"false"));
\r
2097 WriteObject_XmlSchemaAnnotation (ob.@Annotation, "annotation", "http://www.w3.org/2001/XMLSchema", false, false, true);
\r
2098 if (writeWrappingElem) WriteEndElement (ob);
\r
2101 void WriteObject_XmlSchemaContentProcessing (System.Xml.Schema.XmlSchemaContentProcessing ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
\r
2103 System.Type type = ob.GetType ();
\r
2104 if (type == typeof(System.Xml.Schema.XmlSchemaContentProcessing))
\r
2107 throw CreateUnknownTypeException (ob);
\r
2110 if (writeWrappingElem) {
\r
2111 WriteStartElement (element, namesp, ob);
\r
2114 if (needType) WriteXsiType("XmlSchemaContentProcessing", "");
\r
2116 Writer.WriteString (GetEnumValue_XmlSchemaContentProcessing (ob));
\r
2117 if (writeWrappingElem) WriteEndElement (ob);
\r
2120 string GetEnumValue_XmlSchemaContentProcessing (System.Xml.Schema.XmlSchemaContentProcessing val)
\r
2124 case System.Xml.Schema.XmlSchemaContentProcessing.Skip: return "skip";
\r
2125 case System.Xml.Schema.XmlSchemaContentProcessing.Lax: return "lax";
\r
2126 case System.Xml.Schema.XmlSchemaContentProcessing.Strict: return "strict";
\r
2127 default: return ((long)val).ToString(CultureInfo.InvariantCulture);
\r
2131 void WriteObject_XmlSchemaAny (System.Xml.Schema.XmlSchemaAny ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
\r
2136 WriteNullTagLiteral(element, namesp);
\r
2140 System.Type type = ob.GetType ();
\r
2141 if (type == typeof(System.Xml.Schema.XmlSchemaAny))
\r
2144 throw CreateUnknownTypeException (ob);
\r
2147 if (writeWrappingElem) {
\r
2148 WriteStartElement (element, namesp, ob);
\r
2151 if (needType) WriteXsiType("XmlSchemaAny", "http://www.w3.org/2001/XMLSchema");
\r
2153 WriteNamespaceDeclarations ((XmlSerializerNamespaces) ob.@Namespaces);
\r
2155 ICollection o100 = ob.@UnhandledAttributes;
\r
2156 if (o100 != null) {
\r
2157 foreach (XmlAttribute o101 in o100)
\r
2158 if (o101.NamespaceURI != xmlNamespace)
\r
2159 WriteXmlAttribute (o101, ob);
\r
2162 WriteAttribute ("id", "", ob.@Id);
\r
2163 WriteAttribute ("minOccurs", "", ob.@MinOccursString);
\r
2164 WriteAttribute ("maxOccurs", "", ob.@MaxOccursString);
\r
2165 WriteAttribute ("namespace", "", ob.@Namespace);
\r
2166 if (ob.@ProcessContents != ((System.Xml.Schema.XmlSchemaContentProcessing) System.Xml.Schema.XmlSchemaContentProcessing.None)) {
\r
2167 WriteAttribute ("processContents", "", GetEnumValue_XmlSchemaContentProcessing (ob.@ProcessContents));
\r
2170 WriteObject_XmlSchemaAnnotation (ob.@Annotation, "annotation", "http://www.w3.org/2001/XMLSchema", false, false, true);
\r
2171 if (writeWrappingElem) WriteEndElement (ob);
\r
2174 void WriteObject_XmlSchemaComplexContentExtension (System.Xml.Schema.XmlSchemaComplexContentExtension ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
\r
2179 WriteNullTagLiteral(element, namesp);
\r
2183 System.Type type = ob.GetType ();
\r
2184 if (type == typeof(System.Xml.Schema.XmlSchemaComplexContentExtension))
\r
2187 throw CreateUnknownTypeException (ob);
\r
2190 if (writeWrappingElem) {
\r
2191 WriteStartElement (element, namesp, ob);
\r
2194 if (needType) WriteXsiType("XmlSchemaComplexContentExtension", "http://www.w3.org/2001/XMLSchema");
\r
2196 WriteNamespaceDeclarations ((XmlSerializerNamespaces) ob.@Namespaces);
\r
2198 ICollection o102 = ob.@UnhandledAttributes;
\r
2199 if (o102 != null) {
\r
2200 foreach (XmlAttribute o103 in o102)
\r
2201 if (o103.NamespaceURI != xmlNamespace)
\r
2202 WriteXmlAttribute (o103, ob);
\r
2205 WriteAttribute ("id", "", ob.@Id);
\r
2206 WriteAttribute ("base", "", FromXmlQualifiedName (ob.@BaseTypeName));
\r
2208 WriteObject_XmlSchemaAnnotation (ob.@Annotation, "annotation", "http://www.w3.org/2001/XMLSchema", false, false, true);
\r
2209 if (ob.@Particle is System.Xml.Schema.XmlSchemaGroupRef) {
\r
2210 WriteObject_XmlSchemaGroupRef (((System.Xml.Schema.XmlSchemaGroupRef) ob.@Particle), "group", "http://www.w3.org/2001/XMLSchema", false, false, true);
\r
2212 else if (ob.@Particle is System.Xml.Schema.XmlSchemaSequence) {
\r
2213 WriteObject_XmlSchemaSequence (((System.Xml.Schema.XmlSchemaSequence) ob.@Particle), "sequence", "http://www.w3.org/2001/XMLSchema", false, false, true);
\r
2215 else if (ob.@Particle is System.Xml.Schema.XmlSchemaChoice) {
\r
2216 WriteObject_XmlSchemaChoice (((System.Xml.Schema.XmlSchemaChoice) ob.@Particle), "choice", "http://www.w3.org/2001/XMLSchema", false, false, true);
\r
2218 else if (ob.@Particle is System.Xml.Schema.XmlSchemaAll) {
\r
2219 WriteObject_XmlSchemaAll (((System.Xml.Schema.XmlSchemaAll) ob.@Particle), "all", "http://www.w3.org/2001/XMLSchema", false, false, true);
\r
2221 if (ob.@Attributes != null) {
\r
2222 for (int n104 = 0; n104 < ob.@Attributes.Count; n104++) {
\r
2223 if (ob.@Attributes[n104] == null) { }
\r
2224 else if (ob.@Attributes[n104].GetType() == typeof(System.Xml.Schema.XmlSchemaAttribute)) {
\r
2225 WriteObject_XmlSchemaAttribute (((System.Xml.Schema.XmlSchemaAttribute) ob.@Attributes[n104]), "attribute", "http://www.w3.org/2001/XMLSchema", false, false, true);
\r
2227 else if (ob.@Attributes[n104].GetType() == typeof(System.Xml.Schema.XmlSchemaAttributeGroupRef)) {
\r
2228 WriteObject_XmlSchemaAttributeGroupRef (((System.Xml.Schema.XmlSchemaAttributeGroupRef) ob.@Attributes[n104]), "attributeGroup", "http://www.w3.org/2001/XMLSchema", false, false, true);
\r
2230 else throw CreateUnknownTypeException (ob.@Attributes[n104]);
\r
2233 WriteObject_XmlSchemaAnyAttribute (ob.@AnyAttribute, "anyAttribute", "http://www.w3.org/2001/XMLSchema", false, false, true);
\r
2234 if (writeWrappingElem) WriteEndElement (ob);
\r
2237 void WriteObject_XmlSchemaComplexContentRestriction (System.Xml.Schema.XmlSchemaComplexContentRestriction ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
\r
2242 WriteNullTagLiteral(element, namesp);
\r
2246 System.Type type = ob.GetType ();
\r
2247 if (type == typeof(System.Xml.Schema.XmlSchemaComplexContentRestriction))
\r
2250 throw CreateUnknownTypeException (ob);
\r
2253 if (writeWrappingElem) {
\r
2254 WriteStartElement (element, namesp, ob);
\r
2257 if (needType) WriteXsiType("XmlSchemaComplexContentRestriction", "http://www.w3.org/2001/XMLSchema");
\r
2259 WriteNamespaceDeclarations ((XmlSerializerNamespaces) ob.@Namespaces);
\r
2261 ICollection o105 = ob.@UnhandledAttributes;
\r
2262 if (o105 != null) {
\r
2263 foreach (XmlAttribute o106 in o105)
\r
2264 if (o106.NamespaceURI != xmlNamespace)
\r
2265 WriteXmlAttribute (o106, ob);
\r
2268 WriteAttribute ("id", "", ob.@Id);
\r
2269 WriteAttribute ("base", "", FromXmlQualifiedName (ob.@BaseTypeName));
\r
2271 WriteObject_XmlSchemaAnnotation (ob.@Annotation, "annotation", "http://www.w3.org/2001/XMLSchema", false, false, true);
\r
2272 if (ob.@Particle is System.Xml.Schema.XmlSchemaSequence) {
\r
2273 WriteObject_XmlSchemaSequence (((System.Xml.Schema.XmlSchemaSequence) ob.@Particle), "sequence", "http://www.w3.org/2001/XMLSchema", false, false, true);
\r
2275 else if (ob.@Particle is System.Xml.Schema.XmlSchemaChoice) {
\r
2276 WriteObject_XmlSchemaChoice (((System.Xml.Schema.XmlSchemaChoice) ob.@Particle), "choice", "http://www.w3.org/2001/XMLSchema", false, false, true);
\r
2278 else if (ob.@Particle is System.Xml.Schema.XmlSchemaGroupRef) {
\r
2279 WriteObject_XmlSchemaGroupRef (((System.Xml.Schema.XmlSchemaGroupRef) ob.@Particle), "group", "http://www.w3.org/2001/XMLSchema", false, false, true);
\r
2281 else if (ob.@Particle is System.Xml.Schema.XmlSchemaAll) {
\r
2282 WriteObject_XmlSchemaAll (((System.Xml.Schema.XmlSchemaAll) ob.@Particle), "all", "http://www.w3.org/2001/XMLSchema", false, false, true);
\r
2284 if (ob.@Attributes != null) {
\r
2285 for (int n107 = 0; n107 < ob.@Attributes.Count; n107++) {
\r
2286 if (ob.@Attributes[n107] == null) { }
\r
2287 else if (ob.@Attributes[n107].GetType() == typeof(System.Xml.Schema.XmlSchemaAttributeGroupRef)) {
\r
2288 WriteObject_XmlSchemaAttributeGroupRef (((System.Xml.Schema.XmlSchemaAttributeGroupRef) ob.@Attributes[n107]), "attributeGroup", "http://www.w3.org/2001/XMLSchema", false, false, true);
\r
2290 else if (ob.@Attributes[n107].GetType() == typeof(System.Xml.Schema.XmlSchemaAttribute)) {
\r
2291 WriteObject_XmlSchemaAttribute (((System.Xml.Schema.XmlSchemaAttribute) ob.@Attributes[n107]), "attribute", "http://www.w3.org/2001/XMLSchema", false, false, true);
\r
2293 else throw CreateUnknownTypeException (ob.@Attributes[n107]);
\r
2296 WriteObject_XmlSchemaAnyAttribute (ob.@AnyAttribute, "anyAttribute", "http://www.w3.org/2001/XMLSchema", false, false, true);
\r
2297 if (writeWrappingElem) WriteEndElement (ob);
\r
2300 void WriteObject_XmlSchemaSimpleContentExtension (System.Xml.Schema.XmlSchemaSimpleContentExtension ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
\r
2305 WriteNullTagLiteral(element, namesp);
\r
2309 System.Type type = ob.GetType ();
\r
2310 if (type == typeof(System.Xml.Schema.XmlSchemaSimpleContentExtension))
\r
2313 throw CreateUnknownTypeException (ob);
\r
2316 if (writeWrappingElem) {
\r
2317 WriteStartElement (element, namesp, ob);
\r
2320 if (needType) WriteXsiType("XmlSchemaSimpleContentExtension", "http://www.w3.org/2001/XMLSchema");
\r
2322 WriteNamespaceDeclarations ((XmlSerializerNamespaces) ob.@Namespaces);
\r
2324 ICollection o108 = ob.@UnhandledAttributes;
\r
2325 if (o108 != null) {
\r
2326 foreach (XmlAttribute o109 in o108)
\r
2327 if (o109.NamespaceURI != xmlNamespace)
\r
2328 WriteXmlAttribute (o109, ob);
\r
2331 WriteAttribute ("id", "", ob.@Id);
\r
2332 WriteAttribute ("base", "", FromXmlQualifiedName (ob.@BaseTypeName));
\r
2334 WriteObject_XmlSchemaAnnotation (ob.@Annotation, "annotation", "http://www.w3.org/2001/XMLSchema", false, false, true);
\r
2335 if (ob.@Attributes != null) {
\r
2336 for (int n110 = 0; n110 < ob.@Attributes.Count; n110++) {
\r
2337 if (ob.@Attributes[n110] == null) { }
\r
2338 else if (ob.@Attributes[n110].GetType() == typeof(System.Xml.Schema.XmlSchemaAttributeGroupRef)) {
\r
2339 WriteObject_XmlSchemaAttributeGroupRef (((System.Xml.Schema.XmlSchemaAttributeGroupRef) ob.@Attributes[n110]), "attributeGroup", "http://www.w3.org/2001/XMLSchema", false, false, true);
\r
2341 else if (ob.@Attributes[n110].GetType() == typeof(System.Xml.Schema.XmlSchemaAttribute)) {
\r
2342 WriteObject_XmlSchemaAttribute (((System.Xml.Schema.XmlSchemaAttribute) ob.@Attributes[n110]), "attribute", "http://www.w3.org/2001/XMLSchema", false, false, true);
\r
2344 else throw CreateUnknownTypeException (ob.@Attributes[n110]);
\r
2347 WriteObject_XmlSchemaAnyAttribute (ob.@AnyAttribute, "anyAttribute", "http://www.w3.org/2001/XMLSchema", false, false, true);
\r
2348 if (writeWrappingElem) WriteEndElement (ob);
\r
2351 void WriteObject_XmlSchemaSimpleContentRestriction (System.Xml.Schema.XmlSchemaSimpleContentRestriction ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
\r
2356 WriteNullTagLiteral(element, namesp);
\r
2360 System.Type type = ob.GetType ();
\r
2361 if (type == typeof(System.Xml.Schema.XmlSchemaSimpleContentRestriction))
\r
2364 throw CreateUnknownTypeException (ob);
\r
2367 if (writeWrappingElem) {
\r
2368 WriteStartElement (element, namesp, ob);
\r
2371 if (needType) WriteXsiType("XmlSchemaSimpleContentRestriction", "http://www.w3.org/2001/XMLSchema");
\r
2373 WriteNamespaceDeclarations ((XmlSerializerNamespaces) ob.@Namespaces);
\r
2375 ICollection o111 = ob.@UnhandledAttributes;
\r
2376 if (o111 != null) {
\r
2377 foreach (XmlAttribute o112 in o111)
\r
2378 if (o112.NamespaceURI != xmlNamespace)
\r
2379 WriteXmlAttribute (o112, ob);
\r
2382 WriteAttribute ("id", "", ob.@Id);
\r
2383 WriteAttribute ("base", "", FromXmlQualifiedName (ob.@BaseTypeName));
\r
2385 WriteObject_XmlSchemaAnnotation (ob.@Annotation, "annotation", "http://www.w3.org/2001/XMLSchema", false, false, true);
\r
2386 WriteObject_XmlSchemaSimpleType (ob.@BaseType, "simpleType", "http://www.w3.org/2001/XMLSchema", false, false, true);
\r
2387 if (ob.@Facets != null) {
\r
2388 for (int n113 = 0; n113 < ob.@Facets.Count; n113++) {
\r
2389 if (ob.@Facets[n113] == null) { }
\r
2390 else if (ob.@Facets[n113].GetType() == typeof(System.Xml.Schema.XmlSchemaEnumerationFacet)) {
\r
2391 WriteObject_XmlSchemaEnumerationFacet (((System.Xml.Schema.XmlSchemaEnumerationFacet) ob.@Facets[n113]), "enumeration", "http://www.w3.org/2001/XMLSchema", false, false, true);
\r
2393 else if (ob.@Facets[n113].GetType() == typeof(System.Xml.Schema.XmlSchemaMaxLengthFacet)) {
\r
2394 WriteObject_XmlSchemaMaxLengthFacet (((System.Xml.Schema.XmlSchemaMaxLengthFacet) ob.@Facets[n113]), "maxLength", "http://www.w3.org/2001/XMLSchema", false, false, true);
\r
2396 else if (ob.@Facets[n113].GetType() == typeof(System.Xml.Schema.XmlSchemaMinLengthFacet)) {
\r
2397 WriteObject_XmlSchemaMinLengthFacet (((System.Xml.Schema.XmlSchemaMinLengthFacet) ob.@Facets[n113]), "minLength", "http://www.w3.org/2001/XMLSchema", false, false, true);
\r
2399 else if (ob.@Facets[n113].GetType() == typeof(System.Xml.Schema.XmlSchemaLengthFacet)) {
\r
2400 WriteObject_XmlSchemaLengthFacet (((System.Xml.Schema.XmlSchemaLengthFacet) ob.@Facets[n113]), "length", "http://www.w3.org/2001/XMLSchema", false, false, true);
\r
2402 else if (ob.@Facets[n113].GetType() == typeof(System.Xml.Schema.XmlSchemaFractionDigitsFacet)) {
\r
2403 WriteObject_XmlSchemaFractionDigitsFacet (((System.Xml.Schema.XmlSchemaFractionDigitsFacet) ob.@Facets[n113]), "fractionDigits", "http://www.w3.org/2001/XMLSchema", false, false, true);
\r
2405 else if (ob.@Facets[n113].GetType() == typeof(System.Xml.Schema.XmlSchemaTotalDigitsFacet)) {
\r
2406 WriteObject_XmlSchemaTotalDigitsFacet (((System.Xml.Schema.XmlSchemaTotalDigitsFacet) ob.@Facets[n113]), "totalDigits", "http://www.w3.org/2001/XMLSchema", false, false, true);
\r
2408 else if (ob.@Facets[n113].GetType() == typeof(System.Xml.Schema.XmlSchemaMaxInclusiveFacet)) {
\r
2409 WriteObject_XmlSchemaMaxInclusiveFacet (((System.Xml.Schema.XmlSchemaMaxInclusiveFacet) ob.@Facets[n113]), "maxInclusive", "http://www.w3.org/2001/XMLSchema", false, false, true);
\r
2411 else if (ob.@Facets[n113].GetType() == typeof(System.Xml.Schema.XmlSchemaMaxExclusiveFacet)) {
\r
2412 WriteObject_XmlSchemaMaxExclusiveFacet (((System.Xml.Schema.XmlSchemaMaxExclusiveFacet) ob.@Facets[n113]), "maxExclusive", "http://www.w3.org/2001/XMLSchema", false, false, true);
\r
2414 else if (ob.@Facets[n113].GetType() == typeof(System.Xml.Schema.XmlSchemaMinInclusiveFacet)) {
\r
2415 WriteObject_XmlSchemaMinInclusiveFacet (((System.Xml.Schema.XmlSchemaMinInclusiveFacet) ob.@Facets[n113]), "minInclusive", "http://www.w3.org/2001/XMLSchema", false, false, true);
\r
2417 else if (ob.@Facets[n113].GetType() == typeof(System.Xml.Schema.XmlSchemaMinExclusiveFacet)) {
\r
2418 WriteObject_XmlSchemaMinExclusiveFacet (((System.Xml.Schema.XmlSchemaMinExclusiveFacet) ob.@Facets[n113]), "minExclusive", "http://www.w3.org/2001/XMLSchema", false, false, true);
\r
2420 else if (ob.@Facets[n113].GetType() == typeof(System.Xml.Schema.XmlSchemaWhiteSpaceFacet)) {
\r
2421 WriteObject_XmlSchemaWhiteSpaceFacet (((System.Xml.Schema.XmlSchemaWhiteSpaceFacet) ob.@Facets[n113]), "whiteSpace", "http://www.w3.org/2001/XMLSchema", false, false, true);
\r
2423 else if (ob.@Facets[n113].GetType() == typeof(System.Xml.Schema.XmlSchemaPatternFacet)) {
\r
2424 WriteObject_XmlSchemaPatternFacet (((System.Xml.Schema.XmlSchemaPatternFacet) ob.@Facets[n113]), "pattern", "http://www.w3.org/2001/XMLSchema", false, false, true);
\r
2426 else throw CreateUnknownTypeException (ob.@Facets[n113]);
\r
2429 if (ob.@Attributes != null) {
\r
2430 for (int n114 = 0; n114 < ob.@Attributes.Count; n114++) {
\r
2431 if (ob.@Attributes[n114] == null) { }
\r
2432 else if (ob.@Attributes[n114].GetType() == typeof(System.Xml.Schema.XmlSchemaAttributeGroupRef)) {
\r
2433 WriteObject_XmlSchemaAttributeGroupRef (((System.Xml.Schema.XmlSchemaAttributeGroupRef) ob.@Attributes[n114]), "attributeGroup", "http://www.w3.org/2001/XMLSchema", false, false, true);
\r
2435 else if (ob.@Attributes[n114].GetType() == typeof(System.Xml.Schema.XmlSchemaAttribute)) {
\r
2436 WriteObject_XmlSchemaAttribute (((System.Xml.Schema.XmlSchemaAttribute) ob.@Attributes[n114]), "attribute", "http://www.w3.org/2001/XMLSchema", false, false, true);
\r
2438 else throw CreateUnknownTypeException (ob.@Attributes[n114]);
\r
2441 WriteObject_XmlSchemaAnyAttribute (ob.@AnyAttribute, "anyAttribute", "http://www.w3.org/2001/XMLSchema", false, false, true);
\r
2442 if (writeWrappingElem) WriteEndElement (ob);
\r
2445 protected override void InitCallbacks ()
\r