X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=mcs%2Fclass%2FSystem.XML%2FSystem.Xml.Schema%2FXmlSchemaAnnotated.cs;h=86a16e350080029cfe367052a2bc937909ab2061;hb=018c4be8c5ef6e23ccd9bf798513a6178631e1ea;hp=88af9fad788f6288c50aa982560093336837109b;hpb=74f114a66530954bebb246361b8a512d3b3b379b;p=mono.git diff --git a/mcs/class/System.XML/System.Xml.Schema/XmlSchemaAnnotated.cs b/mcs/class/System.XML/System.Xml.Schema/XmlSchemaAnnotated.cs index 88af9fad788..86a16e35008 100755 --- a/mcs/class/System.XML/System.Xml.Schema/XmlSchemaAnnotated.cs +++ b/mcs/class/System.XML/System.Xml.Schema/XmlSchemaAnnotated.cs @@ -1,6 +1,28 @@ // Author: Dwivedi, Ajay kumar // Adwiv@Yahoo.com + +// +// 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.Collections; using System.Xml; using System.Xml.Serialization; @@ -19,13 +41,6 @@ namespace System.Xml.Schema public XmlSchemaAnnotated() {} - [XmlElement("annotation",Namespace="http://www.w3.org/2001/XMLSchema")] - public XmlSchemaAnnotation Annotation - { - get{ return annotation; } - set{ annotation = value; } - } - [System.Xml.Serialization.XmlAttribute("id")] public string Id { @@ -33,11 +48,30 @@ namespace System.Xml.Schema set{ id = value; } } + [XmlElement("annotation",Namespace=XmlSchema.Namespace)] + public XmlSchemaAnnotation Annotation + { + get{ return annotation; } + set{ annotation = value; } + } + [XmlAnyAttribute] public XmlAttribute[] UnhandledAttributes { - get{ return unhandledAttributes; } - set{ unhandledAttributes = value; } + get + { + if(unhandledAttributeList != null) + { + unhandledAttributes = (XmlAttribute[]) unhandledAttributeList.ToArray(typeof(XmlAttribute)); + unhandledAttributeList = null; + } + return unhandledAttributes; + } + set + { + unhandledAttributes = value; + unhandledAttributeList = null; + } } } }