X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=mcs%2Fclass%2FSystem.XML%2FSystem.Xml.Schema%2FXmlSchemaComplexContentRestriction.cs;h=89d7f7b34f8685ebd3f9fb3c738f76fcf3315630;hb=018c4be8c5ef6e23ccd9bf798513a6178631e1ea;hp=0e8116a9caa33b1f0a364ca4f73c477a396a5b56;hpb=7fec452d6aa77d48a6972f764ada30cdfa5bd51f;p=mono.git diff --git a/mcs/class/System.XML/System.Xml.Schema/XmlSchemaComplexContentRestriction.cs b/mcs/class/System.XML/System.Xml.Schema/XmlSchemaComplexContentRestriction.cs index 0e8116a9caa..89d7f7b34f8 100755 --- a/mcs/class/System.XML/System.Xml.Schema/XmlSchemaComplexContentRestriction.cs +++ b/mcs/class/System.XML/System.Xml.Schema/XmlSchemaComplexContentRestriction.cs @@ -5,6 +5,27 @@ // Dwivedi, Ajay kumar Adwiv@Yahoo.com // Atsushi Enomoto ginga@kit.hi-ho.ne.jp // + +// +// Permission is hereby granted, free of charge, to any person obtaining +// a copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be +// included in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// using System; using System.Xml; using System.Xml.Serialization; @@ -20,7 +41,7 @@ namespace System.Xml.Schema private XmlSchemaObjectCollection attributes; private XmlQualifiedName baseTypeName; private XmlSchemaParticle particle; - private static string xmlname = "restriction"; + const string xmlname = "restriction"; public XmlSchemaComplexContentRestriction() { @@ -73,6 +94,15 @@ namespace System.Xml.Schema if (this.IsComplied (schema.CompilationId)) return 0; +#if NET_2_0 + if (Particle != null) + Particle.Parent = this; + if (AnyAttribute != null) + AnyAttribute.Parent = this; + foreach (XmlSchemaObject obj in Attributes) + obj.Parent = this; +#endif + if (this.isRedefinedComponent) { if (Annotation != null) Annotation.isRedefinedComponent = true;