XmlSchemaExternal.cs 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. // Author: Dwivedi, Ajay kumar
  2. // [email protected]
  3. //
  4. // Permission is hereby granted, free of charge, to any person obtaining
  5. // a copy of this software and associated documentation files (the
  6. // "Software"), to deal in the Software without restriction, including
  7. // without limitation the rights to use, copy, modify, merge, publish,
  8. // distribute, sublicense, and/or sell copies of the Software, and to
  9. // permit persons to whom the Software is furnished to do so, subject to
  10. // the following conditions:
  11. //
  12. // The above copyright notice and this permission notice shall be
  13. // included in all copies or substantial portions of the Software.
  14. //
  15. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
  16. // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  17. // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
  18. // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
  19. // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
  20. // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
  21. // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  22. //
  23. using System;
  24. using System.Xml;
  25. using System.Xml.Serialization;
  26. using System.Collections;
  27. namespace System.Xml.Schema
  28. {
  29. /// <summary>
  30. /// Summary description for XmlSchemaExternal.
  31. /// </summary>
  32. public abstract class XmlSchemaExternal : XmlSchemaObject
  33. {
  34. private string id;
  35. private XmlSchema schema;
  36. private string location;
  37. private XmlAttribute[] unhandledAttributes;
  38. protected XmlSchemaExternal()
  39. {}
  40. [System.Xml.Serialization.XmlAttribute("schemaLocation")]
  41. public string SchemaLocation
  42. {
  43. get{ return location; }
  44. set{ location = value; }
  45. }
  46. [XmlIgnore]
  47. public XmlSchema Schema
  48. {
  49. get{ return schema; }
  50. set{ schema = value; }
  51. }
  52. [System.Xml.Serialization.XmlAttribute("id")]
  53. public string Id
  54. {
  55. get{ return id; }
  56. set{ id = value; }
  57. }
  58. [XmlAnyAttribute]
  59. public XmlAttribute[] UnhandledAttributes
  60. {
  61. get
  62. {
  63. if(unhandledAttributeList != null)
  64. {
  65. unhandledAttributes = (XmlAttribute[]) unhandledAttributeList.ToArray(typeof(XmlAttribute));
  66. unhandledAttributeList = null;
  67. }
  68. return unhandledAttributes;
  69. }
  70. set
  71. {
  72. unhandledAttributes = value;
  73. unhandledAttributeList = null;
  74. }
  75. }
  76. }
  77. }