XmlSchemaExternal.cs 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. // Author: Dwivedi, Ajay kumar
  2. // [email protected]
  3. using System;
  4. using System.Xml;
  5. using System.Xml.Serialization;
  6. using System.Collections;
  7. namespace System.Xml.Schema
  8. {
  9. /// <summary>
  10. /// Summary description for XmlSchemaExternal.
  11. /// </summary>
  12. public abstract class XmlSchemaExternal : XmlSchemaObject
  13. {
  14. private string id;
  15. private XmlSchema schema;
  16. private string location;
  17. private XmlAttribute[] unhandledAttributes;
  18. protected XmlSchemaExternal()
  19. {}
  20. [System.Xml.Serialization.XmlAttribute("schemaLocation")]
  21. public string SchemaLocation
  22. {
  23. get{ return location; }
  24. set{ location = value; }
  25. }
  26. [XmlIgnore]
  27. public XmlSchema Schema
  28. {
  29. get{ return schema; }
  30. set{ schema = value; }
  31. }
  32. [System.Xml.Serialization.XmlAttribute("id")]
  33. public string Id
  34. {
  35. get{ return id; }
  36. set{ id = value; }
  37. }
  38. [XmlAnyAttribute]
  39. public XmlAttribute[] UnhandledAttributes
  40. {
  41. get
  42. {
  43. if(unhandledAttributeList != null)
  44. {
  45. unhandledAttributes = (XmlAttribute[]) unhandledAttributeList.ToArray(typeof(XmlAttribute));
  46. unhandledAttributeList = null;
  47. }
  48. return unhandledAttributes;
  49. }
  50. set
  51. {
  52. unhandledAttributes = value;
  53. unhandledAttributeList = null;
  54. }
  55. }
  56. }
  57. }