Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'mcs/class/System.XML/Mono.Xml.Schema/XsdParticleValidationState.cs')
-rw-r--r--mcs/class/System.XML/Mono.Xml.Schema/XsdParticleValidationState.cs108
1 files changed, 54 insertions, 54 deletions
diff --git a/mcs/class/System.XML/Mono.Xml.Schema/XsdParticleValidationState.cs b/mcs/class/System.XML/Mono.Xml.Schema/XsdParticleValidationState.cs
index 1d541406c3a..139273de842 100644
--- a/mcs/class/System.XML/Mono.Xml.Schema/XsdParticleValidationState.cs
+++ b/mcs/class/System.XML/Mono.Xml.Schema/XsdParticleValidationState.cs
@@ -410,20 +410,20 @@ namespace Mono.Xml.Schema
return seq.ValidatedMinOccurs <= Occured && seq.ValidatedMaxOccurs >= Occured;
}
- internal override bool EvaluateIsEmptiable ()
- {
- if (seq.ValidatedMinOccurs > Occured + 1)
- return false;
- if (seq.ValidatedMinOccurs == 0 && currentAutomata == null)
- return true;
-
- if (emptiable)
- return true;
- if (seq.CompiledItems.Count == 0)
- return true;
-
+ internal override bool EvaluateIsEmptiable ()
+ {
+ if (seq.ValidatedMinOccurs > Occured + 1)
+ return false;
+ if (seq.ValidatedMinOccurs == 0 && currentAutomata == null)
+ return true;
+
+ if (emptiable)
+ return true;
+ if (seq.CompiledItems.Count == 0)
+ return true;
+
int idx = current < 0 ? 0 : current;
- XsdValidationState xa = currentAutomata;
+ XsdValidationState xa = currentAutomata;
if (xa == null)
xa = Manager.Create (seq.CompiledItems [idx] as XmlSchemaParticle);
while (xa != null) {
@@ -437,7 +437,7 @@ namespace Mono.Xml.Schema
}
emptiable = true;
return true;
- }
+ }
}
@@ -509,30 +509,30 @@ namespace Mono.Xml.Schema
return false;
}
- internal override bool EvaluateIsEmptiable ()
- {
+ internal override bool EvaluateIsEmptiable ()
+ {
if (emptiableComputed)
return emptiable;
-
- if (choice.ValidatedMaxOccurs < Occured)
- return false;
- else if (choice.ValidatedMinOccurs > Occured + 1)
- return false;
-
- for (int i = Occured; i < choice.ValidatedMinOccurs; i++) {
- bool next = false;
+
+ if (choice.ValidatedMaxOccurs < Occured)
+ return false;
+ else if (choice.ValidatedMinOccurs > Occured + 1)
+ return false;
+
+ for (int i = Occured; i < choice.ValidatedMinOccurs; i++) {
+ bool next = false;
for (int pi = 0; pi < choice.CompiledItems.Count; pi++) {
- XmlSchemaParticle p = (XmlSchemaParticle) choice.CompiledItems [pi];
+ XmlSchemaParticle p = (XmlSchemaParticle) choice.CompiledItems [pi];
if (Manager.Create (p).EvaluateIsEmptiable ()) {
next = true;
break;
}
- }
- if (!next)
- return false;
- }
- return true;
- }
+ }
+ if (!next)
+ return false;
+ }
+ return true;
+ }
}
internal class XsdAllValidationState : XsdValidationState
@@ -591,8 +591,8 @@ namespace Mono.Xml.Schema
return true;
}
- internal override bool EvaluateIsEmptiable ()
- {
+ internal override bool EvaluateIsEmptiable ()
+ {
if (all.Emptiable || all.ValidatedMinOccurs == 0)
return true;
for (int i = 0; i < all.CompiledItems.Count; i++) {
@@ -601,7 +601,7 @@ namespace Mono.Xml.Schema
return false;
}
return true;
- }
+ }
}
internal class XsdAnyValidationState : XsdValidationState
@@ -656,11 +656,11 @@ namespace Mono.Xml.Schema
return EvaluateIsEmptiable ();
}
- internal override bool EvaluateIsEmptiable ()
- {
+ internal override bool EvaluateIsEmptiable ()
+ {
return any.ValidatedMinOccurs <= Occured &&
any.ValidatedMaxOccurs >= Occured;
- }
+ }
}
internal class XsdAppendedValidationState : XsdValidationState
@@ -706,13 +706,13 @@ namespace Mono.Xml.Schema
return rest.EvaluateEndElement ();
}
- internal override bool EvaluateIsEmptiable ()
- {
- if (head.EvaluateIsEmptiable ())
- return rest.EvaluateIsEmptiable ();
- else
- return false;
- }
+ internal override bool EvaluateIsEmptiable ()
+ {
+ if (head.EvaluateIsEmptiable ())
+ return rest.EvaluateIsEmptiable ();
+ else
+ return false;
+ }
}
internal class XsdEmptyValidationState : XsdValidationState
@@ -739,11 +739,11 @@ namespace Mono.Xml.Schema
return true;
}
- internal override bool EvaluateIsEmptiable ()
- {
- return true;
- }
-
+ internal override bool EvaluateIsEmptiable ()
+ {
+ return true;
+ }
+
}
internal class XsdInvalidValidationState : XsdValidationState
@@ -770,10 +770,10 @@ namespace Mono.Xml.Schema
return false;
}
- internal override bool EvaluateIsEmptiable ()
- {
- return false;
- }
-
+ internal override bool EvaluateIsEmptiable ()
+ {
+ return false;
+ }
+
}
}